DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geant4TestActions.h
Go to the documentation of this file.
1 // $Id: $
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 #ifndef DD4HEP_DDG4_GEANT4TESTACTIONS_H
15 #define DD4HEP_DDG4_GEANT4TESTACTIONS_H
16 
17 // Framework include files
18 #include "DDG4/Geant4Handle.h"
19 #include "DDG4/Geant4Kernel.h"
21 #include "DDG4/Geant4RunAction.h"
22 #include "DDG4/Geant4EventAction.h"
26 #include "DDG4/Geant4ActionPhase.h"
28 
30 namespace DD4hep {
31 
33  namespace Simulation {
34 
36  namespace Test {
37 
39 
45  protected:
46  int m_value1;
47  double m_value2;
48  std::string m_value3;
49  std::string m_type;
50  public:
52  Geant4TestBase(Geant4Action* action, const std::string& typ);
54  virtual ~Geant4TestBase();
55  };
56 
58 
64  public:
66  Geant4TestGeneratorAction(Geant4Context* c, const std::string& n);
70  virtual void operator()(G4Event*);
71  };
72 
74 
80  public:
82  Geant4TestRunAction(Geant4Context* c, const std::string& n);
84  virtual ~Geant4TestRunAction();
86  void begin(const G4Run*);
88  void end(const G4Run*);
90  void beginEvent(const G4Event*);
92  void endEvent(const G4Event*);
93  };
94 
96 
102  public:
104  Geant4TestEventAction(Geant4Context* c, const std::string& n);
106  virtual ~Geant4TestEventAction();
108  virtual void begin(const G4Event*);
110  virtual void end(const G4Event*);
112  void beginRun(const G4Run*);
114  void endRun(const G4Run*);
115  };
116 
118 
125  public:
127  Geant4TestTrackAction(Geant4Context* c, const std::string& n);
129  virtual ~Geant4TestTrackAction();
131  virtual void begin(const G4Track*);
133  virtual void end(const G4Track*);
134  };
135 
137 
143  public:
145  Geant4TestStepAction(Geant4Context* c, const std::string& n);
147  virtual ~Geant4TestStepAction();
149  void operator()(const G4Step*, G4SteppingManager*);
150  };
151 
153 
159  protected:
161  public:
163  Geant4TestSensitive(Geant4Context* c, const std::string& n, DetElement det, LCDD& lcdd);
165  virtual ~Geant4TestSensitive();
167  virtual void begin(G4HCofThisEvent*);
169  virtual void end(G4HCofThisEvent*);
171  virtual bool process(G4Step*, G4TouchableHistory*);
172  };
173  } // End namespace Test
174  } // End namespace Simulation
175 } // End namespace DD4hep
176 
177 #endif // DD4HEP_DDG4_GEANT4TESTACTIONS_H
virtual void begin(const G4Event *)
begin-of-event callback
Example generator action doing nothing, but print.
Geant4TestSensitive(Geant4Context *c, const std::string &n, DetElement det, LCDD &lcdd)
Standard constructor with initializing arguments.
Geant4TestStepAction(Geant4Context *c, const std::string &n)
Standard constructor with initializing arguments.
virtual ~Geant4TestEventAction()
Default destructor.
Common base class for test action.
Default base class for all geant 4 tracking actions used in DDG4.
virtual bool process(G4Step *, G4TouchableHistory *)
Method for generating hit(s) using the information of G4Step object.
Concrete basic implementation of the Geant4 run action base class.
Concrete basic implementation of the Geant4 event action.
void beginRun(const G4Run *)
begin-of-run callback
Example event action doing nothing, but print.
Concrete implementation of the Geant4 stepping action sequence.
Geant4TestEventAction(Geant4Context *c, const std::string &n)
Standard constructor with initializing arguments.
virtual void begin(G4HCofThisEvent *)
Begin-of-tracking callback.
void endEvent(const G4Event *)
End-of-event callback.
Geant4TestGeneratorAction(Geant4Context *c, const std::string &n)
Standard constructor with initializing arguments.
Example stepping action doing nothing, but print.
The base class for Geant4 sensitive detector actions implemented by users.
void beginEvent(const G4Event *)
begin-of-event callback
void begin(const G4Run *)
begin-of-run callback
virtual void end(G4HCofThisEvent *)
End-of-tracking callback.
void end(const G4Run *)
End-of-run callback.
Geant4TestBase(Geant4Action *action, const std::string &typ)
Standard constructor.
Concrete implementation of the Geant4 generator action base class.
Example run action doing nothing, but print.
void endRun(const G4Run *)
End-of-run callback.
void operator()(const G4Step *, G4SteppingManager *)
User stepping callback.
virtual void operator()(G4Event *)
Callback to generate primary particles.
virtual ~Geant4TestTrackAction()
Default destructor.
Example tracking action doing nothing, but print.
Handle class describing a detector element.
Definition: Detector.h:172
Geant4TestTrackAction(Geant4Context *c, const std::string &n)
Standard constructor with initializing arguments.
virtual void end(const G4Event *)
End-of-event callback.
Generic context to extend user, run and event information.
Geant4TestRunAction(Geant4Context *c, const std::string &n)
Standard constructor with initializing arguments.
The main interface to the DD4hep detector description package.
Definition: LCDD.h:82
virtual ~Geant4TestRunAction()
Default destructor.
Example sensitve detector action doing nothing, but print.
virtual ~Geant4TestSensitive()
Default destructor.
virtual void begin(const G4Track *)
Begin-of-tracking callback.
virtual ~Geant4TestBase()
Default destructor.
virtual ~Geant4TestStepAction()
Default destructor.
Default base class for all Geant 4 actions and derivates thereof.
Definition: Geant4Action.h:91
virtual void end(const G4Track *)
End-of-tracking callback.