Class Reference for E1039 Core & Analysis Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PHG4SteppingAction.h
Go to the documentation of this file.
1 #ifndef PHG4SteppingAction_h
2 #define PHG4SteppingAction_h
3 
4 #include <map>
5 #include <set>
6 #include <string>
7 
8 class G4Step;
9 class PHCompositeNode;
10 class PHG4Hit;
11 
13 {
14 
15  public:
16  PHG4SteppingAction( const int i = 0 ):
17  verbosity(i),
18  name("NONAME")
19  {}
20 
22  {}
23 
25 
30  virtual bool UserSteppingAction(const G4Step* step, bool was_used ) = 0;
31 
32  virtual void Verbosity(const int i) {verbosity = i;}
33  int Verbosity() const {return verbosity;}
34 
35  virtual int Init() {return 0;}
36 
38  virtual double GetScintLightYield(const G4Step* step);
39 
41  virtual double GetVisibleEnergyDeposition(const G4Step* step);
42 
44  virtual void StoreLocalCoordinate(PHG4Hit * hit, const G4Step* step, const bool do_prepoint, const bool do_postpoint);
45 
46  virtual void SetInterfacePointers( PHCompositeNode* ) {return;}
47 
48  virtual void Print(const std::string &what) const {return;}
49 
50  void SetOpt(const std::string &name, const int i) {opt_int[name] = i;}
51  bool IntOptExist(const std::string &name);
52  int GetIntOpt(const std::string &name);
53  std::string GetName() const {return name;}
54  protected:
55  int verbosity;
56  std::string name;
57 
58  private:
59  std::set<std::string> _ScintLightYieldMissingMaterial;
60  std::map<std::string, int> opt_int;
61 
62 };
63 
64 
65 #endif
void SetOpt(const std::string &name, const int i)
bool IntOptExist(const std::string &name)
PHG4SteppingAction(const int i=0)
virtual double GetVisibleEnergyDeposition(const G4Step *step)
get amount of energy that can make scintillation light, in Unit of GeV.
virtual double GetScintLightYield(const G4Step *step)
get scintillation photon count. It require a custom set SCINTILLATIONYIELD property to work
virtual void Verbosity(const int i)
int GetIntOpt(const std::string &name)
std::string GetName() const
virtual void Print(const std::string &what) const
virtual void SetInterfacePointers(PHCompositeNode *)
virtual void StoreLocalCoordinate(PHG4Hit *hit, const G4Step *step, const bool do_prepoint, const bool do_postpoint)
Extract local coordinate of the hit and save to PHG4Hit.
virtual bool UserSteppingAction(const G4Step *step, bool was_used)=0
stepping action. This defines processing of a single step in a given volume