LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ExampleGeneralAction_service.hh
Go to the documentation of this file.
1 // ExampleGeneralActionService is the service that provides general actions for
2 // artg4tk.
3 // To use this action, all you need to do is put it in the services section
4 // of the configuration file, like this:
5 //
6 // services: {
7 // ...
8 // user: {
9 // ExampleGeneralActionService: {}
10 // ...
11 // }
12 // }
13 
14 // The parameter set passed in to the constructor of this object must contain
15 // the following parameters:
16 // - name (string): a name describing the action. It is highly recommended
17 // that you stick with the default name for this class.
18 // Default is 'exampleGeneral'.
19 
20 // Authors: Tasha Arvanitis, Adam Lyon
21 // Date: August 2012
22 
23 #ifndef artg4tk_pluginActions_general_ExampleGeneralAction_service_hh
24 #define artg4tk_pluginActions_general_ExampleGeneralAction_service_hh
25 
26 // Includes for exampleGeneral action service
28 #include "fhiclcpp/fwd.h"
29 
30 // Get the base class
34 
35 // Other includes
36 class G4Run;
37 class G4Step;
38 class G4Track;
39 
40 namespace artg4tk {
44  public:
46 
47  // Override preUserTrackingAction method to decide whether or not to
48  // track a given particle
49  void preUserTrackingAction(const G4Track* currTrack) override;
50 
51  // Override userSteppingAction to suspend any tracks that enter the
52  // calorimeter.
53  void userSteppingAction(const G4Step* theStep) override;
54 
55  // Override the beginOfRunAction method to initialize the random number
56  // store.
57  void beginOfRunAction(const G4Run* currentRun) override;
58  };
59 } // namespace artg4tk
60 
62 
63 #endif /* artg4tk_pluginActions_general_ExampleGeneralAction_service_hh */
void beginOfRunAction(const G4Run *currentRun) override
ExampleGeneralActionService(fhicl::ParameterSet const &)
#define DECLARE_ART_SERVICE(svc, scope)
void userSteppingAction(const G4Step *theStep) override
void preUserTrackingAction(const G4Track *currTrack) override