4 // Geant4 implementation of the MonteCarlo interface methods
5 // for access to Geant4 at step level
7 // The public methods that do not implement AliMC methods
8 // are commented as G4 specific
10 #ifndef TG4_STEP_MANAGER_H
11 #define TG4_STEP_MANAGER_H
13 #include <G4ThreeVector.hh>
19 class G4SteppingManager;
28 // TG4StepManager(const TG4StepManager& right);
29 virtual ~TG4StepManager();
31 // static access method
32 static TG4StepManager* Instance();
35 void StopTrack(); //new
36 void StopEvent(); //new
37 void Rndm(Float_t* array, const Int_t size) const;
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
47 G4Step* GetStep() const; // G4 specific
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; //??
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;
73 Int_t TrackPid() const;
74 Float_t TrackCharge() const;
75 Float_t TrackMass() const;
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;
89 Int_t NSecondaries() const;
90 void GetSecondary(Int_t isec, Int_t& particleId,
91 TLorentzVector& position, TLorentzVector& momentum);
92 const char* ProdProcess() const;
95 TG4StepManager(const TG4StepManager& right);
98 TG4StepManager& operator=(const TG4StepManager& right);
102 void SetTLorentzVector(G4ThreeVector, G4double, TLorentzVector&) const;
104 // static data members
105 static TG4StepManager* fgInstance; //this instance
108 G4Step* fStep; //current step
109 G4SteppingManager* fSteppingManager; //G4SteppingManager
114 inline TG4StepManager* TG4StepManager::Instance()
115 { return fgInstance; }
117 inline void TG4StepManager::SetStep(G4Step* step)
120 inline void TG4StepManager::SetSteppingManager(G4SteppingManager* manager)
121 { fSteppingManager = manager; }
123 inline G4Step* TG4StepManager::GetStep() const
126 #endif //TG4_STEP_MANAGER_H