]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/AliSteppingAction.h
Initial version
[u/mrichter/AliRoot.git] / AliGeant4 / AliSteppingAction.h
CommitLineData
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
10#include <G4UserSteppingAction.hh>
11#include <G4ThreeVector.hh>
12#include <globals.hh>
13
14class AliSteppingActionMessenger;
15
16class G4Track;
17
18class AliSteppingAction : public G4UserSteppingAction
19{
20 enum {
21 kCheckNofSteps = 100,
cb7b55a2 22 kMaxNofLoopSteps = 5,
23 kMaxNofSteps = 5000
676fb573 24 };
25
26 public:
27 AliSteppingAction();
28 // protected
29 // AliSteppingAction(const AliSteppingAction& right);
30 virtual ~AliSteppingAction();
31
32 // methods
33 virtual void UserSteppingAction(const G4Step* step);
34
35 // set methods
36 void SetLoopVerboseLevel(G4int level);
37
38 // get methods
39 G4int GetLoopVerboseLevel() const;
40
41 protected:
42 AliSteppingAction(const AliSteppingAction& right);
43
44 // operators
45 AliSteppingAction& operator=(const AliSteppingAction& right);
46
47 private:
48 // methods
49 void PrintTrackInfo(const G4Track* track) const;
50
51 // static data members
c63f260d 52 static const G4double fgkTolerance; //tolerance used in detecting
53 //of looping particles
676fb573 54
55 // data members
56 G4ThreeVector fKeptStepPoint; //kept step point
57 G4int fLoopVerboseLevel; //tracking verbose level
58 //for looping particles
59 G4int fStandardVerboseLevel; //standard tracking verbose level
60 G4int fLoopStepCounter; //loop steps counter
61 AliSteppingActionMessenger* fMessenger; //messenger
62};
63
64// inline methods
65
66inline void AliSteppingAction::SetLoopVerboseLevel(G4int level)
67{ fLoopVerboseLevel = level; }
68
69inline G4int AliSteppingAction::GetLoopVerboseLevel() const
70{ return fLoopVerboseLevel; }
71
72#endif //ALI_STEPPING_ACTION_H
73