![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
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() );
51 ISvcLocator* svcLoc = Gaudi::svcLocator();
52 ATH_CHECK( svcLoc->service(
"TrkAnaDefSvc" + trkAnaColls.
anaTag(), trkAnaDefSvc ) );
55 ATH_MSG_DEBUG(
"Tool not enabled if offline tracks are not used." );
56 return StatusCode::SUCCESS;
60 std::vector< const xAOD::TrackParticle* > newVec;
63 if(
accept( *thisTrack ) ) newVec.push_back( thisTrack );
74 return StatusCode::SUCCESS;
85 if( m_objectType.value().find(
"Electron") != std::string::npos ) {
88 offTrack, m_objectQuality.value() );
90 if( not ele )
return false;
93 " matches with " << m_objectQuality.value() <<
94 " Electron with transverse energy = " <<
eT( *ele ) );
100 if( m_objectType.value().find(
"Muon") != std::string::npos ) {
102 offTrack, m_objectQuality.value() );
104 if( not
mu )
return false;
107 " matches with " << m_objectQuality.value() <<
108 " Muon with transverse energy = " <<
eT( *
mu ) );
114 if( m_objectType.value().find(
"Tau") != std::string::npos ) {
117 offTrack, m_tauNprongs.value(),
118 m_tauType.value(), m_objectQuality.value() );
120 if( not tau )
return false;
123 " matches with " << m_objectQuality.value() <<
124 " hadronic " << m_tauNprongs.value() <<
"prong " <<
125 m_tauType.value() <<
" Tau with transverse energy = " <<
132 if( m_objectType.value().find(
"Truth") != std::string::npos ) {
135 offTrack, m_truthProbCut.value() );
137 if( not truth )
return false;
140 " matches with truth particle with pt = " <<
pT( *truth ) );
146 " is not supported for track-object selection" );
virtual bool useOffline() const =0
const xAOD::TauJet * getLinkedTau(const xAOD::TrackParticle &track, const int requiredNtracks, const std::string &type, const std::string &quality)
getLinkedTau
const xAOD::TruthParticle * getLinkedTruth(const xAOD::TrackParticle &track, const float truthProbCut)
getLinkedTruth
StatusCode accept(const xAOD::Muon *mu)
const xAOD::Electron * getLinkedElectron(const xAOD::TrackParticle &track, const std::string &quality)
getLinkedElectron
Class to hold for each event collections needed in the TrkAnalsis.
StatusCode fillOfflTrackVec(const std::vector< const xAOD::TrackParticle * > &vec, Stage stage=FULL)
Offline tracks.
Utility methods to access track/truth particles parmeters in a consitent way in this package.
float eT(const U &p)
Accessor utility function for getting the value of Tranverse energy.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
Class describing a tau jet.
const xAOD::Muon * getLinkedMuon(const xAOD::TrackParticle &track, const std::string &quality)
getLinkedMuon
float pT(const U &p)
Accessor utility function for getting the value of pT.
const std::vector< const xAOD::TrackParticle * > & offlTrackVec(Stage stage=FULL)
#define ATH_MSG_WARNING(x)
std::string printInfo(Stage stage=FULL) const
print Information about tracks in the collection(s)
Class describing a TrackParticle.
Utility methods to access offline object decorations.
const std::string & anaTag()
— Getter methods —