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)
30 : framework::Producer(name, 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 spCollName_;
48 // name of collection for calo cluster inputs
49 std::string clusterCollName_;
50 // name of collection for electron outputs
51 std::string eleCollName_;
52
53 std::string propMapName_;
54 TProfile2D* propMapx_{nullptr};
55 TProfile2D* propMapy_{nullptr};
56 std::vector<TF1*> fitsX_{};
57 std::vector<TF1*> fitsY_{};
58
59 // From:
60 // Tools/python/HgcrocEmulator.py
61 // ECal/python/digi.py
62 // ECal/src/EcalRecProducer.cxx
63 /* float gain_ = 320. / 0.1 / 1024; //
64 * mV/ADC */
65 /* float mVtoMeV_ = 0.130 / (37000.0 * (0.162 / 1000.) * (1. / 0.1)); //
66 * MeV/mV */
67 /* std::vector<float> layerWeights = { */
68 /* 1.675, 2.724, 4.398, 6.039, 7.696, 9.077, 9.630, 9.630, 9.630,
69 */
70 /* 9.630, 9.630, 9.630, 9.630, 9.630, 9.630, 9.630, 9.630, 9.630,
71 */
72 /* 9.630, 9.630, 9.630, 9.630, 9.630, 13.497, 17.364, 17.364, 17.364,
73 */
74 /* 17.364, 17.364, 17.364, 17.364, 17.364, 17.364, 8.990}; */
75 /* float secondOrderEnergyCorrection_ = 4000. / 4010.; */
76 /* float mipSiEnergy_ = 0.130; */
77 /* int hgc_compression_factor_ = 8; */
78
79 // ClusterGeometry myGeo;
80};
81} // namespace trigger
82
83#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:41
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:27
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.