|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef INDETPHYSVALMONITORING_TRACKTRUTHLOOKUP_H
6 #define INDETPHYSVALMONITORING_TRACKTRUTHLOOKUP_H 1
15 #include <unordered_map>
82 cache(trackParticles, truthParticles);
86 const std::vector<const xAOD::TruthParticle*>* truthParticlesVec) {
87 cache(trackParticles, truthParticlesVec);
103 const std::vector<const xAOD::TruthParticle*>* truthParticlesVec);
145 void cacheTruth(
const std::vector<const xAOD::TruthParticle*>* truthParticlesVec);
159 #endif // > !INDETPHYSVALMONITORING_TRACKTRUTHLOOKUP_H
std::unordered_map< const xAOD::TruthParticle *, std::vector< const xAOD::TrackParticle * > > m_mapTruth
Class to retrieve associated truth from a track, implementing a cached response.
const xAOD::TruthParticle * getTruth(const xAOD::TrackParticle *track) const
Accessor to get the unique xAOD::TruthParticle associated with 'track', or a nullptr is none is assoc...
bool contains(const xAOD::TrackParticle *track) const
Returns true if the Lookup contains the pointer 'track'.
Class for providing fast lookup of linked tracks and truth particles.
void clear()
Clears the contents of the unordered map data members.
TrackTruthLookup()
Constructor(s).
Class describing a truth particle in the MC record.
std::vector< const xAOD::TrackParticle * > getTracks(const xAOD::TruthParticle *truth) const
Accessor to get the vector of xAOD::TrackParticles associated with 'truth', possibly empty if none is...
void cache(const xAOD::TrackParticleContainer *trackParticles, const std::vector< const xAOD::TruthParticle * > *truthParticlesVec)
Cache using a vector of TruthParticles, for compatibility with datatype returned from the xAOD::Truth...
TrackTruthLookup(const xAOD::TrackParticleContainer *trackParticles, const xAOD::TruthParticleContainer *truthParticles)
TrackTruthLookup(const xAOD::TrackParticleContainer *trackParticles, const std::vector< const xAOD::TruthParticle * > *truthParticlesVec)
~TrackTruthLookup()
Destructor.
std::unordered_map< const xAOD::TrackParticle *, const xAOD::TruthParticle * > m_mapTrack
Data member(s).
Class describing a TrackParticle.
void cacheTruth(const xAOD::TruthParticleContainer *truthParticles)
void cacheTracks(const xAOD::TrackParticleContainer *trackParticles)
bool contains(const xAOD::TruthParticle *truth) const
Returns true if the Lookup contains the pointer 'truth'.