ATLAS Offline Software
Loading...
Searching...
No Matches
HepMcLinkToTruthParticleMap Class Reference

#include <ClusterToTruthAssociation.h>

Collaboration diagram for HepMcLinkToTruthParticleMap:

Public Member Functions

 HepMcLinkToTruthParticleMap (const xAODTruthParticleLinkVector &truth_particle_links)
 operator bool () const
const xAOD::TruthParticlegetTruthParticle (const InDetSimData::Deposit &deposit)
bool isHardScatter (const InDetSimData::Deposit &deposit)

Private Attributes

const xAODTruthParticleLinkVectorm_truthParticleLinks

Detailed Description

Definition at line 26 of file ClusterToTruthAssociation.h.

Constructor & Destructor Documentation

◆ HepMcLinkToTruthParticleMap()

HepMcLinkToTruthParticleMap::HepMcLinkToTruthParticleMap ( const xAODTruthParticleLinkVector & truth_particle_links)
inline

Definition at line 31 of file ClusterToTruthAssociation.h.

32 : m_truthParticleLinks(&truth_particle_links)
33 {}
const xAODTruthParticleLinkVector * m_truthParticleLinks

Member Function Documentation

◆ getTruthParticle()

const xAOD::TruthParticle * HepMcLinkToTruthParticleMap::getTruthParticle ( const InDetSimData::Deposit & deposit)
inline

Definition at line 37 of file ClusterToTruthAssociation.h.

37 {
38 if (deposit.first.isValid()) {
39 ElementLink<xAOD::TruthParticleContainer> truth_particle_link = m_truthParticleLinks->find(deposit.first);
40 if (truth_particle_link) {
41 return *truth_particle_link;
42 }
43 }
44 return nullptr;
45 }

◆ isHardScatter()

bool HepMcLinkToTruthParticleMap::isHardScatter ( const InDetSimData::Deposit & deposit)
inline

Definition at line 46 of file ClusterToTruthAssociation.h.

46 {
47 return deposit.first.eventIndex()==0;
48 }

◆ operator bool()

HepMcLinkToTruthParticleMap::operator bool ( ) const
inline

Definition at line 34 of file ClusterToTruthAssociation.h.

34 {
35 return true;
36 }

Member Data Documentation

◆ m_truthParticleLinks

const xAODTruthParticleLinkVector* HepMcLinkToTruthParticleMap::m_truthParticleLinks
private

Definition at line 29 of file ClusterToTruthAssociation.h.


The documentation for this class was generated from the following file: