35 return StatusCode::SUCCESS;
44 return StatusCode::RECOVERABLE;
52 return StatusCode::RECOVERABLE;
57 std::vector<const TrigMuonEFInfoTrack*> efinfotracks;
58 for(
const auto *infoit : *infocont) {
60 for(
const auto *trk : *trkcont) {
62 if(trk->hasCombinedTrack() || trk->hasExtrapolatedTrack()) {
64 efinfotracks.push_back(trk);
70 ATH_MSG_DEBUG(
"N(TrigMuonEFInfoTrack) = " << efinfotracks.size());
73 if(efinfotracks.size() != muoncont->
size()) {
76 return StatusCode::RECOVERABLE;
81 for(
unsigned int i=0; i<muoncont->
size(); ++i) {
88 return StatusCode::RECOVERABLE;
92 return StatusCode::RECOVERABLE;
103 return StatusCode::SUCCESS;
111 using enum xAOD::Muon::TrackParticleType;
113 ATH_MSG_DEBUG(
"TrigMuonEFInfo track has no extrapolated track");
114 if(muon->trackParticle(MuonSpectrometerTrackParticle) ) {
115 ATH_MSG_ERROR(
"Mismatch: TrigMuonEFInfoTrack has no ME track, xAOD::Muon does");
116 return StatusCode::RECOVERABLE;
119 return StatusCode::SUCCESS;
123 ATH_MSG_DEBUG(
"TrigMuonEFInfo track has extrapolated track");
124 if( !(muon->trackParticle(MuonSpectrometerTrackParticle)) ) {
125 ATH_MSG_ERROR(
"Mismatch: TrigMuonEFInfoTrack has ME track, xAOD::Muon does not");
126 return StatusCode::RECOVERABLE;
132 return StatusCode::SUCCESS;
139 using enum xAOD::Muon::TrackParticleType;
143 if(muon->trackParticle(CombinedTrackParticle)) {
144 ATH_MSG_ERROR(
"Mismatch: TrigMuonEFInfoTrack has no combined track, xAOD::Muon does");
145 return StatusCode::RECOVERABLE;
148 return StatusCode::SUCCESS;
153 if( !muon->trackParticle(CombinedTrackParticle) ) {
154 ATH_MSG_ERROR(
"Mismatch: TrigMuonEFInfoTrack has combined track, xAOD::Muon does not");
155 return StatusCode::RECOVERABLE;
162 return StatusCode::SUCCESS;
181 return StatusCode::SUCCESS;
187 if(
msgLvl(MSG::VERBOSE)) {
188 msg() << MSG::VERBOSE <<
"Compare Track:" <<
endmsg;
189 msg() << MSG::VERBOSE <<
"old track pt = " << eftrack->
pt() <<
", new track pt = " << xaodtrack->
pt() <<
endmsg;
190 msg() << MSG::VERBOSE <<
"old track eta = " << eftrack->
eta() <<
", new track eta = " << xaodtrack->
eta() <<
endmsg;
191 msg() << MSG::VERBOSE <<
"old track phi = " << eftrack->
phi() <<
", new track phi = " << xaodtrack->
phi() <<
endmsg;
193 const double dpt = std::abs(eftrack->
pt() - xaodtrack->
pt());
196 ATH_MSG_ERROR(
"pT of two tracks is different, old = " << std::fixed << std::setprecision(8) << eftrack->
pt() <<
", new = " << xaodtrack->
pt() <<
", dpt = " << dpt);
197 return StatusCode::RECOVERABLE;
201 ATH_MSG_ERROR(
"eta of two tracks is different, old = " << eftrack->
eta() <<
", new = " << xaodtrack->
eta());
202 return StatusCode::RECOVERABLE;
206 ATH_MSG_ERROR(
"phi of two tracks is different, old = " << eftrack->
phi() <<
", new = " << xaodtrack->
phi());
207 return StatusCode::RECOVERABLE;
210 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
static const double etaphicheckthres
static const double ptcheckthres
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
bool msgLvl(const MSG::Level lvl) const
size_type size() const noexcept
Returns the number of elements in the collection.
virtual double eta() const
pseudo rapidity
virtual double pt() const
transverse momentum
virtual double phi() const
get phi data member
StatusCode compareTracks(const TrigMuonEFTrack *eftrack, const xAOD::TrackParticle *xaodtrack)
compare tracks
std::string m_xaodMuonContainerName
The key for the xAOD::MuonContainer.
std::string m_aodContainerName
The key of the TrigMuonEFInfoContainer.
StatusCode comparePrimaryTracks(const TrigMuonEFInfoTrack *infotrk, const xAOD::Muon *muon)
compare primary tracks
virtual StatusCode initialize()
Function initialising the algorithm.
StatusCode compareExtrapolatedTracks(const TrigMuonEFInfoTrack *infotrk, const xAOD::Muon *muon)
compare extrapolated tracks
virtual StatusCode execute()
Function executing the algorithm.
TrigMuonEFInfoCnvTestAlg(const std::string &name, ISvcLocator *svcLoc)
Regular algorithm constructor.
StatusCode compareCombinedTracks(const TrigMuonEFInfoTrack *infotrk, const xAOD::Muon *muon)
compare combined tracks
TrigMuonEFCbTrack * CombinedTrack()
bool hasExtrapolatedTrack() const
bool hasCombinedTrack() const
TrigMuonEFTrack * ExtrapolatedTrack()
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .).
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".