diff --git a/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx index 0ec8cc11b772a228f10d6b0df7050de4231bdae6..35df8b787cf67a47fb226c0eb89b66362dbdbfcb 100644 --- a/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx +++ b/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ //Author: Lianyou Shan <lianyou.shan@cern.ch> @@ -684,7 +684,7 @@ InDetIterativeSecVtxFinderTool::findVertex(const std::vector<Trk::ITrackLink*> & } }//end of iterating on tracks at previous vertices - if ( nrobbed > 0 ) mDecor_nrobbed( *(*vxIter) ) = (*vxIter)->auxdata<int>("nrobbed") + 1 ; + if ( nrobbed > 0 ) mDecor_nrobbed( *(*vxIter) ) ++; }//end of iterating on already found vertices in event @@ -971,7 +971,7 @@ InDetIterativeSecVtxFinderTool::findVertex(const std::vector<Trk::ITrackLink*> & continue ; } - int nrobbed = (*vxIter)->auxdata<int>("nrobbed") ; + int nrobbed = mDecor_nrobbed (**vxIter); if ( nrobbed < 1 ) { ++vxIter ; @@ -1013,15 +1013,15 @@ InDetIterativeSecVtxFinderTool::findVertex(const std::vector<Trk::ITrackLink*> & float chi2dof2 = QxAODVertex->chiSquared()/QxAODVertex->numberDoF() ; float oldhf = 0. ; - if ( (*vxIter)->isAvailable<float>( "radiiPattern" ) ) - oldhf = (*vxIter)->auxdata<float>( "radiiPattern" ) ; + if ( mDecor_HitsFilter.isAvailable (**vxIter) ) + oldhf = mDecor_HitsFilter (**vxIter); if ( chi2dof2 >= chi2dof1 ) { ++vxIter ; continue ; } - int nit = (*vxIter)->auxdata<int>( "NumInputTrk" ) ; + int nit = mDecor_intrk (**vxIter); *(*vxIter) = *QxAODVertex ; bool isv0 = V0kine( getVertexMomenta( QxAODVertex ), (&(*QxAODVertex))->position(), m_v0mass, m_dir ) ; diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx index 1627364229314369b40fd0629e79d010bf71fef8..4cbc518316173d750946f26aac3ae25701c2ff35 100755 --- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx +++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ // Author: Vadim Kostyukhin (vadim.kostyukhin@cern.ch) @@ -576,11 +576,13 @@ namespace InDet{ int InDetVKalVxInJetTool::getIdHF(const xAOD::TrackParticle* TP ) { - if( TP->isAvailable< ElementLink< xAOD::TruthParticleContainer> >( "truthParticleLink") ) { + static const SG::ConstAccessor< ElementLink< xAOD::TruthParticleContainer> > truthParticleLinkAcc ("truthParticleLink"); + if( truthParticleLinkAcc.isAvailable (*TP) ) { const ElementLink<xAOD::TruthParticleContainer>& tplink = - TP->auxdata< ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink"); + truthParticleLinkAcc (*TP); if( !tplink.isValid() ) return 0; - if( TP->auxdata< float >( "truthMatchProbability" ) < 0.5 ) return 0; + static const SG::ConstAccessor<float> truthMatchProbabilityAcc ("truthMatchProbability"); + if( truthMatchProbabilityAcc (*TP ) < 0.5 ) return 0; if (HepMC::is_simulation_particle(*tplink)) return 0; if( (*tplink)->hasProdVtx()){ if( (*tplink)->prodVtx()->nIncomingParticles()==1){ @@ -625,17 +627,19 @@ namespace InDet{ int InDetVKalVxInJetTool::getG4Inter(const xAOD::TrackParticle* TP ) { - if( TP->isAvailable< ElementLink< xAOD::TruthParticleContainer> >( "truthParticleLink") ) { + static const SG::ConstAccessor< ElementLink< xAOD::TruthParticleContainer> > truthParticleLinkAcc ("truthParticleLink"); + if( truthParticleLinkAcc.isAvailable (*TP) ) { const ElementLink<xAOD::TruthParticleContainer>& tplink = - TP->auxdata< ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink"); + truthParticleLinkAcc (*TP); if( tplink.isValid() && HepMC::is_simulation_particle(*tplink)) return 1; } return 0; } int InDetVKalVxInJetTool::getMCPileup(const xAOD::TrackParticle* TP ) { - if( TP->isAvailable< ElementLink< xAOD::TruthParticleContainer> >( "truthParticleLink") ) { + static const SG::ConstAccessor< ElementLink< xAOD::TruthParticleContainer> > truthParticleLinkAcc ("truthParticleLink"); + if( truthParticleLinkAcc.isAvailable (*TP) ) { const ElementLink<xAOD::TruthParticleContainer>& tplink = - TP->auxdata< ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink"); + truthParticleLinkAcc (*TP); if( !tplink.isValid() ) return 1; } else { return 1; } return 0;