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 22 of file ClusterToTruthAssociation.h.

Constructor & Destructor Documentation

◆ HepMcLinkToTruthParticleMap()

HepMcLinkToTruthParticleMap::HepMcLinkToTruthParticleMap ( const xAODTruthParticleLinkVector truth_particle_links)
inline

Definition at line 27 of file ClusterToTruthAssociation.h.

28  : m_truthParticleLinks(&truth_particle_links)
29  {}

Member Function Documentation

◆ getTruthParticle()

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

Definition at line 33 of file ClusterToTruthAssociation.h.

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

◆ isHardScatter()

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

Definition at line 42 of file ClusterToTruthAssociation.h.

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

◆ operator bool()

HepMcLinkToTruthParticleMap::operator bool ( ) const
inline

Definition at line 30 of file ClusterToTruthAssociation.h.

30  {
31  return true;
32  }

Member Data Documentation

◆ m_truthParticleLinks

const xAODTruthParticleLinkVector* HepMcLinkToTruthParticleMap::m_truthParticleLinks
private

Definition at line 25 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:25