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 "Event/HcalHit.h"
20#include "Framework/Configure/Parameters.h"
22#include "Tracking/Event/Track.h"
23
24namespace hcal {
25
27 public:
29 HcalVetoProcessor(const std::string& name, framework::Process& process);
30
32 virtual ~HcalVetoProcessor() = default;
33
39 void configure(framework::config::Parameters& parameters) override;
40
47 void produce(framework::Event& event) override;
48
56 std::vector<float> trackProp(const ldmx::Tracks& tracks,
57 ldmx::TrackStateType ts_type,
58 const std::string& ts_title);
59
60 private:
63
65 float max_time_{50}; // ns
66
69 float back_min_pe_{1};
70
71 /*
72 * A hit representing the case where we never reach the maxPE condition. This
73 * is rare but can happen which previously would record uninitialized memory.
74 * Stored inside of the producer so that it will have a valid lifetime when we
75 * persist it.
76 *
77 * See https://github.com/LDMX-Software/Hcal/issues/58 for details
78 *
79 * Ideally, this would just be stored as a part of the HcalVetoResult, but
80 * changing that would be breaking change so for now we work around it like
81 * this.
82 *
83 * It contains nonsense values but since they are predictable, they are harder
84 * to mistake for real hits_. See constructor for the actual values.
85 */
86 ldmx::HcalHit default_max_hit_;
87
88 std::string output_coll_name_;
89 std::string input_hit_coll_name_;
90 std::string input_hit_pass_name_;
91 std::string track_pass_name_;
92 bool exclude_recoil_ele_;
93 std::string track_collection_;
94 float dr_from_recoil_max_;
95 bool inverse_skim_{false};
96}; // HcalVetoProcessor
97} // namespace hcal
98
99#endif // HCAL_HCALVETOPROCESSOR_H_
Base classes for all user event processing components to extend.
Class that stores Stores reconstructed hit information from the HCAL.
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
Base class for a module which produces a data product.
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
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.
float back_min_pe_
The minimum number of PE in both bars needed for a hit to be considered in double ended readout mode.
void produce(framework::Event &event) override
Run the processor and create a collection of results which indicate if the event passes/fails the Hca...
Stores reconstructed hit information from the HCAL.
Definition HcalHit.h:24