LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ExampleAction.h
Go to the documentation of this file.
1 
11 
12 #ifndef ALTNS_EXAMPLEACTION_H
13 #define ALTNS_EXAMPLEACTION_H
14 
15 #include "nug4/G4Base/UserAction.h"
16 
17 // Forward declarations.
18 class G4Event;
19 class G4Track;
20 class G4Step;
21 
22 namespace altns {
23 
24  // accumulate a list of particles modeled in G4
25  class ExampleAction : public g4b::UserAction {
26 
27  public:
28  // Standard constructors and destructors;
29  ExampleAction();
30  virtual ~ExampleAction();
31 
32  void Config(fhicl::ParameterSet const& pset);
33  void PrintConfig(std::string const& opt);
34 
37  void BeginOfEventAction(const G4Event*);
38  void EndOfEventAction(const G4Event*);
39  void PreTrackingAction(const G4Track*);
40  void PostTrackingAction(const G4Track*);
41  void SteppingAction(const G4Step*);
42 
45  bool ProvidesStacking() { return true; }
47  G4ClassificationOfNewTrack StackClassifyNewTrack(const G4Track*);
48  void StackNewStage();
49  void StackPrepareNewEvent();
50 
51  private:
52 
53  double fSomeValue;
54  int fVerbose;
57 
58  int fStepMsg;
60 
61  };
62 
63 } // namespace altns
64 
65 #endif // ALTNS_EXAMPLEACTION_h
void SteppingAction(const G4Step *)
G4UserSteppingAction interface.
void PostTrackingAction(const G4Track *)
G4ClassificationOfNewTrack StackClassifyNewTrack(const G4Track *)
G4UserStackingAction interfaces.
int fVerbose
verbosity
Definition: ExampleAction.h:54
int fStepMsgMaxPerEvt
shut up about steps
Definition: ExampleAction.h:55
void Config(fhicl::ParameterSet const &pset)
Override Config() to extract any necessary parameters.
int fTrack2ndMsgMaxPerEvt
shut up about 2ndary tracks
Definition: ExampleAction.h:56
void PrintConfig(std::string const &opt)
Override PrintConfig() to print out current configuration.
see below
void BeginOfEventAction(const G4Event *)
int fTrack2ndMsg
of 2ndary track printed this evt?
Definition: ExampleAction.h:59
double fSomeValue
some user config value
Definition: ExampleAction.h:53
int fStepMsg
steps have we printed this evt?
Definition: ExampleAction.h:58
void PreTrackingAction(const G4Track *)
G4UserTrackingAction interfaces.
void EndOfEventAction(const G4Event *)