]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | // Category: event | |
3 | // | |
4 | // Class that takes care of storing kinematics. | |
5 | ||
6 | #ifndef ALI_TRACKING_ACTION_H | |
7 | #define ALI_TRACKING_ACTION_H | |
8 | ||
9bcb6317 | 9 | #include "TG4TrackingAction.h" |
10 | ||
676fb573 | 11 | #include <globals.hh> |
12 | ||
676fb573 | 13 | class AliTrackingActionMessenger; |
4240c1e8 | 14 | class AliTrackInformation; |
676fb573 | 15 | |
16 | class G4Track; | |
17 | ||
c97337f9 | 18 | class TClonesArray; |
19 | ||
9bcb6317 | 20 | class AliTrackingAction : public TG4TrackingAction |
676fb573 | 21 | { |
22 | public: | |
23 | AliTrackingAction(); | |
24 | // --> protected | |
25 | // AliTrackingAction(const AliTrackingAction& right); | |
fdfe18c5 | 26 | virtual ~AliTrackingAction(); |
676fb573 | 27 | |
28 | // static get method | |
29 | static AliTrackingAction* Instance(); | |
30 | ||
31 | // methods | |
32 | void PrepareNewEvent(); | |
9bcb6317 | 33 | virtual void PreTrackingAction(const G4Track* aTrack); |
34 | virtual void PostTrackingAction(const G4Track* aTrack); | |
4240c1e8 | 35 | void FinishPrimaryTrack(); |
36 | void SaveTrack(const G4Track* track); | |
676fb573 | 37 | |
38 | // set methods | |
39 | void SetVerboseLevel(G4int level); | |
aafc96be | 40 | void SetNewVerboseLevel(G4int level); |
41 | void SetNewVerboseTrackID(G4int trackID); | |
676fb573 | 42 | void SetSavePrimaries(G4bool savePrimaries); |
43 | ||
44 | // get methods | |
45 | G4int GetVerboseLevel() const; | |
46 | G4bool GetSavePrimaries() const; | |
3bfabcfc | 47 | G4int GetNofTracks() const; |
676fb573 | 48 | |
49 | protected: | |
50 | AliTrackingAction(const AliTrackingAction& right); | |
51 | ||
52 | // operators | |
53 | AliTrackingAction& operator=(const AliTrackingAction& right); | |
54 | ||
55 | private: | |
56 | // methods | |
57 | G4int GetParticleIndex(G4int trackID); | |
4240c1e8 | 58 | AliTrackInformation* GetTrackInformation(const G4Track* track, |
59 | const G4String& method) const; | |
676fb573 | 60 | |
61 | // static data members | |
62 | static AliTrackingAction* fgInstance; //this instance | |
63 | ||
64 | // data members | |
676fb573 | 65 | AliTrackingActionMessenger* fMessenger; //messenger |
4240c1e8 | 66 | G4int fPrimaryTrackID; //current primary track ID |
67 | G4bool fSavePrimaries; //control of saving primaries | |
68 | G4int fVerboseLevel; //verbose level | |
aafc96be | 69 | G4int fNewVerboseLevel; //new /tracking/verbose level |
70 | G4int fNewVerboseTrackID;//track ID for which new /tracking/verbose level is applied | |
4240c1e8 | 71 | G4int fTrackCounter; //tracks counter |
676fb573 | 72 | }; |
73 | ||
74 | // inline methods | |
75 | ||
4240c1e8 | 76 | inline AliTrackingAction* AliTrackingAction::Instance() |
77 | { return fgInstance; } | |
78 | ||
676fb573 | 79 | inline void AliTrackingAction::SetVerboseLevel(G4int level) |
80 | { fVerboseLevel = level; } | |
81 | ||
82 | inline void AliTrackingAction::SetSavePrimaries(G4bool savePrimaries) | |
83 | { fSavePrimaries = savePrimaries; } | |
84 | ||
85 | inline G4int AliTrackingAction::GetVerboseLevel() const | |
86 | { return fVerboseLevel; } | |
87 | ||
88 | inline G4bool AliTrackingAction::GetSavePrimaries() const | |
89 | { return fSavePrimaries; } | |
90 | ||
3bfabcfc | 91 | inline G4int AliTrackingAction::GetNofTracks() const |
92 | { return fTrackCounter; } | |
93 | ||
676fb573 | 94 | #endif //ALI_TRACKING_ACTION_H |