121 {
122
123 double sumP = 0.;
124 int numberTracks = 0;
125
126
128
129 const Trk::Track* id = idTrack->track();
132
133 double inDetEta = perigee.
eta();
135
136
137
143
150 }
151 std::optional<Trk::TrackSurfaceIntersection> caloIntersection(
152 m_intersector->intersectSurface(*surface, idIntersection, qOverP));
153
154
155 if (!caloIntersection) {
157 << std::setiosflags(std::ios::fixed) << " Id track: momentum " << std::setw(8) << std::setprecision(1)
158 << perigee.
momentum().mag() / Gaudi::Units::GeV <<
" with initial eta " << std::setw(8)
159 << std::setprecision(3) << perigee.
eta() <<
" and phi " << std::setw(8) << std::setprecision(3)
161
162 continue;
163 }
164
165 double diffEta =
eta - caloIntersection->position().eta();
168 << std::setiosflags(std::ios::fixed) << " Id track: momentum " << std::setw(8) << std::setprecision(1)
169 << perigee.
momentum().mag() / Gaudi::Units::GeV <<
" with initial,extrapolated and calo difference for eta "
170 << std::setw(8) << std::setprecision(3) << perigee.
eta() << std::setw(8) << std::setprecision(3)
171 << caloIntersection->position().eta() << std::setw(8) << std::setprecision(3) << diffEta << " and phi "
172 << std::setw(8) << std::setprecision(3) << perigee.parameters()[
Trk::phi] << std::setw(8)
173 << std::setprecision(3) << caloIntersection->
position().phi() << std::setw(8) << std::setprecision(3)
174 << diffPhi);
175
176
177 if ((diffPhi * diffPhi + diffEta * diffEta) <
m_trackCone2) {
178 ++numberTracks;
179 const double p = perigee.
momentum().mag();
181
182 ATH_MSG_VERBOSE(
" inside cone, track#" << std::setw(3) << numberTracks);
183 }
184 }
185
186 return std::make_pair(numberTracks, sumP);
187 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< double > m_minPt
double eta() const
Access method for pseudorapidity - from momentum.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
double pT() const
Access method for transverse momentum.
@ StraightTrack
A straight track.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
TrackSurfaceIntersection()=default
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
TrackParticle_v1 TrackParticle
Reference the current persistent version: