15 #ifndef DD4HEP_DDG4_GEANT4CONTEXT_H
16 #define DD4HEP_DDG4_GEANT4CONTEXT_H
27 class G4TrackingManager;
39 namespace Simulation {
46 class Geant4RunActionSequence;
47 class Geant4EventActionSequence;
48 class Geant4SteppingActionSequence;
49 class Geant4TrackingActionSequence;
50 class Geant4StackingActionSequence;
51 class Geant4GeneratorActionSequence;
52 class Geant4SensDetSequences;
82 operator const G4Run&()
const {
return *
m_run; }
137 operator const G4Event&()
const {
return *
m_event; }
171 #ifdef R__DICTIONARY_FILENAME
202 G4TrackingManager*
trackMgr()
const;
224 #endif // DD4HEP_DDG4_GEANT4CONTEXT_H
Concrete implementation of the Geant4 stepping action sequence.
Geant4Event & event() const
Access the geant4 event – valid only between BeginEvent() and EndEvent()!
virtual ~Geant4Event()
Default destructor.
User event context for DDG4.
Geant4Kernel & kernel() const
Access to the kernel object.
Geant4Run(const G4Run *run)
Intializing constructor.
G4TrackingManager * trackMgr() const
Access the tracking manager.
void * addExtension(void *ptr, const std::type_info &info, destruct_t dtor)
Add an extension object to the detector element.
Geant4Random & random() const
Access the random number generator.
const G4Run & run() const
Access the G4Event directly: Explicit G4Run accessor.
Concrete implementation of the Geant4 event action sequence.
Concrete implementation of the Geant4 tracking action sequence.
DD4hep::Geometry::DetElement DetElement
Geant4StackingActionSequence & stackingAction() const
Access to the main stacking action sequence from the kernel object.
Concrete implementation of the Geant4 stacking action sequence.
Class, which allows all Geant4Action derivatives to access the DDG4 kernel structures.
Geant4Run & run() const
Access the geant4 run – valid only between BeginRun() and EndRun()!
Geant4RunActionSequence & runAction() const
Access to the main run action sequence from the kernel object.
void * addExtension(void *ptr, const std::type_info &info, destruct_t dtor)
Add an extension object to the detector element.
const G4Run * m_run
Reference to the original Geant4 run object.
virtual ~Geant4Context()
Default destructor.
T * extension(bool alert=true)
Access to type safe extension object. Exception is thrown if the object is invalid.
Geant4Event(const G4Event *run, Geant4Random *rndm)
Intializing constructor.
User run context for DDG4.
const G4Event & event() const
Access the G4Event directly: Explicit G4Event accessor.
Geant4GeneratorActionSequence & generatorAction() const
Access to the main generator action sequence from the kernel object.
Concrete implementation of the Geant4 generator action sequence.
Concrete basic implementation of the Geant4 run action sequencer.
virtual ~Geant4Run()
Default destructor.
Geant4Context(Geant4Kernel *kernel)
Default constructor.
Geant4Random * m_random
Reference to the main random number generator.
void setEvent(Geant4Event *new_event)
Set the geant4 event reference.
Geant4SensDetSequences & sensitiveActions() const
Access to the sensitive detector sequences from the kernel object.
virtual G4VTrajectory * createTrajectory(const G4Track *track) const
Create a user trajectory.
void setRun(Geant4Run *new_run)
Set the geant4 run reference.
Geometry::LCDD & lcdd() const
Access to detector description.
Geant4Event * eventPtr() const
Access the geant4 event by ptr. Must be checked by clients!
Geant4EventActionSequence & eventAction() const
Access to the main event action sequence from the kernel object.
Generic context to extend user, run and event information.
void * extension(const std::type_info &info, bool alert) const
Access an existing extension object from the detector element.
void * addExtension(void *ptr, const std::type_info &info, copy_t ctor, destruct_t dtor)
Add an extension object to the detector element.
The main interface to the DD4hep detector description package.
Geant4SteppingActionSequence & steppingAction() const
Access to the main stepping action sequence from the kernel object.
Mini interface to THE random generator of the application.
void(* destruct_t)(void *)
Extensions destructor type.
T * addExtension(T *ptr, bool take_ownership=true)
Add user extension object. Ownership is transferred and object deleted at the end of the event...
Geant4SensDetSequences: class to access groups of sensitive actions.
Implementation of an object supporting arbitrary user extensions.
T * extension(bool alert=true)
Access to type safe extension object. Exception is thrown if the object is invalid.
Geant4Run * runPtr() const
Access the geant4 run by ptr. Must be checked by clients!
Geant4TrackingActionSequence & trackingAction() const
Access to the main tracking action sequence from the kernel object.
T * addExtension(T *ptr, bool take_ownership=true)
Add user extension object. Ownership is transferred!
const G4Event * m_event
Reference to the original Geant4 event object.