diff --git a/DDG4/include/DDG4/Geant4EventAction.h b/DDG4/include/DDG4/Geant4EventAction.h index 848bc44a02561555a51a8579724c87828915c3a4..c379c62b66435837afb981a0dd2ca1be7a4bf3fa 100644 --- a/DDG4/include/DDG4/Geant4EventAction.h +++ b/DDG4/include/DDG4/Geant4EventAction.h @@ -27,6 +27,12 @@ namespace DD4hep { /** @class Geant4EventAction Geant4Action.h DDG4/Geant4Action.h * * Concrete basic implementation of the Geant4 event action + * + * The EventAction is called for every event. + * During the callback all particles are created which form the + * microscopic kinematic action of the particle collision. + * This input may either origin directly from an event generator + * program or come from file. * * @author M.Frank * @version 1.0 @@ -37,7 +43,7 @@ namespace DD4hep { Geant4EventAction(Geant4Context* context, const std::string& nam); /// Default destructor virtual ~Geant4EventAction(); - /// begin-of-event callback + /// Begin-of-event callback virtual void begin(const G4Event* event); /// End-of-event callback virtual void end(const G4Event* event); @@ -46,6 +52,9 @@ namespace DD4hep { /** @class Geant4EventActionSequence Geant4Action.h DDG4/Geant4Action.h * * Concrete implementation of the Geant4 event action sequence + * The sequence dispatches the callbacks at the beginning and the and + * of an event to all registered Geant4EventAction members and all + * registered callbacks. * * @author M.Frank * @version 1.0 @@ -75,7 +84,7 @@ namespace DD4hep { } /// Add an actor responding to all callbacks. Sequence takes ownership. void adopt(Geant4EventAction* action); - /// begin-of-event callback + /// Begin-of-event callback virtual void begin(const G4Event* event); /// End-of-event callback virtual void end(const G4Event* event); diff --git a/DDG4/include/DDG4/Geant4GeneratorAction.h b/DDG4/include/DDG4/Geant4GeneratorAction.h index b4ac382871cf71bd649bdd0709bb066652f130a0..44b66aac9015a82c132eb58f2621ff04d383a9c2 100644 --- a/DDG4/include/DDG4/Geant4GeneratorAction.h +++ b/DDG4/include/DDG4/Geant4GeneratorAction.h @@ -28,6 +28,14 @@ namespace DD4hep { * * Concrete implementation of the Geant4 generator action base class * + * The Geant4GeneratorAction is called for every event. + * During the callback all particles are created which form the + * microscopic kinematic action of the particle collision. + * This input may either origin directly from an event generator program + * or come from file. + * + * The callback signature is: void operator()(G4Event* event) + * * @author M.Frank * @version 1.0 */ @@ -48,6 +56,12 @@ namespace DD4hep { * * Concrete implementation of the Geant4 generator action sequence * + * The sequence dispatches the callbacks at the beginning + * of an event to all registered Geant4GeneratorAction members and all + * registered callbacks. + * + * The callback signature is: void operator()(G4Event* event) + * * @author M.Frank * @version 1.0 */ @@ -62,7 +76,7 @@ namespace DD4hep { Geant4GeneratorActionSequence(Geant4Context* context, const std::string& name); /// Default destructor virtual ~Geant4GeneratorActionSequence(); - /// Register begin-of-run callback. Types Q and T must be polymorph! + /// Register primary particle generation callback. Types Q and T must be polymorph! template <typename Q, typename T> void call(Q* p, void (T::*f)(G4Event*)) { m_calls.add(p, f); diff --git a/DDG4/include/DDG4/Geant4RunAction.h b/DDG4/include/DDG4/Geant4RunAction.h index 42b4f0b50059937a5bc805ac8a6aacf1d8a9b110..dbf68a3558d91f197a9c065ded94988d6ac68977 100644 --- a/DDG4/include/DDG4/Geant4RunAction.h +++ b/DDG4/include/DDG4/Geant4RunAction.h @@ -11,6 +11,7 @@ // Framework include files #include "DDG4/Geant4Action.h" + // Forward declaration class G4Run; @@ -27,6 +28,11 @@ namespace DD4hep { * * Concrete basic implementation of the Geant4 run action * + * The Run Action is called once per start and end of a run. + * i.e. a series of generated events. These two callbacks + * allow clients to define run-dependent actions such as statistics + * summaries etc. + * * @author M.Frank * @version 1.0 */ @@ -36,7 +42,7 @@ namespace DD4hep { Geant4RunAction(Geant4Context* context, const std::string& nam); /// Default destructor virtual ~Geant4RunAction(); - /// begin-of-run callback + /// Begin-of-run callback virtual void begin(const G4Run* run); /// End-of-run callback virtual void end(const G4Run* run); @@ -44,7 +50,10 @@ namespace DD4hep { /** @class Geant4RunActionSequence Geant4RunAction.h DDG4/Geant4RunAction.h * - * Concrete implementation of the Geant4 run action sequence + * Concrete implementation of the Geant4 run action sequence. + * The sequence dispatches the callbacks at the beginning and the and + * of a run to all registered Geant4RunAction members and all + * registered callbacks. * * @author M.Frank * @version 1.0 @@ -74,7 +83,7 @@ namespace DD4hep { } /// Add an actor responding to all callbacks. Sequence takes ownership. void adopt(Geant4RunAction* action); - /// begin-of-run callback + /// Begin-of-run callback virtual void begin(const G4Run* run); /// End-of-run callback virtual void end(const G4Run* run); diff --git a/DDG4/include/DDG4/Geant4StackingAction.h b/DDG4/include/DDG4/Geant4StackingAction.h index 99fb35838a3500e3b1591f6927bdb03f7bbbe5bd..9ee3a1888fd52dba14d032156f7ffe6cc49487ed 100644 --- a/DDG4/include/DDG4/Geant4StackingAction.h +++ b/DDG4/include/DDG4/Geant4StackingAction.h @@ -47,6 +47,10 @@ namespace DD4hep { * * Concrete implementation of the Geant4 stacking action sequence * + * The sequence dispatches the callbacks for each stepping action + * to all registered Geant4StackingAction members and all + * registered callbacks. + * * @author M.Frank * @version 1.0 */ diff --git a/DDG4/include/DDG4/Geant4SteppingAction.h b/DDG4/include/DDG4/Geant4SteppingAction.h index db470c0494aca16b92ebf7f7f7d30b5964b84983..2603773be99840341a9cb2701c221a8996a2059c 100644 --- a/DDG4/include/DDG4/Geant4SteppingAction.h +++ b/DDG4/include/DDG4/Geant4SteppingAction.h @@ -47,6 +47,10 @@ namespace DD4hep { * * Concrete implementation of the Geant4 stepping action sequence * + * The sequence dispatches the callbacks for each stepping action + * to all registered Geant4SteppingAction members and all + * registered callbacks. + * * @author M.Frank * @version 1.0 */ diff --git a/DDG4/include/DDG4/Geant4TrackingAction.h b/DDG4/include/DDG4/Geant4TrackingAction.h index 95ccfeb0ec7a5f25f2852c4f5285a7495252447c..a896a1e63c037e567b1aa793fca50de8c41dcaf8 100644 --- a/DDG4/include/DDG4/Geant4TrackingAction.h +++ b/DDG4/include/DDG4/Geant4TrackingAction.h @@ -53,24 +53,28 @@ namespace DD4hep { /// Mark a single child of the track to be stored bool storeChild(Geant4TrackInformation* info) const; /// Pre-track action callback - virtual void begin(const G4Track* trk); + virtual void begin(const G4Track* track); /// Post-track action callback - virtual void end(const G4Track* trk); + virtual void end(const G4Track* track); }; /** @class Geant4EventActionSequence Geant4Action.h DDG4/Geant4Action.h * * Concrete implementation of the Geant4 tracking action sequence * + * The sequence dispatches the callbacks for each tracking action + * to all registered Geant4SteppingAction members and all + * registered callbacks. + * * @author M.Frank * @version 1.0 */ class Geant4TrackingActionSequence: public Geant4Action { protected: /// Callback sequence for pre tracking action - CallbackSequence m_begin; + CallbackSequence m_begin; /// Callback sequence for post tracking action - CallbackSequence m_end; + CallbackSequence m_end; /// The list of action objects to be called Actors<Geant4TrackingAction> m_actors; public: @@ -88,10 +92,10 @@ namespace DD4hep { } /// Add an actor responding to all callbacks. Sequence takes ownership. void adopt(Geant4TrackingAction* action); - /// Pre-track action callback - virtual void begin(const G4Track* trk); - /// Post-track action callback - virtual void end(const G4Track* trk); + /// Pre-tracking action callback + virtual void begin(const G4Track* track); + /// Post-tracking action callback + virtual void end(const G4Track* track); }; } // End namespace Simulation diff --git a/DDG4/src/Geant4Kernel.cpp b/DDG4/src/Geant4Kernel.cpp index 35fd0fffad551f34c95e9a781cea0687a853b20b..7c9607cd6056431c6f0a2e8e79ac64c9a295903f 100644 --- a/DDG4/src/Geant4Kernel.cpp +++ b/DDG4/src/Geant4Kernel.cpp @@ -72,9 +72,9 @@ Geant4Kernel::Geant4Kernel(LCDD& lcdd) m_context = new Geant4Context(this); m_lcdd.addExtension < Geant4Kernel > (this); - m_controlName = "/properties/"; + m_controlName = "/ddg4/"; m_control = new G4UIdirectory(m_controlName.c_str()); - m_control->SetGuidance("Property control for all Geant4 named actions"); + m_control->SetGuidance("Control for all named Geant4 actions"); InstanceCount::increment(this); }