5 #ifndef REC_CALOCELLHELPERS_H
6 #define REC_CALOCELLHELPERS_H
17 double mean_phi =
phiMean(phi_entrance, phi_exit);
19 double phi_min = mean_phi - dphi, phi_max = mean_phi + dphi;
29 if (fabs(eta_entrance - eta_exit) < 1
e-6)
32 double etaMinTrack =
std::min(eta_entrance, eta_exit);
33 double etaMaxTrack =
std::max(eta_entrance, eta_exit);
38 inline double getPathLengthInZ(
double zMin,
double zMax,
double z_entrance,
double z_exit) {
39 if (fabs(z_entrance - z_exit) < 1
e-6)
40 return z_entrance > zMin && z_entrance < zMax;
42 double zMinTrack =
std::min(z_entrance, z_exit);
43 double zMaxTrack =
std::max(z_entrance, z_exit);
44 return (
std::min(zMax, zMaxTrack) -
std::max(zMin, zMinTrack)) / (zMaxTrack - zMinTrack);
86 double pathCrossed = 0;
93 if (pathCrossed <= 0)
return 0;