ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
PrimaryParticleInformation Class Reference

This class is attached to G4PrimaryParticle objects as UserInformation. The member variable m_theParticle holds a pointer to the HepMC::GenParticle which was used to create the G4PrimaryParticle. Tthe member variable m_theISFParticle holds a pointer to the ISFParticle used to create the G4PrimaryParticle. (See ISF::InputConverter::getG4PrimaryParticle().) The behaviour is slightly different inside and outside ISF: More...

#include <PrimaryParticleInformation.h>

Inheritance diagram for PrimaryParticleInformation:
Collaboration diagram for PrimaryParticleInformation:

Public Member Functions

 PrimaryParticleInformation ()
 
 PrimaryParticleInformation (HepMC::GenParticlePtr p, ISF::ISFParticle *isp=nullptr)
 
HepMC::ConstGenParticlePtr GetHepMCParticle () const
 return a pointer to the GenParticle used to create the G4PrimaryParticle More...
 
HepMC::GenParticlePtr GetHepMCParticle ()
 
int GetRegenerationNr ()
 return the number of times the particle represented by the G4PrimaryParticle has undergone a non-destructive interaction that was recorded in the HepMC::GenEvent. More...
 
void SetRegenerationNr (int i)
 update the number of times the particle represented by the G4PrimaryParticle has undergone a non-destructive interaction that was recorded in the HepMC::GenEvent. More...
 
const ISF::ISFParticleGetISFParticle () const
 return a pointer to the ISFParticle used to create the G4PrimaryParticle More...
 
ISF::ISFParticleGetISFParticle ()
 
void SetISFParticle (ISF::ISFParticle *isp)
 
int GetParticleBarcode () const
 
int GetParticleUniqueID () const
 
void Print () const
 

Private Attributes

HepMC::GenParticlePtr m_theParticle {}
 
ISF::ISFParticlem_theISFParticle {}
 
int m_regenerationNr {0}
 
int m_barcode ATLAS_THREAD_SAFE = HepMC::INVALID_PARTICLE_BARCODE
 
int m_uniqueID ATLAS_THREAD_SAFE = HepMC::INVALID_PARTICLE_BARCODE
 

Detailed Description

This class is attached to G4PrimaryParticle objects as UserInformation. The member variable m_theParticle holds a pointer to the HepMC::GenParticle which was used to create the G4PrimaryParticle. Tthe member variable m_theISFParticle holds a pointer to the ISFParticle used to create the G4PrimaryParticle. (See ISF::InputConverter::getG4PrimaryParticle().) The behaviour is slightly different inside and outside ISF:

Definition at line 39 of file PrimaryParticleInformation.h.

Constructor & Destructor Documentation

◆ PrimaryParticleInformation() [1/2]

PrimaryParticleInformation::PrimaryParticleInformation ( )

Definition at line 8 of file PrimaryParticleInformation.cxx.

9 {
10 }

◆ PrimaryParticleInformation() [2/2]

PrimaryParticleInformation::PrimaryParticleInformation ( HepMC::GenParticlePtr  p,
ISF::ISFParticle isp = nullptr 
)

Definition at line 12 of file PrimaryParticleInformation.cxx.

13  : m_theParticle(p)
14  , m_theISFParticle(isp)
15 {
16 }

Member Function Documentation

◆ GetHepMCParticle() [1/2]

HepMC::GenParticlePtr PrimaryParticleInformation::GetHepMCParticle ( )
inline

Definition at line 48 of file PrimaryParticleInformation.h.

48 { return m_theParticle; }

◆ GetHepMCParticle() [2/2]

HepMC::ConstGenParticlePtr PrimaryParticleInformation::GetHepMCParticle ( ) const
inline

return a pointer to the GenParticle used to create the G4PrimaryParticle

Definition at line 47 of file PrimaryParticleInformation.h.

47 { return m_theParticle; }

◆ GetISFParticle() [1/2]

ISF::ISFParticle* PrimaryParticleInformation::GetISFParticle ( )
inline

Definition at line 67 of file PrimaryParticleInformation.h.

67 { return m_theISFParticle; }

◆ GetISFParticle() [2/2]

const ISF::ISFParticle* PrimaryParticleInformation::GetISFParticle ( ) const
inline

return a pointer to the ISFParticle used to create the G4PrimaryParticle

Definition at line 66 of file PrimaryParticleInformation.h.

66 { return m_theISFParticle; }

◆ GetParticleBarcode()

int PrimaryParticleInformation::GetParticleBarcode ( ) const

Definition at line 18 of file PrimaryParticleInformation.cxx.

19 {
20  if (m_barcode != HepMC::INVALID_PARTICLE_BARCODE) return m_barcode;
21  if (m_theParticle) {
22  m_barcode = HepMC::barcode(m_theParticle);
23  return m_barcode;
24  }
25  return 0;
26 }

◆ GetParticleUniqueID()

int PrimaryParticleInformation::GetParticleUniqueID ( ) const

Definition at line 28 of file PrimaryParticleInformation.cxx.

29 {
30  if (m_uniqueID != HepMC::INVALID_PARTICLE_BARCODE) return m_uniqueID;
31  if (m_theParticle) {
33  m_uniqueID = HepMC::uniqueID(particle);
34  return m_uniqueID;
35  }
36  return 0;
37 }

◆ GetRegenerationNr()

int PrimaryParticleInformation::GetRegenerationNr ( )
inline

return the number of times the particle represented by the G4PrimaryParticle has undergone a non-destructive interaction that was recorded in the HepMC::GenEvent.

Definition at line 55 of file PrimaryParticleInformation.h.

55 {return m_regenerationNr;}

◆ Print()

void PrimaryParticleInformation::Print ( ) const
inline

Definition at line 72 of file PrimaryParticleInformation.h.

72 {}

◆ SetISFParticle()

void PrimaryParticleInformation::SetISFParticle ( ISF::ISFParticle isp)

Definition at line 39 of file PrimaryParticleInformation.cxx.

40 {
42 }

◆ SetRegenerationNr()

void PrimaryParticleInformation::SetRegenerationNr ( int  i)
inline

update the number of times the particle represented by the G4PrimaryParticle has undergone a non-destructive interaction that was recorded in the HepMC::GenEvent.

Definition at line 61 of file PrimaryParticleInformation.h.

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

int m_barcode PrimaryParticleInformation::ATLAS_THREAD_SAFE = HepMC::INVALID_PARTICLE_BARCODE
mutableprivate

Definition at line 78 of file PrimaryParticleInformation.h.

◆ ATLAS_THREAD_SAFE [2/2]

int m_uniqueID PrimaryParticleInformation::ATLAS_THREAD_SAFE = HepMC::INVALID_PARTICLE_BARCODE
mutableprivate

Definition at line 79 of file PrimaryParticleInformation.h.

◆ m_regenerationNr

int PrimaryParticleInformation::m_regenerationNr {0}
private

Definition at line 77 of file PrimaryParticleInformation.h.

◆ m_theISFParticle

ISF::ISFParticle* PrimaryParticleInformation::m_theISFParticle {}
private

Definition at line 75 of file PrimaryParticleInformation.h.

◆ m_theParticle

HepMC::GenParticlePtr PrimaryParticleInformation::m_theParticle {}
private

Definition at line 74 of file PrimaryParticleInformation.h.


The documentation for this class was generated from the following files:
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
PrimaryParticleInformation::m_theParticle
HepMC::GenParticlePtr m_theParticle
Definition: PrimaryParticleInformation.h:74
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
PrimaryParticleInformation::m_theISFParticle
ISF::ISFParticle * m_theISFParticle
Definition: PrimaryParticleInformation.h:75
HepMC::INVALID_PARTICLE_BARCODE
constexpr int INVALID_PARTICLE_BARCODE
Definition: MagicNumbers.h:51
lumiFormat.i
int i
Definition: lumiFormat.py:92
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:113
PrimaryParticleInformation::m_regenerationNr
int m_regenerationNr
Definition: PrimaryParticleInformation.h:77
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38