track counter implemented in ESD reader
[u/mrichter/AliRoot.git] / AliFluka / TFluka.h
CommitLineData
16710643 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
04c6e46a 4// $Id$
5//
6// Author: I. Hrivnacova
7//
8// Class TFluka
9// -------------
10// Fluka implementation of the MonteCarlo interface.
11
12#ifndef TFLUKA_H
13#define TFLUKA_H
14
6b677e96 15#include "TMCProcess.h"
16#include "TVirtualMC.h"
04c6e46a 17#include <TArrayI.h>
18
19class TG4GeometryManager;
20
21class AliDecayer;
22
6b677e96 23class TFluka: public TVirtualMC
04c6e46a 24{
25 public:
26 TFluka(const char* name, const char* title);
27 // --> protected
28 // TFluka();
29 // TFluka(const TFluka& right);
30 virtual ~TFluka();
31
32 //
33 // methods for building/management of geometry
34 // ------------------------------------------------
35 //
36
37 // functions from GBASE
38 virtual void FinishGeometry();
39 //Ggclos();
40
41 // functions from GCONS
42 virtual void Gfmate(Int_t imat, char *name, Float_t &a, Float_t &z,
43 Float_t &dens, Float_t &radl, Float_t &absl,
44 Float_t* ubuf, Int_t& nbuf);
45
46 // detector composition
47 virtual void Material(Int_t& kmat, const char* name, Float_t a,
48 Float_t z, Float_t dens, Float_t radl, Float_t absl,
49 Float_t* buf, Int_t nwbuf);
50 virtual void Mixture(Int_t& kmat, const char *name, Float_t *a,
51 Float_t *z, Float_t dens, Int_t nlmat, Float_t *wmat);
52 virtual void Medium(Int_t& kmed, const char *name, Int_t nmat,
53 Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd,
54 Float_t stemax, Float_t deemax, Float_t epsil,
55 Float_t stmin, Float_t* ubuf, Int_t nbuf);
56 virtual void Matrix(Int_t& krot, Float_t thetaX, Float_t phiX,
57 Float_t thetaY, Float_t phiY, Float_t thetaZ,
58 Float_t phiZ);
59 virtual void Gstpar(Int_t itmed, const char *param, Float_t parval);
60 virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov,
61 Float_t *absco, Float_t *effic, Float_t *rindex);
62
63 // functions from GGEOM
64 virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed,
65 Float_t *upar, Int_t np);
66 virtual void Gsdvn(const char *name, const char *mother, Int_t ndiv,
67 Int_t iaxis);
68 virtual void Gsdvn2(const char *name, const char *mother, Int_t ndiv,
69 Int_t iaxis, Float_t c0i, Int_t numed);
70 virtual void Gsdvt(const char *name, const char *mother, Float_t step,
71 Int_t iaxis, Int_t numed, Int_t ndvmx);
72 virtual void Gsdvt2(const char *name, const char *mother, Float_t step,
73 Int_t iaxis, Float_t c0, Int_t numed, Int_t ndvmx);
74 virtual void Gsord(const char *name, Int_t iax);
75 virtual void Gspos(const char *name, Int_t nr, const char *mother,
76 Float_t x, Float_t y, Float_t z, Int_t irot,
77 const char *konly);
78 virtual void Gsposp(const char *name, Int_t nr, const char *mother,
79 Float_t x, Float_t y, Float_t z, Int_t irot,
80 const char *konly, Float_t *upar, Int_t np);
81 virtual void Gsbool(const char* onlyVolName, const char* manyVolName) {}
82
83 // Euclid
84 virtual void WriteEuclid(const char* fileName, const char* topVol,
85 Int_t number, Int_t nlevel);
86
87 // get methods
88 virtual Int_t VolId(const Text_t* volName) const;
89 virtual const char* VolName(Int_t id) const;
90 virtual Int_t NofVolumes() const;
91 virtual Int_t VolId2Mate(Int_t id) const;
92
93 //
94 // methods for physics management
95 // ------------------------------------------------
96 //
97
98 virtual void BuildPhysics();
99
100 // set methods
101 virtual void SetCut(const char* cutName, Float_t cutValue);
102 virtual void SetProcess(const char* flagName, Int_t flagValue);
103 virtual Float_t Xsec(char* reac, Float_t energy, Int_t part, Int_t mate);
104 virtual void SetExternalDecayer(AliDecayer* decayer); //NEW
105
106 // get methods
107 virtual AliDecayer* Decayer() const; //NEW
108
109 // particle table usage
110 virtual Int_t IdFromPDG(Int_t pdgID) const;
111 virtual Int_t PDGFromId(Int_t mcID) const;
112 virtual void DefineParticles();
113
114 //
115 // methods for step management
116 // ------------------------------------------------
117 //
118
119 // action methods
120 virtual void StopTrack();
121 virtual void StopEvent();
122
123 // set methods
124 virtual void SetMaxStep(Float_t);
125 virtual void SetMaxNStep(Int_t);
126 virtual void SetUserDecay(Int_t); //NEW
127
128 // get methods
129 // tracking volume(s)
130 virtual Int_t CurrentVolID(Int_t& copyNo) const;
131 virtual Int_t CurrentVolOffID(Int_t off, Int_t& copyNo) const;
132 virtual const char* CurrentVolName() const;
133 virtual const char* CurrentVolOffName(Int_t off) const;
134 virtual Int_t CurrentMaterial(Float_t &a, Float_t &z,
135 Float_t &dens, Float_t &radl, Float_t &absl) const;
136 virtual void Gmtod(Float_t* xm, Float_t* xd, Int_t iflag);
137 virtual void Gdtom(Float_t* xd, Float_t* xm, Int_t iflag);
138 virtual Float_t MaxStep() const;
139 virtual Int_t GetMaxNStep() const;
140 virtual Int_t GetMedium() const;
141
142 // tracking particle
143 // dynamic properties
144 virtual void TrackPosition(TLorentzVector& position) const;
059f00b8 145 virtual void TrackPosition(Double_t &x, Double_t &y, Double_t &z) const;
04c6e46a 146 virtual void TrackMomentum(TLorentzVector& momentum) const;
059f00b8 147 virtual void TrackMomentum(Double_t &px, Double_t &py, Double_t &pz, Double_t &etot) const;
04c6e46a 148 virtual void TrackVertexPosition(TLorentzVector& position) const;
149 virtual void TrackVertexMomentum(TLorentzVector& momentum) const;
150 virtual Float_t TrackStep() const;
151 virtual Float_t TrackLength() const;
152 virtual Float_t TrackTime() const;
153 virtual Float_t Edep() const;
154 // static properties
155 virtual Int_t TrackPid() const;
156 virtual Float_t TrackCharge() const;
157 virtual Float_t TrackMass() const;
158 virtual Float_t Etot() const;
159
160 // track status
161 virtual Bool_t IsTrackInside() const;
162 virtual Bool_t IsTrackEntering() const;
163 virtual Bool_t IsTrackExiting() const;
164 virtual Bool_t IsTrackOut() const;
165 virtual Bool_t IsTrackDisappeared() const;
166 virtual Bool_t IsTrackStop() const;
167 virtual Bool_t IsTrackAlive() const;
168 virtual Bool_t IsNewTrack() const;
169
170 // secondaries
171 virtual Int_t NSecondaries() const;
172 virtual void GetSecondary(Int_t isec, Int_t& particleId,
173 TLorentzVector& position, TLorentzVector& momentum);
6b677e96 174 virtual TMCProcess ProdProcess(Int_t isec) const;
04c6e46a 175 virtual Int_t StepProcesses(TArrayI &proc) const;
176
177 //
178 // methods for visualization
179 // ------------------------------------------------
180 //
181 // functions for drawing
182 virtual void DrawOneSpec(const char* name);
183 virtual void Gsatt(const char* name, const char* att, Int_t val);
184 virtual void Gdraw(const char* name, Float_t theta, Float_t phi,
185 Float_t psi, Float_t u0, Float_t v0,
186 Float_t ul, Float_t vl);
187
188 //
189 // NEW
190 // Geant3 specific methods
191 // !!! need to be transformed to common interface
192 //
193 virtual void Gdopt(const char* name , const char* value);
194 virtual void SetClipBox(const char *name, Float_t xmin, Float_t xmax,
195 Float_t ymin, Float_t ymax, Float_t zmin, Float_t zmax);
196 virtual void DefaultRange();
197 virtual void Gdhead(Int_t isel, const char* name, Float_t chrsiz);
198 virtual void Gdman(Float_t u, Float_t v, const char* type);
199 virtual void SetColors();
200 virtual void Gtreve();
201 virtual void GtreveRoot();
202 virtual void Gckmat(Int_t itmed, char* natmed);
203 virtual void InitLego();
204 virtual void Gfpart(Int_t ipart, char *name, Int_t& itrtyp,
205 Float_t& amass, Float_t& charge, Float_t& tlife);
206 virtual void Gspart(Int_t ipart, const char *name, Int_t itrtyp,
207 Float_t amass, Float_t charge, Float_t tlife);
208
209 //
210 // methods for run control
211 // ------------------------------------------------
212 //
213
214 virtual void Init();
215 virtual void ProcessEvent();
216 virtual void ProcessRun(Int_t nofEvents);
217
218 // UI control methods
219 void StartGeantUI();
220 void StartRootUI();
221 void ProcessGeantMacro(const char* macroName);
222 void ProcessGeantCommand(const char* commandPath);
223
224 // get methods
225 virtual Int_t CurrentEvent() const;
226 virtual AliMCGeomType GetMCGeomType() const { return kGeant4; }
227
228 protected:
229 TFluka();
230 TFluka(const TFluka& right);
231
232 // operators
233 TFluka& operator=(const TFluka& right);
234
235 private:
236 // data members
237 TG4GeometryManager* fGeometryManager; //geometry manager
238};
239
240#ifndef __CINT__
241
242#endif
243#endif // TFLUKA_H
244