ATLAS Offline Software
Loading...
Searching...
No Matches
AtlasG4SyncEventUserInfo Class Reference

#include <AtlasG4SyncEventUserInfo.h>

Inheritance diagram for AtlasG4SyncEventUserInfo:
Collaboration diagram for AtlasG4SyncEventUserInfo:

Public Types

using EventFactoryFunction = std::function<StatusCode(G4Event&, std::unique_ptr<AtlasG4SyncEventUserInfo>)>
using SPSyncInterface = std::shared_ptr<G4EventSynchronizationInterface>

Public Member Functions

 AtlasG4SyncEventUserInfo (CLHEP::HepRandomEngine *, EventFactoryFunction &&, const EventContext &)
event_number_t AthenaEventID () const
CLHEP::HepRandomEngine * HepRandomEngine ()
EventFactoryFunction EventFactory () const
SPSyncInterface SyncInterface () const
HepMC::GenEventGetHepMCEvent ()
 return a pointer to the HepMC::GenEvent used to create the G4Event.
void SetHepMCEvent (HepMC::GenEvent *)
 set m_theEvent, the pointer to the HepMC::GenEvent used to create the G4Event.
int GetLastProcessedTrackID () const
 return the value of G4Track::GetTrackID() for the last G4Step processed by a CaloCalibrationHit Sensitive Detector.
void SetLastProcessedTrackID (int trackID)
 record the value of G4Track::GetTrackID() for the current G4Step.
int GetLastProcessedStep () const
 return the value of the G4Track::GetCurrentStepNumber() for the last G4Step processed by a CaloCalibrationHit Sensitive Detector.
void SetLastProcessedStep (int stepNumber)
 record value of the G4Track::GetCurrentStepNumber() for the current G4Step.
std::shared_ptr< HitCollectionMapGetHitCollectionMap () const
 Get the HitCollectionMap object with shared ownership.
void SetHitCollectionMap (std::shared_ptr< HitCollectionMap > hitCollections)
 Set the HitCollectionMap object.
const EventContext & GetEventContext () const
IProxyDictGetEventStore ()
void Print () const

Static Public Member Functions

static AtlasG4EventUserInfoGetEventUserInfo ()

Private Attributes

CLHEP::HepRandomEngine * m_rng_engine {nullptr}
EventFactoryFunction m_event_factory
SPSyncInterface m_sync_interface
const EventContext & m_eventContext
IProxyDictm_eventStore {}
HepMC::GenEventm_theEvent {}
std::shared_ptr< HitCollectionMapm_hitCollectionMap {std::make_shared<HitCollectionMap>()}
int m_lastProcessedTrackID {0}
int m_lastProcessedStep {0}

Detailed Description

Definition at line 52 of file AtlasG4SyncEventUserInfo.h.

Member Typedef Documentation

◆ EventFactoryFunction

using AtlasG4SyncEventUserInfo::EventFactoryFunction = std::function<StatusCode(G4Event&, std::unique_ptr<AtlasG4SyncEventUserInfo>)>

Definition at line 55 of file AtlasG4SyncEventUserInfo.h.

◆ SPSyncInterface

Constructor & Destructor Documentation

◆ AtlasG4SyncEventUserInfo()

AtlasG4SyncEventUserInfo::AtlasG4SyncEventUserInfo ( CLHEP::HepRandomEngine * rng_engine,
AtlasG4SyncEventUserInfo::EventFactoryFunction && event_factory,
const EventContext & ctx )

Definition at line 14 of file AtlasG4SyncEventUserInfo.cxx.

18 , m_rng_engine(rng_engine)
19 , m_event_factory(std::move(event_factory))
20 , m_sync_interface(std::make_shared<G4EventSynchronizationInterface>())
21{
22}
AtlasG4EventUserInfo(const EventContext &ctx)
EventFactoryFunction m_event_factory
CLHEP::HepRandomEngine * m_rng_engine

Member Function Documentation

◆ AthenaEventID()

event_number_t AtlasG4SyncEventUserInfo::AthenaEventID ( ) const
inline

Definition at line 60 of file AtlasG4SyncEventUserInfo.h.

60 {
61 return GetEventContext().eventID().event_number();
62 }
const EventContext & GetEventContext() const

◆ EventFactory()

EventFactoryFunction AtlasG4SyncEventUserInfo::EventFactory ( ) const
inline

Definition at line 68 of file AtlasG4SyncEventUserInfo.h.

68 {
69 return m_event_factory;
70 }

◆ GetEventContext()

const EventContext & AtlasG4EventUserInfo::GetEventContext ( ) const
inlineinherited

Definition at line 89 of file AtlasG4EventUserInfo.h.

89{ return m_eventContext; }
const EventContext & m_eventContext

◆ GetEventStore()

IProxyDict * AtlasG4EventUserInfo::GetEventStore ( )
inlineinherited

Definition at line 91 of file AtlasG4EventUserInfo.h.

91{ return m_eventStore; }

◆ GetEventUserInfo()

AtlasG4EventUserInfo * AtlasG4EventUserInfo::GetEventUserInfo ( )
inlinestaticinherited

Definition at line 96 of file AtlasG4EventUserInfo.h.

97 {
98 // Event manager may be null in unit tests.
99 G4EventManager* eventManager = G4EventManager::GetEventManager();
100 if (!eventManager) {
101 return nullptr;
102 }
103 // User info may be null
104 return static_cast<AtlasG4EventUserInfo*>(eventManager->GetUserInformation());
105 }

◆ GetHepMCEvent()

HepMC::GenEvent * AtlasG4EventUserInfo::GetHepMCEvent ( )
inherited

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}
HepMC::GenEvent * m_theEvent

◆ GetHitCollectionMap()

std::shared_ptr< HitCollectionMap > AtlasG4EventUserInfo::GetHitCollectionMap ( ) const
inlineinherited

Get the HitCollectionMap object with shared ownership.

Geant4 deleting this UserInfo object will not delete the HitCollectionMap.

Definition at line 82 of file AtlasG4EventUserInfo.h.

82{ return m_hitCollectionMap; }
std::shared_ptr< HitCollectionMap > m_hitCollectionMap

◆ GetLastProcessedStep()

int AtlasG4EventUserInfo::GetLastProcessedStep ( ) const
inlineinherited

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 69 of file AtlasG4EventUserInfo.h.

◆ GetLastProcessedTrackID()

int AtlasG4EventUserInfo::GetLastProcessedTrackID ( ) const
inlineinherited

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 52 of file AtlasG4EventUserInfo.h.

◆ HepRandomEngine()

CLHEP::HepRandomEngine * AtlasG4SyncEventUserInfo::HepRandomEngine ( )
inline

Definition at line 64 of file AtlasG4SyncEventUserInfo.h.

64 {
65 return m_rng_engine;
66 }

◆ Print()

void AtlasG4EventUserInfo::Print ( ) const
inlineinherited

Definition at line 93 of file AtlasG4EventUserInfo.h.

93{}

◆ SetHepMCEvent()

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

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{
16}
int ev
Definition globals.cxx:25

◆ SetHitCollectionMap()

void AtlasG4EventUserInfo::SetHitCollectionMap ( std::shared_ptr< HitCollectionMap > hitCollections)
inlineinherited

Set the HitCollectionMap object.

Definition at line 87 of file AtlasG4EventUserInfo.h.

87{ m_hitCollectionMap = hitCollections; }

◆ SetLastProcessedStep()

void AtlasG4EventUserInfo::SetLastProcessedStep ( int stepNumber)
inlineinherited

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 76 of file AtlasG4EventUserInfo.h.

76{ m_lastProcessedStep = stepNumber; }

◆ SetLastProcessedTrackID()

void AtlasG4EventUserInfo::SetLastProcessedTrackID ( int trackID)
inlineinherited

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 59 of file AtlasG4EventUserInfo.h.

59{ m_lastProcessedTrackID = trackID; }

◆ SyncInterface()

SPSyncInterface AtlasG4SyncEventUserInfo::SyncInterface ( ) const
inline

Definition at line 72 of file AtlasG4SyncEventUserInfo.h.

72 {
73 return m_sync_interface;
74 }

Member Data Documentation

◆ m_event_factory

EventFactoryFunction AtlasG4SyncEventUserInfo::m_event_factory
private

Definition at line 80 of file AtlasG4SyncEventUserInfo.h.

◆ m_eventContext

const EventContext& AtlasG4EventUserInfo::m_eventContext
privateinherited

Definition at line 109 of file AtlasG4EventUserInfo.h.

◆ m_eventStore

IProxyDict* AtlasG4EventUserInfo::m_eventStore {}
privateinherited

Definition at line 110 of file AtlasG4EventUserInfo.h.

110{};

◆ m_hitCollectionMap

std::shared_ptr<HitCollectionMap> AtlasG4EventUserInfo::m_hitCollectionMap {std::make_shared<HitCollectionMap>()}
privateinherited

Definition at line 113 of file AtlasG4EventUserInfo.h.

113{std::make_shared<HitCollectionMap>()};

◆ m_lastProcessedStep

int AtlasG4EventUserInfo::m_lastProcessedStep {0}
privateinherited

Definition at line 121 of file AtlasG4EventUserInfo.h.

121{0};

◆ m_lastProcessedTrackID

int AtlasG4EventUserInfo::m_lastProcessedTrackID {0}
privateinherited

Definition at line 120 of file AtlasG4EventUserInfo.h.

120{0};

◆ m_rng_engine

CLHEP::HepRandomEngine* AtlasG4SyncEventUserInfo::m_rng_engine {nullptr}
private

Definition at line 78 of file AtlasG4SyncEventUserInfo.h.

78{nullptr};

◆ m_sync_interface

SPSyncInterface AtlasG4SyncEventUserInfo::m_sync_interface
private

Definition at line 83 of file AtlasG4SyncEventUserInfo.h.

◆ m_theEvent

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

Definition at line 111 of file AtlasG4EventUserInfo.h.

111{};

The documentation for this class was generated from the following files: