LDMX Software
HcalVetoProcessor.h
Go to the documentation of this file.
1
8#ifndef __HCAL_HCAL_VETO_PROCESSOR_H__
9#define __HCAL_HCAL_VETO_PROCESSOR_H__
10
11//----------------//
12// C++ StdLib //
13//----------------//
14#include <string>
15
16//----------//
17// LDMX //
18//----------//
19#include "DetDescr/HcalID.h"
20#include "Event/HcalHit.h"
22#include "Framework/Configure/Parameters.h"
24#include "Tracking/Event/Track.h"
25
26namespace hcal {
27
29 public:
31 HcalVetoProcessor(const std::string &name, framework::Process &process);
32
34 virtual ~HcalVetoProcessor() = default;
35
41 void configure(framework::config::Parameters &parameters) override;
42
49 void produce(framework::Event &event) override;
50
58 std::vector<float> trackProp(const ldmx::Tracks &tracks,
59 ldmx::TrackStateType ts_type,
60 const std::string &ts_title);
61
62 private:
65
67 float max_time_{50}; // ns
68
71 float back_min_PE_{1};
72
73 /*
74 * A hit representing the case where we never reach the maxPE condition. This
75 * is rare but can happen which previously would record uninitialized memory.
76 * Stored inside of the producer so that it will have a valid lifetime when we
77 * persist it.
78 *
79 * See https://github.com/LDMX-Software/Hcal/issues/58 for details
80 *
81 * Ideally, this would just be stored as a part of the HcalVetoResult, but
82 * changing that would be breaking change so for now we work around it like
83 * this.
84 *
85 * It contains nonsense values but since they are predictable, they are harder
86 * to mistake for real hits. See constructor for the actual values.
87 */
88 ldmx::HcalHit default_max_hit_;
89
90 std::string output_coll_name_;
91 std::string input_hit_coll_name_;
92 std::string input_hit_pass_name_;
93 bool exclude_recoil_ele_;
94 std::string track_collection_;
95 float dr_from_recoil_max_;
96 bool inverse_skim_{false};
97}; // HcalVetoProcessor
98} // namespace hcal
99
100#endif // HCAL_HCALVETOPROCESSOR_H_
Base classes for all user event processing components to extend.
Class that stores Stores reconstructed hit information from the HCAL.
Class that defines an HCal sensitive detector.
Class used to encapsulate the results obtained from HcalVetoProcessor.
Implements an event buffer system for storing event data.
Definition Event.h:42
Class which represents the process under execution.
Definition Process.h:36
Base class for a module which produces a data product.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
HcalVetoProcessor(const std::string &name, framework::Process &process)
Constructor.
double total_PE_threshold_
Total PE threshold.
float max_time_
Maximum hit time that should be considered by the veto.
void configure(framework::config::Parameters &parameters) override
Configure the processor using the given user specified parameters.
virtual ~HcalVetoProcessor()=default
Destructor.
std::vector< float > trackProp(const ldmx::Tracks &tracks, ldmx::TrackStateType ts_type, const std::string &ts_title)
Return a vector of parameters for a propagated recoil track.
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 back_min_PE_
The minimum number of PE in both bars needed for a hit to be considered in double ended readout mode.
Stores reconstructed hit information from the HCAL.
Definition HcalHit.h:24