7 #include "GaudiKernel/SystemOfUnits.h"
20 const IInterface*
parent) :
22 declareInterface<IMuonMomentumBalanceSignificance>(
this);
31 muon.trackParticle(xAOD::Muon::CombinedTrackParticle) ?
muon.trackParticle(xAOD::Muon::CombinedTrackParticle)->track() :
nullptr;
33 if (theTrack ==
nullptr) {
34 ATH_MSG_DEBUG(
"No primary author original track for refitted muon, stop calculation...");
43 double energyBalance = 0.;
47 s !=
track.trackStateOnSurfaces()->end(); ++
s) {
48 if (!(**s).trackParameters())
continue;
49 if ((**s).materialEffectsOnTrack()) {
54 energyBalance = previousParameters->
momentum().mag() - energyLoss->
deltaE() - (**s).trackParameters()->momentum().mag();
61 <<
" momentum balance " << std::setw(6) << std::setprecision(2) << energyBalance /
GeV
62 <<
" significance " << std::setw(6) << std::setprecision(1)
63 << energyBalance / energyLoss->
sigmaDeltaE() <<
" p before/after calo" << std::setw(7)
64 << std::setprecision(2) << previousParameters->
momentum().mag() /
GeV <<
" /" << std::setw(7)
65 << std::setprecision(2) << (**s).trackParameters()->momentum().mag() /
GeV
66 <<
" energy deposit sigma " << energyLoss->
sigmaDeltaE() /
GeV <<
" GeV");
68 if (fabs(energyBalance) > 1.0)
70 <<
"as asymmetric error undefined ");
71 }
else if (energyBalance < 0.) {
73 <<
" momentum balance " << std::setw(6) << std::setprecision(2) << energyBalance /
GeV
74 <<
" significance " << std::setw(6) << std::setprecision(1)
75 << energyBalance / energyLoss->
sigmaDeltaE() <<
" p before/after calo" << std::setw(7)
76 << std::setprecision(2) << previousParameters->
momentum().mag() /
GeV <<
" /" << std::setw(7)
77 << std::setprecision(2) << (**s).trackParameters()->momentum().mag() /
GeV
82 <<
" momentum balance " << std::setw(6) << std::setprecision(2) << energyBalance /
GeV
83 <<
" significance " << std::setw(6) << std::setprecision(1)
84 << energyBalance / energyLoss->
sigmaDeltaE() <<
" p before/after calo" << std::setw(7)
85 << std::setprecision(2) << previousParameters->
momentum().mag() /
GeV <<
" /" << std::setw(7)
86 << std::setprecision(2) << (**s).trackParameters()->momentum().mag() /
GeV
95 previousParameters = (**s).trackParameters();