]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TGeant4/TG4SteppingAction.h
Example macro corrected
[u/mrichter/AliRoot.git] / TGeant4 / TG4SteppingAction.h
1 // $Id$
2 // Category: event
3 //
4 // Class that ensures additional call to sensitive detector
5 // when track crosses geometrical boundary.
6
7 #ifndef TG4_STEPPING_ACTION_H
8 #define TG4_STEPPING_ACTION_H
9
10 #include <G4UserSteppingAction.hh>
11
12 #include <globals.hh>
13
14 class G4Track;
15 class G4Step;
16
17 class TG4SteppingAction : public G4UserSteppingAction 
18 {
19   enum { 
20     kMaxNofSteps = 30000,
21     kMaxNofLoopSteps = 5
22   };
23
24   public:
25     TG4SteppingAction();
26     // --> protected
27     // TG4SteppingAction(const TG4SteppingAction& right);
28     virtual ~TG4SteppingAction();
29    
30     // methods
31     virtual void SteppingAction(const G4Step* step) {;}
32                   // the following method should not
33                   // be overwritten in a derived class
34     virtual void UserSteppingAction(const G4Step* step);
35
36     // set methods
37     void SetLoopVerboseLevel(G4int level);
38     void SetMaxNofSteps(G4int number);
39
40     // get methods
41     G4int GetLoopVerboseLevel() const;
42     G4int GetMaxNofSteps() const;
43
44   protected:
45     TG4SteppingAction(const TG4SteppingAction& right);
46
47     // operators
48     TG4SteppingAction& operator=(const TG4SteppingAction& right);
49     
50     // methods
51     void PrintTrackInfo(const G4Track* track) const;
52
53     // data members
54     G4int  fMaxNofSteps;          //max number of steps allowed
55     G4int  fStandardVerboseLevel; //standard tracking verbose level
56     G4int  fLoopVerboseLevel;     //tracking verbose level                                           //for looping particles
57                                   //for looping particles
58     G4int  fLoopStepCounter;      //loop steps counter    
59 };
60
61 // inline methods
62
63 inline void TG4SteppingAction::SetLoopVerboseLevel(G4int level)
64 { fLoopVerboseLevel = level; }
65
66 inline void TG4SteppingAction::SetMaxNofSteps(G4int number)
67 { fMaxNofSteps = number; }
68
69 inline G4int TG4SteppingAction::GetMaxNofSteps() const
70 { return fMaxNofSteps; }
71
72 inline G4int TG4SteppingAction::GetLoopVerboseLevel() const
73 { return fLoopVerboseLevel; }
74
75 #endif //TG4_STEPPING_ACTION_H