ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 23 of file ClusterToTruthAssociation.h.

Constructor & Destructor Documentation

◆ HepMcLinkToTruthParticleMap()

HepMcLinkToTruthParticleMap::HepMcLinkToTruthParticleMap ( const xAODTruthParticleLinkVector truth_particle_links)
inline

Definition at line 28 of file ClusterToTruthAssociation.h.

29  : m_truthParticleLinks(&truth_particle_links)
30  {}

Member Function Documentation

◆ getTruthParticle()

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

Definition at line 34 of file ClusterToTruthAssociation.h.

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

◆ isHardScatter()

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

Definition at line 43 of file ClusterToTruthAssociation.h.

43  {
44  return deposit.first.eventIndex()==0;
45  }

◆ operator bool()

HepMcLinkToTruthParticleMap::operator bool ( ) const
inline

Definition at line 31 of file ClusterToTruthAssociation.h.

31  {
32  return true;
33  }

Member Data Documentation

◆ m_truthParticleLinks

const xAODTruthParticleLinkVector* HepMcLinkToTruthParticleMap::m_truthParticleLinks
private

Definition at line 26 of file ClusterToTruthAssociation.h.


The documentation for this class was generated from the following file:
xAODTruthParticleLinkVector::find
ElementLink< xAOD::TruthParticleContainer > find(const HepMcParticleLink &hepMCLink) const
Definition: xAODTruthParticleLink.h:28
HepMcLinkToTruthParticleMap::m_truthParticleLinks
const xAODTruthParticleLinkVector * m_truthParticleLinks
Definition: ClusterToTruthAssociation.h:26