LDMX Software
TrigElectronProducer.h
Go to the documentation of this file.
1
7#ifndef TRIGECALCLUSTERPRODUCER_H
8#define TRIGECALCLUSTERPRODUCER_H
9
10// LDMX Framework
11/* #include "Ecal/EcalTriggerGeometry.h" */
12#include "Framework/Configure/Parameters.h" // Needed to import parameters from configuration file
13#include "Framework/Event.h"
14#include "Framework/EventProcessor.h" //Needed to declare processor
15#include "TF1.h"
16#include "TFile.h"
17#include "TProfile2D.h"
18/* #include "ap_fixed.h" */
19/* #include "ap_int.h" */
20
21namespace trigger {
22
28 public:
29 TrigElectronProducer(const std::string& name, framework::Process& process)
31
33
34 virtual void produce(framework::Event& event);
35
36 virtual void onProcessStart();
37
38 virtual void onProcessEnd();
39
40 void setupMaps(bool isX);
41 float getP(bool isX, float e, float d);
42 float getPx(float e, float d) { return getP(true, e, d); }
43 float getPy(float e, float d) { return getP(false, e, d); }
44
45 private:
46 // name of collection for target scoring plane inputs
47 std::string sp_coll_name_;
48 // name of collection for calo cluster inputs
49 std::string cluster_coll_name_;
50 // name of collection for electron outputs
51 std::string ele_coll_name_;
52
53 std::string target_sp_passname_;
54 std::string cluster_coll_passname_;
55 std::string cluster_collname_events_passname_;
56 std::string sp_collname_events_passname_;
57
58 std::string prop_map_name_;
59 TProfile2D* prop_mapx_{nullptr};
60 TProfile2D* prop_mapy_{nullptr};
61 std::vector<TF1*> fits_x_{};
62 std::vector<TF1*> fits_y_{};
63
64 // From:
65 // Tools/python/HgcrocEmulator.py
66 // ECal/python/digi.py
67 // ECal/src/EcalRecProducer.cxx
68 /* float gain_ = 320. / 0.1 / 1024; //
69 * mV/ADC */
70 /* float mVtoMeV_ = 0.130 / (37000.0 * (0.162 / 1000.) * (1. / 0.1)); //
71 * MeV/mV */
72 /* std::vector<float> layerWeights = { */
73 /* 1.675, 2.724, 4.398, 6.039, 7.696, 9.077, 9.630, 9.630, 9.630,
74 */
75 /* 9.630, 9.630, 9.630, 9.630, 9.630, 9.630, 9.630, 9.630, 9.630,
76 */
77 /* 9.630, 9.630, 9.630, 9.630, 9.630, 13.497, 17.364, 17.364, 17.364,
78 */
79 /* 17.364, 17.364, 17.364, 17.364, 17.364, 17.364, 8.990}; */
80 /* float secondOrderEnergyCorrection_ = 4000. / 4010.; */
81 /* float mipSiEnergy_ = 0.130; */
82 /* int hgc_compression_factor_ = 8; */
83
84 // ClusterGeometry myGeo;
85};
86} // namespace trigger
87
88#endif /* TRIGECALCLUSTERPRODUCER_H */
Base classes for all user event processing components to extend.
Class implementing an event buffer system for storing event data.
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.
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:29
virtual void onProcessStart()
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
virtual void produce(framework::Event &event)
Process the event and put new data products into it.
virtual void onProcessEnd()
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
virtual void configure(framework::config::Parameters &ps)
Callback for the EventProcessor to configure itself from the given set of parameters.