1 #ifndef L1Trigger_TrackFindingTracklet_interface_Util_h
2 #define L1Trigger_TrackFindingTracklet_interface_Util_h
17 unsigned int value = 0;
19 for (
unsigned int i = 0;
i < binary.size();
i++) {
20 unsigned int slot = binary.size() -
i - 1;
21 if (!(binary[slot] ==
'0' || binary[slot] ==
'1'))
27 ss <<
"0x" << std::hex <<
value;
34 int ibend = 2.0 *
bend;
39 if (ibend == 0 || ibend == 1)
41 if (ibend == 2 || ibend == 3)
43 if (ibend == 4 || ibend == 5)
47 if (ibend == -1 || ibend == -2)
49 if (ibend == -3 || ibend == -4)
51 if (ibend == -5 || ibend == -6)
57 <<
" Unknown bendencode for PS module for bend = " <<
bend
58 <<
" ibend = " << ibend;
61 if (ibend == 0 || ibend == 1)
63 if (ibend == 2 || ibend == 3)
65 if (ibend == 4 || ibend == 5)
67 if (ibend == 6 || ibend == 7)
69 if (ibend == 8 || ibend == 9)
71 if (ibend == 10 || ibend == 11)
73 if (ibend == 12 || ibend == 13)
77 if (ibend == -1 || ibend == -2)
79 if (ibend == -3 || ibend == -4)
81 if (ibend == -5 || ibend == -6)
83 if (ibend == -7 || ibend == -8)
85 if (ibend == -9 || ibend == -10)
87 if (ibend == -11 || ibend == -12)
89 if (ibend == -13 || ibend == -14)
95 <<
" Unknown bendencode for 2S module for bend = " <<
bend
96 <<
" ibend = " << ibend;
120 <<
" Unknown benddecode for PS module for ibend = " << ibend;
157 <<
" Unknown benddecode for 2S module for ibend = " << ibend;
160 inline double bend(
double r,
double rinv,
double stripPitch) {
161 constexpr
double dr = 0.18;
167 inline double rinv(
double phi1,
double phi2,
double r1,
double r2) {
172 double dphi = phi2 - phi1;