31float thetaFromSlope(
float m) {
36float pointToLineDistance(
float z,
float r,
39 const float dz = z2 - z1;
41 const float den = std::hypot(dz, dr);
48 return ((
z - z1) * dr - (
r - r1) * dz) / den;
58 return StatusCode::SUCCESS;
64 const bool hasBI = (biSeg !=
nullptr);
65 const bool hasBM = (bmSeg !=
nullptr);
66 const bool hasBO = (boSeg !=
nullptr);
68 const unsigned int nStations =
static_cast<unsigned int>(hasBI) +
69 static_cast<unsigned int>(hasBM) +
70 static_cast<unsigned int>(hasBO);
74 ATH_MSG_DEBUG(
"PtEstimationTool: fewer than 2 stations available, no pT proxy computed");
79 result.nStations = nStations;
94 }
else if (hasBI && hasBO) {
97 }
else if (hasBM && hasBO) {
102 if (!inner || !outer) {
107 const float thetaInner = thetaFromSlope(inner->
m());
108 const float thetaOuter = thetaFromSlope(outer->
m());
110 result.deltaBeta = thetaOuter - thetaInner;
114 <<
"deltaBeta=" << result.deltaBeta
115 <<
" ptProxy=" << result.pt);
126 const float sagitta = pointToLineDistance(
131 const float leverArm = std::hypot(
135 result.sagitta = sagitta;
136 result.leverArm = leverArm;
140 <<
"sagitta=" << result.sagitta
141 <<
" leverArm=" << result.leverArm
142 <<
" ptProxy=" << result.pt);
150 constexpr float minAbsDeltaBeta = 1.e-4f;
153 constexpr float kToyPtScale = 1000.f;
155 const float absDeltaBeta = std::max(std::abs(deltaBeta), minAbsDeltaBeta);
158 return kToyPtScale / absDeltaBeta;
164 constexpr float minAbsSagitta = 1.e-3f;
167 constexpr float kToyPtScale = 1.e-3f;
169 const float absSagitta = std::max(std::abs(sagitta), minAbsSagitta);
172 return kToyPtScale * leverArm * leverArm / absSagitta;
#define ATH_MSG_WARNING(x)
Class describing a reconstructed MDT segment used by the L0Muon trigger.
Compact Segment Finder algorithm overview.
Output struct holding the result of a pT estimation.