]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliSteppingAction.h
updated the default version of START to 1
[u/mrichter/AliRoot.git] / AliGeant4 / AliSteppingAction.h
1 // $Id$
2 // Category: event
3 //
4 // Class for detecting and stopping looping particles
5 // or particles that reached maximal number of steps.
6
7 #ifndef ALI_STEPPING_ACTION_H
8 #define ALI_STEPPING_ACTION_H
9
10 #include "TG4SteppingAction.h"
11
12 #include <G4ThreeVector.hh>
13 #include <globals.hh>
14
15 class AliSteppingActionMessenger;
16
17 class G4Track;
18
19 class AliSteppingAction : public TG4SteppingAction
20 {
21   enum { 
22     kCheckNofSteps = 100,
23     kMaxNofLoopSteps = 5,
24     kMaxNofSteps = 5000
25   };
26
27   public:
28     AliSteppingAction();
29     // protected
30     // AliSteppingAction(const AliSteppingAction& right);
31     virtual ~AliSteppingAction();
32
33     // methods
34     virtual void SteppingAction(const G4Step* step);
35     
36     // set methods
37     void SetLoopVerboseLevel(G4int level);
38     
39     // get methods
40     G4int GetLoopVerboseLevel() const;
41
42   protected:
43     AliSteppingAction(const AliSteppingAction& right);
44
45     // operators
46     AliSteppingAction& operator=(const AliSteppingAction& right);
47
48   private:
49     // methods
50     void PrintTrackInfo(const G4Track* track) const;
51   
52     // static data members
53     static const G4double fgkTolerance;    //tolerance used in detecting 
54                                            //of looping particles
55
56     // data members
57     G4ThreeVector   fKeptStepPoint;        //kept step point
58     G4int           fLoopVerboseLevel;     //tracking verbose level
59                                            //for looping particles
60     G4int           fStandardVerboseLevel; //standard tracking verbose level
61     G4int           fLoopStepCounter;      //loop steps counter
62     AliSteppingActionMessenger*  fMessenger;  //messenger
63 };
64
65 // inline methods
66
67 inline void AliSteppingAction::SetLoopVerboseLevel(G4int level)
68 { fLoopVerboseLevel = level; }
69
70 inline G4int AliSteppingAction::GetLoopVerboseLevel() const
71 { return fLoopVerboseLevel; }
72
73 #endif //ALI_STEPPING_ACTION_H
74