10#include "G4EventManager.hh"
25 int secondarySavingLevel,
int subDetVolLevel)
50 (G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetUserInformation());
60 ATH_MSG_DEBUG(
"Preparing an AtlasTrajectory for saving truth");
67 auto trkMgr = G4EventManager::GetEventManager()->GetTrackingManager();
69 trkMgr->SetStoreTrajectory(
true);
70 trkMgr->SetTrajectory(trajectory);
83 G4EventManager::GetEventManager()->GetTrackingManager()->
84 SetStoreTrajectory(
false);
void setLevel(MSG::Level lvl)
Change the current logging level.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
This class is attached to G4Event objects as UserInformation.
void SetCurrentPrimaryGenParticle(HepMC::ConstGenParticlePtr p)
set m_currentPrimaryGenParticle, the pointer to the HepMC::GenParticle used to create the current G4P...
void SetCurrentGenParticle(HepMC::GenParticlePtr p)
set m_currentGenParticle, the pointer to the GenParticle corresponding to the current G4Track.
Class to store G4 trajectory information.
AthenaTrackingAction(MSG::Level lvl, int secondarySavingLevel, int subDetVolLevel)
Constructor.
int m_subDetVolLevel
The level in the G4 volume hierarchy at which can we find the sub-detector name.
virtual void PreUserTrackingAction(const G4Track *) override final
Called before tracking a new particle.
virtual void PostUserTrackingAction(const G4Track *) override final
Called after tracking a particle.
int m_secondarySavingLevel
The saving level for secondaries.
TrackInformation * GetTrackInformation()
bool IsRegisteredSecondary() const
GenParticle * GenParticlePtr