18 : Producer(name, process) {}
23 outputCollName_ = parameters.
getParameter<std::string>(
"output_coll_name");
25 parameters.
getParameter<std::string>(
"input_hit_coll_name");
27 parameters.
getParameter<std::string>(
"input_hit_pass_name");
33 defaultMaxHit_.
Clear();
34 defaultMaxHit_.
setPE(-9999);
39 defaultMaxHit_.
setEnd(-999);
46 double maxDepth_ = parameters.
getParameter<
double>(
"max_depth", 0.);
47 if (maxDepth_ != 0.) {
50 "Earlier versions of the Hcal veto defined a max depth for "
51 "positions which is no longer implemented. Remove the "
52 "parameter (max_depth) from your configuration. See "
53 "https://github.com/LDMX-Software/Hcal/issues/61 for details");
60 const std::vector<ldmx::HcalHit> hcalRecHits =
61 event.getCollection<
ldmx::HcalHit>(inputHitCollName_, inputHitPassName_);
65 [[maybe_unused]]
float totalPe{0};
76 float pe = hcalHit.
getPE();
87 if ((
id.section() == ldmx::HcalID::BACK) &&
111 event.add(outputCollName_, result);
#define DECLARE_PRODUCER_NS(NS, CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
Class that defines an HCal sensitive detector.
Processor that determines if an event is vetoed by the Hcal.
void setStorageHint(framework::StorageControl::Hint hint)
Mark the current event as having the given storage control hint from this module.
Implements an event buffer system for storing event data.
Class which represents the process under execution.
Class encapsulating parameters for configuring a processor.
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
HcalVetoProcessor(const std::string &name, framework::Process &process)
Constructor.
void configure(framework::config::Parameters ¶meters) override
Configure the processor using the given user specified parameters.
void produce(framework::Event &event) override
Run the processor and create a collection of results which indicate if the event passes/fails the Hca...
float maxTime_
Maximum hit time that should be considered by the veto.
float backMinPE_
The minimum number of PE in both bars needed for a hit to be considered in double ended readout mode.
double totalPEThreshold_
Total PE threshold.
Stores reconstructed hit information from the HCAL.
void setSection(int section)
Set the section for this hit.
void Clear()
Clear the data in the object.
void setEnd(int end)
Set the end (0 neg, 1 pos side).
void setToaNeg(double toaNeg)
Set toa of the negative end.
void setTimeDiff(double timeDiff)
Set time difference (uncorrected)
void setMinPE(float minpe)
Set the minimum number of photoelectrons estimated for this hit.
void setToaPos(double toaPos)
Set toa of the positive end.
void setAmplitudeNeg(double amplitudeNeg)
Set amplitude of the negative end.
void setStrip(int strip)
Set the strip for this hit.
float getPE() const
Get the number of photoelectrons estimated for this hit.
void setAmplitudePos(double amplitudePos)
Set amplitude of the positive end.
void setLayer(int layer)
Set the layer for this hit.
void setPE(float pe)
Set the number of photoelectrons estimated for this hit.
Implements detector ids for HCal subdetector.
void setVetoResult(const bool &passesVeto=true)
Sets whether the Hcal veto was passed or not.
void setMaxPEHit(const ldmx::HcalHit maxPEHit)
Set the maximum PE hit.
constexpr StorageControl::Hint hint_shouldKeep
storage control hint alias for backwards compatibility
constexpr StorageControl::Hint hint_shouldDrop
storage control hint alias for backwards compatibility