10 #include "GaudiKernel/ISvcLocator.h"
12 #include "GaudiKernel/Service.h"
25 const std::string&
name ) :
38 return StatusCode::SUCCESS;
48 ATH_MSG_DEBUG(
"Selecting offline tracks matched to an offline " << m_objectType.value() );
50 ISvcLocator* svcLoc = Gaudi::svcLocator();
51 SmartIF<ITrackAnalysisDefinitionSvc> trkAnaDefSvc( svcLoc->service(
"TrkAnaDefSvc" + trkAnaColls.
anaTag() ) );
54 if( not trkAnaDefSvc->useOffline() ) {
55 ATH_MSG_DEBUG(
"Tool not enabled if offline tracks are not used." );
56 return StatusCode::SUCCESS;
60 std::vector< const xAOD::TrackParticle* > newVec;
72 if( trkAnaDefSvc->useEFTrigger() and
73 m_objectType.value().find(
"Truth") != std::string::npos ) {
90 return StatusCode::SUCCESS;
99 const std::vector< const xAOD::TruthParticle* >& truthVec )
const {
102 if( m_objectType.value().find(
"Electron") != std::string::npos ) {
105 offTrack, m_objectQuality.value() );
107 if( not ele )
return false;
110 " matches with " << m_objectQuality.value() <<
111 " Electron with transverse energy = " <<
eT( *ele ) );
117 if( m_objectType.value().find(
"Muon") != std::string::npos ) {
119 offTrack, m_objectQuality.value() );
121 if( not
mu )
return false;
124 " matches with " << m_objectQuality.value() <<
125 " Muon with transverse energy = " <<
eT( *
mu ) );
131 if( m_objectType.value().find(
"Tau") != std::string::npos ) {
134 offTrack, m_tauNprongs.value(),
135 m_tauType.value(), m_objectQuality.value() );
137 if( not tau )
return false;
140 " matches with " << m_objectQuality.value() <<
141 " hadronic " << m_tauNprongs.value() <<
"prong " <<
142 m_tauType.value() <<
" Tau with transverse energy = " <<
149 if( m_objectType.value().find(
"Truth") != std::string::npos ) {
152 offTrack, m_truthProbCut.value() );
154 if( not truth )
return false;
156 if( truthVec.empty() ) {
162 " matches with truth particle with pt = " <<
pT( *truth ) );
165 if(
std::find( truthVec.begin(), truthVec.end(),
166 truth ) == truthVec.end() )
return false;
172 " is not supported for track-object selection" );