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

This class is attached to G4Event objects as UserInformation. It holds a pointer to the HepMC::GenEvent which was used to create the G4Event. NB As with VTrackInformation, the GenParticlePtr held by the AtlasG4EventUserInfo object can change during simulation (i.e. each time the track undergoes a non-destructive interaction). More...

#include <AtlasG4EventUserInfo.h>

Inheritance diagram for AtlasG4EventUserInfo:
Collaboration diagram for AtlasG4EventUserInfo:

Public Member Functions

 AtlasG4EventUserInfo ()
 
HepMC::GenEvent * GetHepMCEvent ()
 return a pointer to the HepMC::GenEvent used to create the G4Event. More...
 
void SetHepMCEvent (HepMC::GenEvent *)
 set m_theEvent, the pointer to the HepMC::GenEvent used to create the G4Event. More...
 
HepMC::ConstGenParticlePtr GetCurrentPrimaryGenParticle () const
 return a pointer to the HepMC::GenParticle used to create the current G4PrimaryParticle. More...
 
void SetCurrentPrimaryGenParticle (HepMC::ConstGenParticlePtr p)
 set m_currentPrimaryGenParticle, the pointer to the HepMC::GenParticle used to create the current G4PrimaryParticle. More...
 
HepMC::GenParticlePtr GetCurrentGenParticle ()
 return a pointer to the GenParticle corresponding to the current G4Track (if there is one). More...
 
HepMC::ConstGenParticlePtr GetCurrentGenParticle () const
 
void SetCurrentGenParticle (HepMC::GenParticlePtr p)
 set m_currentGenParticle, the pointer to the GenParticle corresponding to the current G4Track. More...
 
int GetLastProcessedTrackID () const
 return the value of G4Track::GetTrackID() for the last G4Step processed by a CaloCalibrationHit Sensitive Detector. More...
 
void SetLastProcessedTrackID (int trackID)
 record the value of G4Track::GetTrackID() for the current G4Step. More...
 
int GetLastProcessedStep () const
 return the value of the G4Track::GetCurrentStepNumber() for the last G4Step processed by a CaloCalibrationHit Sensitive Detector. More...
 
void SetLastProcessedStep (int stepNumber)
 record value of the G4Track::GetCurrentStepNumber() for the current G4Step. More...
 
void Print () const
 

Private Attributes

HepMC::GenEvent * m_theEvent {}
 
HepMC::ConstGenParticlePtr m_currentPrimaryGenParticle {}
 
HepMC::GenParticlePtr m_currentGenParticle {}
 
int m_lastProcessedTrackID {0}
 
int m_lastProcessedStep {0}
 

Detailed Description

This class is attached to G4Event objects as UserInformation. It holds a pointer to the HepMC::GenEvent which was used to create the G4Event. NB As with VTrackInformation, the GenParticlePtr held by the AtlasG4EventUserInfo object can change during simulation (i.e. each time the track undergoes a non-destructive interaction).

Definition at line 21 of file AtlasG4EventUserInfo.h.

Constructor & Destructor Documentation

◆ AtlasG4EventUserInfo()

AtlasG4EventUserInfo::AtlasG4EventUserInfo ( )
inline

Definition at line 23 of file AtlasG4EventUserInfo.h.

24  : G4VUserEventInformation()
25  {}

Member Function Documentation

◆ GetCurrentGenParticle() [1/2]

HepMC::GenParticlePtr AtlasG4EventUserInfo::GetCurrentGenParticle ( )
inline

return a pointer to the GenParticle corresponding to the current G4Track (if there is one).

TODO Rename

Definition at line 59 of file AtlasG4EventUserInfo.h.

59 {return m_currentGenParticle;}

◆ GetCurrentGenParticle() [2/2]

HepMC::ConstGenParticlePtr AtlasG4EventUserInfo::GetCurrentGenParticle ( ) const
inline

Definition at line 60 of file AtlasG4EventUserInfo.h.

60 {return m_currentGenParticle;}

◆ GetCurrentPrimaryGenParticle()

HepMC::ConstGenParticlePtr AtlasG4EventUserInfo::GetCurrentPrimaryGenParticle ( ) const
inline

return a pointer to the HepMC::GenParticle used to create the current G4PrimaryParticle.

(Used in G4VFastSimulationModel implementations and Sensitive Detectors which record CaloCalibrationHits.) TODO Rename

Definition at line 44 of file AtlasG4EventUserInfo.h.

◆ GetHepMCEvent()

HepMC::GenEvent * AtlasG4EventUserInfo::GetHepMCEvent ( )

return a pointer to the HepMC::GenEvent used to create the G4Event.

(Never called. Remove?)

Definition at line 8 of file AtlasG4EventUserInfo.cxx.

9 {
10  return m_theEvent;
11 }

◆ GetLastProcessedStep()

int AtlasG4EventUserInfo::GetLastProcessedStep ( ) const
inline

return the value of the G4Track::GetCurrentStepNumber() for the last G4Step processed by a CaloCalibrationHit Sensitive Detector.

Used in CalibrationDefaultProcessing::UserSteppingAction(...) to ensure that unprocessed G4Steps are passed to the default CaloCalibrationHit sensitive detector.

Definition at line 93 of file AtlasG4EventUserInfo.h.

93 { return m_lastProcessedStep; }

◆ GetLastProcessedTrackID()

int AtlasG4EventUserInfo::GetLastProcessedTrackID ( ) const
inline

return the value of G4Track::GetTrackID() for the last G4Step processed by a CaloCalibrationHit Sensitive Detector.

Used in CalibrationDefaultProcessing::UserSteppingAction(...) to ensure that unprocessed G4Steps are passed to the default CaloCalibrationHit sensitive detector. TODO Rename

Definition at line 76 of file AtlasG4EventUserInfo.h.

76 { return m_lastProcessedTrackID; }

◆ Print()

void AtlasG4EventUserInfo::Print ( ) const
inline

Definition at line 102 of file AtlasG4EventUserInfo.h.

102 {}

◆ SetCurrentGenParticle()

void AtlasG4EventUserInfo::SetCurrentGenParticle ( HepMC::GenParticlePtr  p)
inline

set m_currentGenParticle, the pointer to the GenParticle corresponding to the current G4Track.

This will be updated each time an interaction of the G4Track is recorded to the HepMC::GenEvent. TODO Rename

Definition at line 67 of file AtlasG4EventUserInfo.h.

67 {m_currentGenParticle = std::move(p);}

◆ SetCurrentPrimaryGenParticle()

void AtlasG4EventUserInfo::SetCurrentPrimaryGenParticle ( HepMC::ConstGenParticlePtr  p)
inline

set m_currentPrimaryGenParticle, the pointer to the HepMC::GenParticle used to create the current G4PrimaryParticle.

This pointer is updated each time there is a new G4PrimaryParticle. Called from (AthenaTrackingAction/TrackProcessorUserActionBase):: PreUserTrackingAction(...). TODO Rename

Definition at line 53 of file AtlasG4EventUserInfo.h.

◆ SetHepMCEvent()

void AtlasG4EventUserInfo::SetHepMCEvent ( HepMC::GenEvent *  ev)

set m_theEvent, the pointer to the HepMC::GenEvent used to create the G4Event.

Only called in ISF::InputConverter::ISF_to_G4Event(...).

Definition at line 13 of file AtlasG4EventUserInfo.cxx.

14 {
15  m_theEvent=ev;
16 }

◆ SetLastProcessedStep()

void AtlasG4EventUserInfo::SetLastProcessedStep ( int  stepNumber)
inline

record value of the G4Track::GetCurrentStepNumber() for the current G4Step.

Should be called by all CaloCalibrationHit Sensitive Detectors after they process a G4Step. TODO Check this is done.

Definition at line 100 of file AtlasG4EventUserInfo.h.

100 { m_lastProcessedStep = stepNumber; }

◆ SetLastProcessedTrackID()

void AtlasG4EventUserInfo::SetLastProcessedTrackID ( int  trackID)
inline

record the value of G4Track::GetTrackID() for the current G4Step.

Should be called by all CaloCalibrationHit Sensitive Detectors after they process a G4Step. TODO Check this. TODO Rename

Definition at line 83 of file AtlasG4EventUserInfo.h.

83 { m_lastProcessedTrackID = trackID; }

Member Data Documentation

◆ m_currentGenParticle

HepMC::GenParticlePtr AtlasG4EventUserInfo::m_currentGenParticle {}
private

Definition at line 107 of file AtlasG4EventUserInfo.h.

◆ m_currentPrimaryGenParticle

HepMC::ConstGenParticlePtr AtlasG4EventUserInfo::m_currentPrimaryGenParticle {}
private

Definition at line 106 of file AtlasG4EventUserInfo.h.

◆ m_lastProcessedStep

int AtlasG4EventUserInfo::m_lastProcessedStep {0}
private

Definition at line 114 of file AtlasG4EventUserInfo.h.

◆ m_lastProcessedTrackID

int AtlasG4EventUserInfo::m_lastProcessedTrackID {0}
private

Definition at line 113 of file AtlasG4EventUserInfo.h.

◆ m_theEvent

HepMC::GenEvent* AtlasG4EventUserInfo::m_theEvent {}
private

Definition at line 105 of file AtlasG4EventUserInfo.h.


The documentation for this class was generated from the following files:
AtlasG4EventUserInfo::m_lastProcessedTrackID
int m_lastProcessedTrackID
Definition: AtlasG4EventUserInfo.h:113
AtlasG4EventUserInfo::m_currentGenParticle
HepMC::GenParticlePtr m_currentGenParticle
Definition: AtlasG4EventUserInfo.h:107
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ev
int ev
Definition: globals.cxx:25
AtlasG4EventUserInfo::m_currentPrimaryGenParticle
HepMC::ConstGenParticlePtr m_currentPrimaryGenParticle
Definition: AtlasG4EventUserInfo.h:106
AtlasG4EventUserInfo::m_theEvent
HepMC::GenEvent * m_theEvent
Definition: AtlasG4EventUserInfo.h:105
AtlasG4EventUserInfo::m_lastProcessedStep
int m_lastProcessedStep
Definition: AtlasG4EventUserInfo.h:114