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