LDMX Software
EcalRecoilRemovalProcessor.h
Go to the documentation of this file.
1
8#ifndef EVENTPROC_ECALRECOILREMOVALPROCESSOR_H_
9#define EVENTPROC_ECALRECOILREMOVALPROCESSOR_H_
10
11// LDMX
14#include "Framework/Configure/Parameters.h"
16
17// C++
18#include <stdlib.h>
19
20#include <map>
21
22namespace ecal {
23
30 public:
31 using XYCoords = ldmx::XYCoords;
32
33 EcalRecoilRemovalProcessor(const std::string& name,
35 : Producer(name, process) {}
36
38
45 void onNewRun(const ldmx::RunHeader& rh) override;
46
50 void onProcessEnd() override;
51
57 void configure(framework::config::Parameters& parameters) override;
58
59 void produce(framework::Event& event) override;
60
61 private:
62 std::vector<XYCoords> getTrajectory(std::array<float, 3> momentum,
63 std::array<float, 3> position);
64
65 private:
66 int nevents_{0};
67 float processing_time_{0.};
68 std::map<std::string, float> profiling_map_;
69
70 // Number of electrons in the event; TODO: replace with ElectronCounter
71 int n_electrons_{1};
72
73 std::vector<float> ecal_layer_edep_raw_;
74 std::vector<float> ecal_layer_edep_readout_;
75 std::vector<float> ecal_layer_time_;
76
77 std::vector<std::vector<float>> rem_dist_values_;
78
79 // ldmx-sw pass parameters
80 float beam_energy_mev_{0.};
81 int num_ecal_layers_;
82 std::string rem_dist_file_name_;
83
84 // boolean parameters
85 bool recoil_from_tracking_;
86
87 // pass and collection names
88 std::string ecal_sim_pass_name_;
89 std::string ecal_sp_hits_pass_name_;
90 std::string rec_coll_name_;
91 std::string rec_pass_name_;
92 std::string track_coll_name_;
93 std::string track_pass_name_;
94
97 std::string collection_name_excluded_;
98
99 // handle to current geometry (to share with member functions)
100 const ldmx::EcalGeometry* geometry_;
101};
102
103} // namespace ecal
104
105#endif
Class that translates raw positions of ECal module hits into cells in a hexagonal readout.
Class that determines MIP tracking information using ECAL hit information.
Base classes for all user event processing components to extend.
Discards Ecal reconstructed hits from the recoil electron for WAB event processing.
void configure(framework::config::Parameters &parameters) override
Configure the processor using the given user specified parameters.
void onProcessEnd() override
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
void produce(framework::Event &event) override
Process the event and put new data products into it.
std::string collection_name_included_
Name of the collection which will containt the results.
void onNewRun(const ldmx::RunHeader &rh) override
onNewRun is the first function called for each processor after the conditions are fully configured an...
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.
Producer(const std::string &name, Process &process)
Class constructor.
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
Translation between real-space positions and cell IDs within the ECal.
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:68