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