]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TGeant4/TG4StepManager.h
This commit was generated by cvs2svn to compensate for changes in r1461,
[u/mrichter/AliRoot.git] / TGeant4 / TG4StepManager.h
1 // $Id$
2 // Category: event
3 //
4 // Geant4 implementation of the MonteCarlo interface methods                    
5 // for access to Geant4 at step level
6 //
7 // The public methods that do not implement AliMC methods
8 // are commented as G4 specific
9
10 #ifndef TG4_STEP_MANAGER_H
11 #define TG4_STEP_MANAGER_H
12
13 #include <G4ThreeVector.hh>
14 #include <globals.hh>
15
16 #include <Rtypes.h>
17
18 class G4Step;
19 class G4SteppingManager;
20
21 class TLorentzVector;
22
23 class TG4StepManager
24 {
25   public:
26     TG4StepManager();
27     // --> protected
28     // TG4StepManager(const TG4StepManager& right);
29     virtual ~TG4StepManager();
30
31     // static access method
32     static TG4StepManager* Instance();
33         
34     // methods
35     void StopTrack(); //new
36     void StopEvent(); //new
37     void Rndm(Float_t* array, const Int_t size) const;
38     
39     // set methods
40     void SetStep(G4Step* step);                          // G4 specific
41     void SetSteppingManager(G4SteppingManager* manager); // G4 specific
42     void SetMaxStep(Float_t step);
43     void SetMaxNStep(Int_t maxNofSteps);  //??
44     void SetUserDecay(Int_t);  //NEW
45     
46     // get methods
47     G4Step* GetStep() const;                              // G4 specific
48     
49         // tracking volume(s) 
50     Int_t CurrentVolID(Int_t& copyNo) const;
51     Int_t CurrentVolOffID(Int_t off, Int_t& copyNo) const;
52     const char* CurrentVolName() const;
53     const char* CurrentVolOffName(Int_t off) const;
54     Int_t CurrentMaterial(Float_t &a, Float_t &z, Float_t &dens, 
55                     Float_t &radl, Float_t &absl) const;
56     void Gmtod(Float_t* xm, Float_t* xd, Int_t iflag);  //new
57     void Gdtom(Float_t* xd, Float_t* xm, Int_t iflag); //new
58     Float_t MaxStep() const;
59     Int_t GetMaxNStep() const;  //??                       
60     Int_t GetMedium() const;  //??
61
62         // tracking particle 
63         // dynamic properties
64     void TrackPosition(TLorentzVector& position) const;
65     void TrackMomentum(TLorentzVector& momentum) const;
66     void TrackVertexPosition(TLorentzVector& position) const;
67     void TrackVertexMomentum(TLorentzVector& momentum) const;
68     Float_t TrackStep() const;  
69     Float_t TrackLength() const;   
70     Float_t TrackTime() const;  
71     Float_t Edep() const;
72         // static properties
73     Int_t TrackPid() const;
74     Float_t TrackCharge() const;
75     Float_t TrackMass() const;
76     Float_t Etot() const;
77
78         // track status
79     Bool_t IsTrackInside() const;
80     Bool_t IsTrackEntering() const;
81     Bool_t IsTrackExiting() const;
82     Bool_t IsTrackOut() const;
83     Bool_t IsTrackDisappeared() const;
84     Bool_t IsTrackStop() const;
85     Bool_t IsTrackAlive() const;
86     Bool_t IsNewTrack() const;
87
88         // secondaries
89     Int_t NSecondaries() const;
90     void GetSecondary(Int_t isec, Int_t& particleId,
91                       TLorentzVector& position, TLorentzVector& momentum);      
92     const char* ProdProcess() const; 
93
94   protected:
95     TG4StepManager(const TG4StepManager& right);
96
97     // operators
98     TG4StepManager& operator=(const TG4StepManager& right);
99
100   private:
101     // methods
102     void SetTLorentzVector(G4ThreeVector, G4double, TLorentzVector&) const;
103     
104     // static data members
105     static TG4StepManager*  fgInstance;   //this instance
106     
107     // data members
108     G4Step*             fStep;            //current step
109     G4SteppingManager*  fSteppingManager; //G4SteppingManager
110 };
111
112 // inline methods
113
114 inline TG4StepManager* TG4StepManager::Instance() 
115 { return fgInstance; }
116
117 inline void TG4StepManager::SetStep(G4Step* step)
118 { fStep = step; }
119
120 inline void TG4StepManager::SetSteppingManager(G4SteppingManager* manager)
121 { fSteppingManager = manager; }
122
123 inline G4Step* TG4StepManager::GetStep() const
124 { return fStep; }
125
126 #endif //TG4_STEP_MANAGER_H
127