18 #include "GaudiKernel/SystemOfUnits.h"
30 declareInterface<IMuidTrackIsolation>(
this);
53 discRotation.setIdentity();
55 auto transform1 = std::make_unique<Amg::Transform3D>(discRotation * forwardDiscPosition);
58 auto transform2 = std::make_unique<Amg::Transform3D>(discRotation * backwardDiscPosition);
63 return StatusCode::SUCCESS;
67 ATH_MSG_DEBUG(
" MuidTrackIsolation:: " << std::setiosflags(std::ios::fixed)
69 <<
" for muon at calo with eta,phi " << std::setw(8) << std::setprecision(3) << eta
70 << std::setw(8) << std::setprecision(3) << phi);
73 std::pair<int, double> isolation{0, 0.};
95 ATH_MSG_DEBUG(
"Found " << isolation.first << std::setiosflags(std::ios::fixed) <<
" InDet tracks with total momentum "
96 << std::setw(8) << std::setprecision(1) << isolation.second /
Gaudi::Units::GeV <<
" GeV");
104 int numberTracks = 0;
111 double inDetPhi = perigee.parameters()[
Trk::phi];
112 double inDetEta = perigee.eta();
114 double diffEta = std::abs(eta - inDetEta);
118 << std::setiosflags(std::ios::fixed) <<
" Id track: momentum " << std::setw(8) << std::setprecision(1)
119 << perigee.momentum().mag() /
Gaudi::Units::GeV <<
" with perigee eta and difference " << std::setw(8)
120 << std::setprecision(3) << perigee.eta() << std::setw(8) << std::setprecision(3) << diffEta
121 <<
" and same for phi " << std::setw(8) << std::setprecision(3) << perigee.parameters()[
Trk::phi] << std::setw(8)
122 << std::setprecision(3) << diffPhi);
124 if ((diffPhi * diffPhi + diffEta * diffEta) >
m_trackCone2)
continue;
126 const double p = perigee.momentum().mag();
129 ATH_MSG_VERBOSE(
"inside cone, track#" << std::setw(3) << numberTracks);
132 return std::make_pair(numberTracks, sumP);
138 int numberTracks = 0;
145 double inDetEta = perigee.eta();
154 direction /= direction.mag();
163 std::optional<Trk::TrackSurfaceIntersection> caloIntersection(
167 if (!caloIntersection) {
169 << std::setiosflags(std::ios::fixed) <<
" Id track: momentum " << std::setw(8) << std::setprecision(1)
170 << perigee.momentum().mag() /
Gaudi::Units::GeV <<
" with initial eta " << std::setw(8)
171 << std::setprecision(3) << perigee.eta() <<
" and phi " << std::setw(8) << std::setprecision(3)
177 double diffEta = eta - caloIntersection->position().eta();
180 << std::setiosflags(std::ios::fixed) <<
" Id track: momentum " << std::setw(8) << std::setprecision(1)
181 << perigee.momentum().mag() /
Gaudi::Units::GeV <<
" with initial,extrapolated and calo difference for eta "
182 << std::setw(8) << std::setprecision(3) << perigee.eta() << std::setw(8) << std::setprecision(3)
183 << caloIntersection->position().eta() << std::setw(8) << std::setprecision(3) << diffEta <<
" and phi "
184 << std::setw(8) << std::setprecision(3) << perigee.parameters()[
Trk::phi] << std::setw(8)
185 << std::setprecision(3) << caloIntersection->position().phi() << std::setw(8) << std::setprecision(3)
189 if ((diffPhi * diffPhi + diffEta * diffEta) <
m_trackCone2) {
191 const double p = perigee.momentum().mag();
194 ATH_MSG_VERBOSE(
" inside cone, track#" << std::setw(3) << numberTracks);
198 return std::make_pair(numberTracks, sumP);