|
ATLAS Offline Software
|
Go to the documentation of this file.
20 static const double ptcheckthres=0.001;
21 static const double etaphicheckthres=0.0001;
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;
113 ATH_MSG_DEBUG(
"TrigMuonEFInfo track has no extrapolated track");
114 if(
muon->muonSpectrometerTrackParticleLink().isValid() ) {
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->muonSpectrometerTrackParticleLink().isValid()) ) {
125 ATH_MSG_ERROR(
"Mismatch: TrigMuonEFInfoTrack has ME track, xAOD::Muon does not");
126 return StatusCode::RECOVERABLE;
132 if(
sc.isFailure())
return sc;
135 return StatusCode::SUCCESS;
145 if(
muon->combinedTrackParticleLink().isValid() ) {
146 ATH_MSG_ERROR(
"Mismatch: TrigMuonEFInfoTrack has no combined track, xAOD::Muon does");
147 return StatusCode::RECOVERABLE;
150 return StatusCode::SUCCESS;
155 if( !(
muon->combinedTrackParticleLink().isValid()) ) {
156 ATH_MSG_ERROR(
"Mismatch: TrigMuonEFInfoTrack has combined track, xAOD::Muon does not");
157 return StatusCode::RECOVERABLE;
163 if(
sc.isFailure())
return sc;
166 return StatusCode::SUCCESS;
181 if(primtrk!=
nullptr &&
muon->primaryTrackParticleLink().isValid()) {
183 if(
sc.isFailure())
return sc;
185 if(primtrk!=
nullptr ||
muon->primaryTrackParticleLink().isValid()) {
186 ATH_MSG_ERROR(
"One of the primary tracks is not good, old = " << (primtrk!=
nullptr) <<
", new = " <<
muon->primaryTrackParticleLink().isValid() );
187 return StatusCode::RECOVERABLE;
188 }
else return StatusCode::SUCCESS;
193 return StatusCode::SUCCESS;
205 const double dpt = std::abs(eftrack->
pt() - xaodtrack->
pt());
206 if( dpt > ptcheckthres*eftrack->
pt() ) {
208 ATH_MSG_ERROR(
"pT of two tracks is different, old = " << std::fixed << std::setprecision(8) << eftrack->
pt() <<
", new = " << xaodtrack->
pt() <<
", dpt = " << dpt);
209 return StatusCode::RECOVERABLE;
212 if( std::abs(eftrack->
eta() - xaodtrack->
eta()) > etaphicheckthres ) {
213 ATH_MSG_ERROR(
"eta of two tracks is different, old = " << eftrack->
eta() <<
", new = " << xaodtrack->
eta());
214 return StatusCode::RECOVERABLE;
217 if( std::abs(dphi) > etaphicheckthres) {
218 ATH_MSG_ERROR(
"phi of two tracks is different, old = " << eftrack->
phi() <<
", new = " << xaodtrack->
phi());
219 return StatusCode::RECOVERABLE;
222 return StatusCode::SUCCESS;
virtual double pt() const override final
The transverse momentum ( ) of the particle.
std::string m_aodContainerName
The key of the TrigMuonEFInfoContainer.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
bool hasExtrapolatedTrack() const
bool msgLvl(const MSG::Level lvl) const
StatusCode compareCombinedTracks(const TrigMuonEFInfoTrack *infotrk, const xAOD::Muon *muon)
compare combined tracks
std::string m_xaodMuonContainerName
The key for the xAOD::MuonContainer.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
StatusCode compareExtrapolatedTracks(const TrigMuonEFInfoTrack *infotrk, const xAOD::Muon *muon)
compare extrapolated tracks
TrigMuonEFCbTrack * CombinedTrack()
virtual double eta() const
pseudo rapidity
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode execute()
Function executing the algorithm.
virtual double phi() const
get phi data member
TrigMuonEFTrack * ExtrapolatedTrack()
bool hasCombinedTrack() const
StatusCode compareTracks(const TrigMuonEFTrack *eftrack, const xAOD::TrackParticle *xaodtrack)
compare tracks
TrigMuonEFInfoCnvTestAlg(const std::string &name, ISvcLocator *svcLoc)
Regular algorithm constructor.
virtual StatusCode initialize()
Function initialising the algorithm.
StatusCode comparePrimaryTracks(const TrigMuonEFInfoTrack *infotrk, const xAOD::Muon *muon)
compare primary tracks
Class describing a TrackParticle.
size_type size() const noexcept
Returns the number of elements in the collection.
virtual double pt() const
transverse momentum
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)