LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
PrimaryGeneratorActionBase.hh
Go to the documentation of this file.
1 // This file is the header for the @PrimaryGeneratorActionBase@ class.
2 
3 // A base class for Geant user primary generator action
4 
5 // @GeneratePrimaries@ - This method, which takes a pointer to a @G4Event@
6 // object, is called to create the primary particle(s) for an event. It is
7 // called once at the beginning of each event. Putting code in this method of
8 // and action object is equivalent to putting it in the @GeneratePrimaries@
9 // method of the simulation's primary generator action class.
10 
11 #ifndef artg4tk_actionBase_PrimaryGeneratorActionBase_hh
12 #define artg4tk_actionBase_PrimaryGeneratorActionBase_hh
13 
14 #include <string>
15 
17 
18 // Declarations of types we use as input parameters
19 class G4Event;
20 
21 // Everything goes in the Art G4 namespace
22 namespace artg4tk {
23 
25  public:
26  // Constructor. The derived class must call this constructor. It takes a
27  // single string for the name of the action object.
28  explicit PrimaryGeneratorActionBase(std::string name);
29 
31 
32  // h3. The interesting methods.
33  // All of these are defined to do nothing by default. Users can override
34  // them if desired, and if they're not overloaded, they do nothing.
35 
36  // Called for the generation of primaries
37  virtual void
39  {}
40  };
41 }
42 
43 #endif /* artg4tk_actionBase_PrimaryGeneratorActionBase_hh */