1 #ifndef L1Trigger_TrackFindingTracklet_interface_Util_h
2 #define L1Trigger_TrackFindingTracklet_interface_Util_h
18 unsigned int radix = 1,
value = 0;
19 for (
int i = binary.length() - 1;
i >= 0;
i--) {
20 if (binary.at(
i) !=
'0' && binary.at(
i) !=
'1')
22 value += (binary.at(
i) -
'0') * radix;
40 int ibend = 2.0 *
bend;
45 if (ibend == 0 || ibend == 1)
47 if (ibend == 2 || ibend == 3)
49 if (ibend == 4 || ibend == 5)
53 if (ibend == -1 || ibend == -2)
55 if (ibend == -3 || ibend == -4)
57 if (ibend == -5 || ibend == -6)
63 <<
" Unknown bendencode for PS module for bend = " <<
bend
64 <<
" ibend = " << ibend;
67 if (ibend == 0 || ibend == 1)
69 if (ibend == 2 || ibend == 3)
71 if (ibend == 4 || ibend == 5)
73 if (ibend == 6 || ibend == 7)
75 if (ibend == 8 || ibend == 9)
77 if (ibend == 10 || ibend == 11)
79 if (ibend == 12 || ibend == 13)
83 if (ibend == -1 || ibend == -2)
85 if (ibend == -3 || ibend == -4)
87 if (ibend == -5 || ibend == -6)
89 if (ibend == -7 || ibend == -8)
91 if (ibend == -9 || ibend == -10)
93 if (ibend == -11 || ibend == -12)
95 if (ibend == -13 || ibend == -14)
101 <<
" Unknown bendencode for 2S module for bend = " <<
bend
102 <<
" ibend = " << ibend;
126 <<
" Unknown benddecode for PS module for ibend = " << ibend;
163 <<
" Unknown benddecode for 2S module for ibend = " << ibend;
166 inline double bend(
double r,
double rinv,
double stripPitch) {
167 constexpr
double dr = 0.18;
173 inline double rinv(
double phi1,
double phi2,
double r1,
double r2) {
178 double dphi = phi2 - phi1;