ATLAS Offline Software
AtlasG4EventUserInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MCTRUTH_ATLASG4EVENTUSERINFO_H
6 #define MCTRUTH_ATLASG4EVENTUSERINFO_H
7 
10 #include "G4VUserEventInformation.hh"
11 
21 class AtlasG4EventUserInfo: public G4VUserEventInformation {
22 public:
24  : G4VUserEventInformation()
25  {}
26 
31  HepMC::GenEvent* GetHepMCEvent() ;
36  void SetHepMCEvent(HepMC::GenEvent*);
37 
54 
68 
83  void SetLastProcessedTrackID(int trackID) { m_lastProcessedTrackID = trackID; }
84 
93  int GetLastProcessedStep() const { return m_lastProcessedStep; }
100  void SetLastProcessedStep(int stepNumber) { m_lastProcessedStep = stepNumber; }
101 
102  void Print() const {}
103 
104 private:
105  HepMC::GenEvent *m_theEvent{};
108  // These next two variables are used by the CaloCalibrationHit
109  // recording code as event-level flags They correspond to the Track
110  // ID and step number of the last G4Step processed by a
111  // CaloCalibrationHit SD Both are needed, because a particle might
112  // have only one step
115 };
116 
117 #endif // MCTRUTH_ATLASG4EVENTUSERINFO_H
AtlasG4EventUserInfo::m_lastProcessedTrackID
int m_lastProcessedTrackID
Definition: AtlasG4EventUserInfo.h:113
AtlasG4EventUserInfo::SetCurrentPrimaryGenParticle
void SetCurrentPrimaryGenParticle(HepMC::ConstGenParticlePtr p)
set m_currentPrimaryGenParticle, the pointer to the HepMC::GenParticle used to create the current G4P...
Definition: AtlasG4EventUserInfo.h:53
AtlasG4EventUserInfo::GetCurrentGenParticle
HepMC::ConstGenParticlePtr GetCurrentGenParticle() const
Definition: AtlasG4EventUserInfo.h:60
AtlasG4EventUserInfo::SetLastProcessedTrackID
void SetLastProcessedTrackID(int trackID)
record the value of G4Track::GetTrackID() for the current G4Step.
Definition: AtlasG4EventUserInfo.h:83
AtlasG4EventUserInfo
This class is attached to G4Event objects as UserInformation. It holds a pointer to the HepMC::GenEve...
Definition: AtlasG4EventUserInfo.h:21
AtlasG4EventUserInfo::m_currentGenParticle
HepMC::GenParticlePtr m_currentGenParticle
Definition: AtlasG4EventUserInfo.h:107
AtlasG4EventUserInfo::GetHepMCEvent
HepMC::GenEvent * GetHepMCEvent()
return a pointer to the HepMC::GenEvent used to create the G4Event.
Definition: AtlasG4EventUserInfo.cxx:8
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
AtlasG4EventUserInfo::SetLastProcessedStep
void SetLastProcessedStep(int stepNumber)
record value of the G4Track::GetCurrentStepNumber() for the current G4Step.
Definition: AtlasG4EventUserInfo.h:100
AtlasG4EventUserInfo::SetHepMCEvent
void SetHepMCEvent(HepMC::GenEvent *)
set m_theEvent, the pointer to the HepMC::GenEvent used to create the G4Event.
Definition: AtlasG4EventUserInfo.cxx:13
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
GenParticle.h
AtlasG4EventUserInfo::GetLastProcessedStep
int GetLastProcessedStep() const
return the value of the G4Track::GetCurrentStepNumber() for the last G4Step processed by a CaloCalibr...
Definition: AtlasG4EventUserInfo.h:93
AtlasG4EventUserInfo::GetLastProcessedTrackID
int GetLastProcessedTrackID() const
return the value of G4Track::GetTrackID() for the last G4Step processed by a CaloCalibrationHit Sensi...
Definition: AtlasG4EventUserInfo.h:76
AtlasG4EventUserInfo::AtlasG4EventUserInfo
AtlasG4EventUserInfo()
Definition: AtlasG4EventUserInfo.h:23
AtlasG4EventUserInfo::GetCurrentGenParticle
HepMC::GenParticlePtr GetCurrentGenParticle()
return a pointer to the GenParticle corresponding to the current G4Track (if there is one).
Definition: AtlasG4EventUserInfo.h:59
AtlasG4EventUserInfo::Print
void Print() const
Definition: AtlasG4EventUserInfo.h:102
AtlasG4EventUserInfo::m_currentPrimaryGenParticle
HepMC::ConstGenParticlePtr m_currentPrimaryGenParticle
Definition: AtlasG4EventUserInfo.h:106
GenEvent_fwd.h
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
AtlasG4EventUserInfo::GetCurrentPrimaryGenParticle
HepMC::ConstGenParticlePtr GetCurrentPrimaryGenParticle() const
return a pointer to the HepMC::GenParticle used to create the current G4PrimaryParticle.
Definition: AtlasG4EventUserInfo.h:44
AtlasG4EventUserInfo::m_theEvent
HepMC::GenEvent * m_theEvent
Definition: AtlasG4EventUserInfo.h:105
AtlasG4EventUserInfo::SetCurrentGenParticle
void SetCurrentGenParticle(HepMC::GenParticlePtr p)
set m_currentGenParticle, the pointer to the GenParticle corresponding to the current G4Track.
Definition: AtlasG4EventUserInfo.h:67
AtlasG4EventUserInfo::m_lastProcessedStep
int m_lastProcessedStep
Definition: AtlasG4EventUserInfo.h:114