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