]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | // Category: event | |
3 | // | |
4 | // Class for detecting and stopping looping particles | |
cb7b55a2 | 5 | // or particles that reached maximal number of steps. |
676fb573 | 6 | |
7 | #ifndef ALI_STEPPING_ACTION_H | |
8 | #define ALI_STEPPING_ACTION_H | |
9 | ||
9bcb6317 | 10 | #include "TG4SteppingAction.h" |
11 | ||
676fb573 | 12 | #include <G4ThreeVector.hh> |
13 | #include <globals.hh> | |
14 | ||
15 | class AliSteppingActionMessenger; | |
16 | ||
17 | class G4Track; | |
18 | ||
9bcb6317 | 19 | class AliSteppingAction : public TG4SteppingAction |
676fb573 | 20 | { |
21 | enum { | |
22 | kCheckNofSteps = 100, | |
cb7b55a2 | 23 | kMaxNofLoopSteps = 5, |
24 | kMaxNofSteps = 5000 | |
676fb573 | 25 | }; |
26 | ||
27 | public: | |
28 | AliSteppingAction(); | |
29 | // protected | |
30 | // AliSteppingAction(const AliSteppingAction& right); | |
31 | virtual ~AliSteppingAction(); | |
32 | ||
33 | // methods | |
9bcb6317 | 34 | virtual void SteppingAction(const G4Step* step); |
676fb573 | 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 | |
c63f260d | 53 | static const G4double fgkTolerance; //tolerance used in detecting |
54 | //of looping particles | |
676fb573 | 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 |