4 // Class for detecting and stopping looping particles
5 // or particles that reached maximal number of steps.
7 #ifndef ALI_STEPPING_ACTION_H
8 #define ALI_STEPPING_ACTION_H
10 #include <G4UserSteppingAction.hh>
11 #include <G4ThreeVector.hh>
14 class AliSteppingActionMessenger;
18 class AliSteppingAction : public G4UserSteppingAction
29 // AliSteppingAction(const AliSteppingAction& right);
30 virtual ~AliSteppingAction();
33 virtual void UserSteppingAction(const G4Step* step);
36 void SetLoopVerboseLevel(G4int level);
39 G4int GetLoopVerboseLevel() const;
42 AliSteppingAction(const AliSteppingAction& right);
45 AliSteppingAction& operator=(const AliSteppingAction& right);
49 void PrintTrackInfo(const G4Track* track) const;
51 // static data members
52 static const G4double fgkTolerance; //tolerance used in detecting
53 //of looping particles
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
66 inline void AliSteppingAction::SetLoopVerboseLevel(G4int level)
67 { fLoopVerboseLevel = level; }
69 inline G4int AliSteppingAction::GetLoopVerboseLevel() const
70 { return fLoopVerboseLevel; }
72 #endif //ALI_STEPPING_ACTION_H