LDMX Software
TrigUtilities.h
1#ifndef TRIGUTILITIES_H
2#define TRIGUTILITIES_H
3#include <vector>
4
5namespace trigger {
6
7class EcalTpToE {
8 public:
9 /* double ecalTpToE(int tp, int layer){ */
10 double calc(int tp, int layer) {
11 float sie = hgc_compression_factor_ * tp * gain_ *
12 m_vto_me_v_; // in MeV, before layer corrections
13 return (sie / mip_si_energy_ * layer_weights_.at(layer) + sie) *
14 second_order_energy_correction_;
15 }
16
17 private:
18 float gain_ = 320. / 0.1 / 1024; // mV/ADC
19 float m_vto_me_v_ =
20 0.130 / (37000.0 * (0.1602 / 1000.) * (1. / 0.1)); // MeV/mV
21 std::vector<float> layer_weights_ = {
22 2.312, 4.312, 6.522, 7.490, 8.595, 10.253, 10.915, 10.915, 10.915,
23 10.915, 10.915, 10.915, 10.915, 10.915, 10.915, 10.915, 10.915, 10.915,
24 10.915, 10.915, 10.915, 10.915, 10.915, 14.783, 18.539, 18.539, 18.539,
25 18.539, 18.539, 18.539, 18.539, 18.539, 18.539, 9.938};
26 float second_order_energy_correction_ = 4000. / 3940.5;
27 float mip_si_energy_ = 0.130;
28 int hgc_compression_factor_ = 8;
29};
30
31} // namespace trigger
32
33#endif /* TRIGUTILITIES_H */