Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
Add warning if depth setting is used, rename minPE
Browse files Browse the repository at this point in the history
to make it clear that it is only applied for the back hcal
  • Loading branch information
EinarElen committed Sep 14, 2023
1 parent 23fc8e1 commit 07944dd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
7 changes: 3 additions & 4 deletions include/Hcal/HcalVetoProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ class HcalVetoProcessor : public framework::Producer {
/** Maximum hit time that should be considered by the veto. */
float maxTime_{50}; // ns

/** Maximum z depth that a hit can have. */
float maxDepth_{4000}; // mm
/** The minimum number of PE in both bars needed for a hit to be considered in
* double ended readout mode. */
float backMinPE_{1};

/** The minimum number of PE needed for a hit. */
float minPE_{1};

}; // HcalVetoProcessor
} // namespace hcal
Expand Down
17 changes: 16 additions & 1 deletion src/Hcal/HcalVetoProcessor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,22 @@ HcalVetoProcessor::~HcalVetoProcessor() {}
void HcalVetoProcessor::configure(framework::config::Parameters &parameters) {
totalPEThreshold_ = parameters.getParameter<double>("pe_threshold");
maxTime_ = parameters.getParameter<double>("max_time");
minPE_ = parameters.getParameter<double>("back_min_pe");
outputCollName_ = parameters.getParameter<std::string>("output_coll_name");
inputHitCollName_ =
parameters.getParameter<std::string>("input_hit_coll_name");
inputHitPassName_ =
parameters.getParameter<std::string>("input_hit_pass_name");

double maxDepth_ = parameters.getParameter<double>("max_depth", 0.);
if (maxDepth_ != 0.) {
EXCEPTION_RAISE(
"InvalidParam",
"Earlier versions of the Hcal veto defined a max depth for "
"positions which is no longer implemented. Remove the "
"parameter (max_depth) from your configuration. See "
"https://github.com/LDMX-Software/Hcal/issues/61 for details");
}
backMinPE_ = parameters.getParameter<double>("back_min_pe");
}

void HcalVetoProcessor::produce(framework::Event &event) {
Expand Down

0 comments on commit 07944dd

Please sign in to comment.