|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
13 #ifndef DDG4_GEANT4TRACKINGACTION_H
14 #define DDG4_GEANT4TRACKINGACTION_H
18 #include <G4VUserTrackInformation.hh>
20 class G4TrackingManager;
30 class Geant4TrackInformation;
31 class Geant4TrackingAction;
32 class Geant4SharedTrackingAction;
33 class Geant4TrackingActionSequence;
57 void mark(
const G4Track* track)
const;
59 virtual void begin(
const G4Track* track);
61 virtual void end(
const G4Track* track);
94 virtual void begin(
const G4Track* track)
override;
96 virtual void end(
const G4Track* track)
override;
143 template <
typename Q,
typename T>
149 template <
typename Q,
typename T>
155 template <
typename Q,
typename T>
161 template <
typename Q,
typename T>
169 virtual void begin(
const G4Track* track);
171 virtual void end(
const G4Track* track);
176 #endif // DDG4_GEANT4TRACKINGACTION_H
Geant4TrackingAction * m_action
Reference to the shared action.
Implementation of the Geant4 shared track action.
virtual void end(const G4Track *track)
Post-tracking action callback.
void adopt(Geant4TrackingAction *action)
Add an actor responding to all callbacks. Sequence takes ownership.
virtual void begin(const G4Track *track)
Pre-track action callback.
DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4TrackingActionSequence)
Define standard assignments and constructors.
Geant4Context * m_context
Reference to the Geant4 context.
void add(const Callback &cb, Location where)
Generically Add a new callback to the sequence depending on the location arguments.
void callAtBegin(Q *p, void(T::*f)(const G4Track *), CallbackSequence::Location where=CallbackSequence::END)
Register Pre-track action callback.
virtual void begin(const G4Track *track)
Pre-tracking action callback.
void callAtFinal(Q *p, void(T::*f)(const G4Track *), CallbackSequence::Location where=CallbackSequence::END)
Register Post-track action callback.
Concrete implementation of the Geant4 tracking action sequence.
Geant4TrackingAction * get(const std::string &name) const
Get an action by name.
virtual void end(const G4Track *track)
Post-track action callback.
virtual void configureFiber(Geant4Context *thread_context) override
Set or update client for the use in a new thread fiber.
Definition of an actor on sequences of callbacks.
DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4SharedTrackingAction)
Define standard assignments and constructors.
virtual void end(const G4Track *track) override
End-of-track callback.
Geant4TrackingAction(Geant4Context *context, const std::string &name="")
Standard constructor.
virtual ~Geant4SharedTrackingAction()
Default destructor.
Geant4SharedTrackingAction(Geant4Context *context, const std::string &nam)
Standard constructor.
virtual void use(Geant4TrackingAction *action)
Underlying object to be used during the execution of this thread.
void callUpFront(Q *p, void(T::*f)(const G4Track *), CallbackSequence::Location where=CallbackSequence::END)
Register Pre-track action callback before anything else.
Default base class for all Geant 4 actions and derivates thereof.
virtual ~Geant4TrackingAction()
Default destructor.
const std::string & name() const
Access name of the action.
G4TrackingManager * trackMgr() const
Access the Geant4 tracking manager. Only use between tracking pre- and post action.
virtual void configureFiber(Geant4Context *thread_context) override
Set or update client for the use in a new thread fiber.
virtual ~Geant4TrackingActionSequence()
Default destructor.
virtual void begin(const G4Track *track) override
Begin-of-track callback.
Default base class for all geant 4 tracking actions used in DDG4.
CallbackSequence m_begin
Callback sequence for pre tracking action.
CallbackSequence m_front
Callback sequence for pre tracking action.
CallbackSequence m_end
Callback sequence for post tracking action.
Actors< Geant4TrackingAction > m_actors
The list of action objects to be called.
DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4TrackingAction)
Define standard assignments and constructors.
Namespace for the AIDA detector description toolkit.
CallbackSequence m_final
Callback sequence for pre tracking action.
Geant4TrackingActionSequence(Geant4Context *context, const std::string &name)
Standard constructor.
Actor class to manipulate action groups.
G4TrackingManager * trackMgr() const
Access the tracking manager.
virtual void updateContext(Geant4Context *ctxt) override
Set or update client context.
Geant4SharedTrackingAction shared_type
Generic context to extend user, run and event information.
Geant4Context * context() const
Access the context.
void mark(const G4Track *track) const
Mark the track to be kept for MC truth propagation.
void callAtEnd(Q *p, void(T::*f)(const G4Track *), CallbackSequence::Location where=CallbackSequence::END)
Register Post-track action callback.