]>
Commit | Line | Data |
---|---|---|
b9d0a01d | 1 | #ifndef TFLUKA |
2 | #define TFLUKA | |
03ca248b | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // // | |
11 | // FLUKA implementation of the AliMC Interface // | |
12 | // // | |
13 | // // | |
14 | /////////////////////////////////////////////////////////////////////////////// | |
15 | ||
16 | ||
b9d0a01d | 17 | #include "TVirtualMC.h" |
18 | #include "TMCProcess.h" | |
03ca248b | 19 | |
bf3aa28e | 20 | //Forward declaration |
21 | class TG4GeometryManager; | |
22 | class TG4DetConstruction; | |
b9d0a01d | 23 | |
24 | class TFluka : public TVirtualMC { | |
25 | ||
03ca248b | 26 | public: |
b9d0a01d | 27 | TFluka(const char *title, Int_t verbosity = 0); |
28 | TFluka(); | |
bf3aa28e | 29 | virtual ~TFluka(); |
03ca248b | 30 | |
b9d0a01d | 31 | // |
32 | // methods for building/management of geometry | |
33 | // ------------------------------------------------ | |
34 | // | |
35 | ||
36 | // functions from GCONS | |
37 | virtual void Gfmate(Int_t imat, char *name, Float_t &a, Float_t &z, | |
38 | Float_t &dens, Float_t &radl, Float_t &absl, | |
bf3aa28e | 39 | Float_t* ubuf, Int_t& nbuf); |
b9d0a01d | 40 | virtual void Gfmate(Int_t imat, char *name, Double_t &a, Double_t &z, |
41 | Double_t &dens, Double_t &radl, Double_t &absl, | |
bf3aa28e | 42 | Double_t* ubuf, Int_t& nbuf); |
b9d0a01d | 43 | |
44 | // detector composition | |
45 | virtual void Material(Int_t& kmat, const char* name, Double_t a, | |
46 | Double_t z, Double_t dens, Double_t radl, Double_t absl, | |
bf3aa28e | 47 | Float_t* buf, Int_t nwbuf); |
b9d0a01d | 48 | virtual void Material(Int_t& kmat, const char* name, Double_t a, |
49 | Double_t z, Double_t dens, Double_t radl, Double_t absl, | |
bf3aa28e | 50 | Double_t* buf, Int_t nwbuf); |
b9d0a01d | 51 | virtual void Mixture(Int_t& kmat, const char *name, Float_t *a, |
bf3aa28e | 52 | Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat); |
b9d0a01d | 53 | virtual void Mixture(Int_t& kmat, const char *name, Double_t *a, |
bf3aa28e | 54 | Double_t *z, Double_t dens, Int_t nlmat, Double_t *wmat); |
b9d0a01d | 55 | virtual void Medium(Int_t& kmed, const char *name, Int_t nmat, |
56 | Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, | |
57 | Double_t stemax, Double_t deemax, Double_t epsil, | |
bf3aa28e | 58 | Double_t stmin, Float_t* ubuf, Int_t nbuf); |
b9d0a01d | 59 | virtual void Medium(Int_t& kmed, const char *name, Int_t nmat, |
60 | Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, | |
61 | Double_t stemax, Double_t deemax, Double_t epsil, | |
bf3aa28e | 62 | Double_t stmin, Double_t* ubuf, Int_t nbuf); |
b9d0a01d | 63 | virtual void Matrix(Int_t& krot, Double_t thetaX, Double_t phiX, |
64 | Double_t thetaY, Double_t phiY, Double_t thetaZ, | |
bf3aa28e | 65 | Double_t phiZ); |
66 | virtual void Gstpar(Int_t itmed, const char *param, Double_t parval); | |
b9d0a01d | 67 | |
68 | // functions from GGEOM | |
69 | virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, | |
bf3aa28e | 70 | Float_t *upar, Int_t np); |
b9d0a01d | 71 | virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, |
bf3aa28e | 72 | Double_t *upar, Int_t np); |
b9d0a01d | 73 | virtual void Gsdvn(const char *name, const char *mother, Int_t ndiv, |
bf3aa28e | 74 | Int_t iaxis); |
b9d0a01d | 75 | virtual void Gsdvn2(const char *name, const char *mother, Int_t ndiv, |
bf3aa28e | 76 | Int_t iaxis, Double_t c0i, Int_t numed); |
b9d0a01d | 77 | virtual void Gsdvt(const char *name, const char *mother, Double_t step, |
bf3aa28e | 78 | Int_t iaxis, Int_t numed, Int_t ndvmx); |
b9d0a01d | 79 | virtual void Gsdvt2(const char *name, const char *mother, Double_t step, |
bf3aa28e | 80 | Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx); |
81 | virtual void Gsord(const char *name, Int_t iax); | |
b9d0a01d | 82 | virtual void Gspos(const char *name, Int_t nr, const char *mother, |
83 | Double_t x, Double_t y, Double_t z, Int_t irot, | |
bf3aa28e | 84 | const char *konly="ONLY"); |
b9d0a01d | 85 | virtual void Gsposp(const char *name, Int_t nr, const char *mother, |
86 | Double_t x, Double_t y, Double_t z, Int_t irot, | |
bf3aa28e | 87 | const char *konly, Float_t *upar, Int_t np); |
b9d0a01d | 88 | virtual void Gsposp(const char *name, Int_t nr, const char *mother, |
89 | Double_t x, Double_t y, Double_t z, Int_t irot, | |
bf3aa28e | 90 | const char *konly, Double_t *upar, Int_t np); |
91 | virtual void Gsbool(const char* onlyVolName, const char* manyVolName); | |
b9d0a01d | 92 | |
93 | virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov, | |
bf3aa28e | 94 | Float_t *absco, Float_t *effic, Float_t *rindex); |
b9d0a01d | 95 | virtual void SetCerenkov(Int_t itmed, Int_t npckov, Double_t *ppckov, |
bf3aa28e | 96 | Double_t *absco, Double_t *effic, Double_t *rindex); |
b9d0a01d | 97 | |
98 | ||
99 | // functions for drawing | |
100 | virtual void DrawOneSpec(const char* name) | |
101 | {printf("WARNING: DrawOneSpec not yet implemented !\n");} | |
102 | virtual void Gsatt(const char* name, const char* att, Int_t val) | |
103 | {printf("WARNING: Gsatt not yet implemented !\n");} | |
104 | virtual void Gdraw(const char*,Double_t theta = 30, Double_t phi = 30, | |
105 | Double_t psi = 0, Double_t u0 = 10, Double_t v0 = 10, | |
106 | Double_t ul = 0.01, Double_t vl = 0.01) | |
107 | {printf("WARNING: Gdraw not yet implemented !\n");} | |
108 | ||
109 | // Euclid | |
bf3aa28e | 110 | virtual void WriteEuclid(const char*, const char*, Int_t, Int_t); |
b9d0a01d | 111 | |
112 | // get methods | |
113 | virtual Int_t VolId(const Text_t* volName) const | |
114 | {printf("WARNING: VolId not yet implemented !\n"); return -1;} | |
115 | virtual const char* VolName(Int_t id) const | |
116 | {printf("WARNING: VolName not yet implemented !\n"); return "void";} | |
117 | virtual Int_t NofVolumes() const | |
118 | {printf("WARNING: NofVolumes not yet implemented !\n"); return -1;} | |
119 | virtual Int_t VolId2Mate(Int_t id) const | |
120 | {printf("WARNING: VolId2Mate not yet implemented !\n"); return -1;} | |
121 | ||
122 | // | |
123 | // methods for physics management | |
124 | // ------------------------------------------------ | |
125 | // | |
126 | ||
127 | // set methods | |
128 | virtual void SetCut(const char* cutName, Double_t cutValue) | |
129 | {printf("WARNING: SetCut not yet implemented !\n");} | |
130 | virtual void SetProcess(const char* flagName, Int_t flagValue) | |
131 | {printf("WARNING: SetProcess not yet implemented !\n");} | |
132 | virtual Double_t Xsec(char*, Double_t, Int_t, Int_t) | |
133 | {printf("WARNING: Xsec not yet implemented !\n"); return -1.;} | |
134 | ||
135 | // particle table usage | |
136 | virtual Int_t IdFromPDG(Int_t id) const; | |
b9d0a01d | 137 | virtual Int_t PDGFromId(Int_t pdg) const; |
f9cb2fec | 138 | virtual void DefineParticles() |
139 | {printf("WARNING: DefineParticles not yet implemented !\n");} | |
b9d0a01d | 140 | |
141 | // | |
142 | // methods for step management | |
143 | // ------------------------------------------------ | |
144 | // | |
145 | ||
146 | // action methods | |
147 | virtual void StopTrack() | |
148 | {printf("WARNING: StopTrack not yet implemented !\n");} | |
149 | virtual void StopEvent() | |
150 | {printf("WARNING: StopEvent not yet implemented !\n");} | |
151 | ||
152 | // set methods | |
153 | virtual void SetMaxStep(Double_t) | |
154 | {printf("WARNING: SetMaxStep not yet implemented !\n");} | |
155 | virtual void SetMaxNStep(Int_t) | |
156 | {printf("WARNING: SetMaxNStep not yet implemented !\n");} | |
157 | virtual void SetUserDecay(Int_t) | |
158 | {printf("WARNING: SetUserDecay not yet implemented !\n");} | |
159 | ||
160 | // get methods | |
161 | // tracking volume(s) | |
162 | virtual Int_t CurrentVolID(Int_t& copyNo) const | |
163 | {printf("WARNING: CurrentVolID not yet implemented !\n"); return -1;} | |
164 | virtual Int_t CurrentVolOffID(Int_t off, Int_t& copyNo) const | |
165 | {printf("WARNING: CurrentVolOffID not yet implemented !\n"); return -1;} | |
166 | virtual const char* CurrentVolName() const | |
167 | {printf("WARNING: CurrentVolName not yet implemented !\n"); return "void";} | |
168 | virtual const char* CurrentVolOffName(Int_t off) const | |
169 | {printf("WARNING: CurrentVolOffName not yet implemented !\n"); return "void";} | |
170 | virtual Int_t CurrentMaterial(Float_t &a, Float_t &z, | |
171 | Float_t &dens, Float_t &radl, Float_t &absl) const | |
172 | {printf("WARNING: CurrentMaterial not yet implemented !\n"); return -1;} | |
173 | virtual Int_t CurrentEvent() const | |
174 | {printf("WARNING: CurrentEvent not yet implemented !\n"); return -1;} | |
175 | virtual void Gmtod(Float_t* xm, Float_t* xd, Int_t iflag) | |
176 | {printf("WARNING: Gmtod not yet implemented !\n");} | |
177 | virtual void Gmtod(Double_t* xm, Double_t* xd, Int_t iflag) | |
178 | {printf("WARNING: Gmtod not yet implemented !\n");} | |
179 | virtual void Gdtom(Float_t* xd, Float_t* xm, Int_t iflag) | |
180 | {printf("WARNING: Gdtom not yet implemented !\n");} | |
181 | virtual void Gdtom(Double_t* xd, Double_t* xm, Int_t iflag) | |
182 | {printf("WARNING: Gdtom not yet implemented !\n");} | |
183 | virtual Double_t MaxStep() const | |
184 | {printf("WARNING: MaxStep not yet implemented !\n"); return -1.;} | |
185 | virtual Int_t GetMaxNStep() const | |
186 | {printf("WARNING: GetMaxNStep not yet implemented !\n"); return -1;} | |
187 | virtual Int_t GetMedium() const | |
188 | {printf("WARNING: GetMedium not yet implemented !\n"); return -1;} | |
189 | ||
190 | // tracking particle | |
191 | // dynamic properties | |
192 | virtual void TrackPosition(TLorentzVector& position) const | |
193 | {printf("WARNING: TrackPosition not yet implemented !\n");} | |
194 | virtual void TrackMomentum(TLorentzVector& momentum) const | |
195 | {printf("WARNING: TrackMomentum not yet implemented !\n");} | |
196 | virtual Double_t TrackStep() const | |
197 | {printf("WARNING: TrackStep not yet implemented !\n"); return -1.;} | |
198 | virtual Double_t TrackLength() const | |
199 | {printf("WARNING: TrackLength not yet implemented !\n"); return -1.;} | |
200 | virtual Double_t TrackTime() const | |
201 | {printf("WARNING: TrackTime not yet implemented !\n"); return -1.;} | |
202 | virtual Double_t Edep() const | |
203 | {printf("WARNING: Edep not yet implemented !\n"); return -1.;} | |
204 | // static properties | |
205 | virtual Int_t TrackPid() const | |
206 | {printf("WARNING: TrackPid not yet implemented !\n"); return -1;} | |
207 | virtual Double_t TrackCharge() const | |
208 | {printf("WARNING: TrackCharge not yet implemented !\n"); return -1.;} | |
209 | virtual Double_t TrackMass() const | |
210 | {printf("WARNING: TrackMass not yet implemented !\n"); return -1.;} | |
211 | virtual Double_t Etot() const | |
212 | {printf("WARNING: Etot not yet implemented !\n"); return -1.;} | |
213 | ||
214 | // track status | |
215 | virtual Bool_t IsNewTrack() const | |
216 | {printf("WARNING: IsNewTrack not yet implemented !\n"); return 0;} | |
217 | virtual Bool_t IsTrackInside() const | |
218 | {printf("WARNING: IsTrackInside not yet implemented !\n"); return 0;} | |
219 | virtual Bool_t IsTrackEntering() const | |
220 | {printf("WARNING: IsTrackEntering not yet implemented !\n"); return 0;} | |
221 | virtual Bool_t IsTrackExiting() const | |
222 | {printf("WARNING: IsTrackExiting not yet implemented !\n"); return 0;} | |
223 | virtual Bool_t IsTrackOut() const | |
224 | {printf("WARNING: IsTrackOut not yet implemented !\n"); return 0;} | |
225 | virtual Bool_t IsTrackDisappeared() const | |
226 | {printf("WARNING: IsTrackDisappeared not yet implemented !\n"); return 0;} | |
227 | virtual Bool_t IsTrackStop() const | |
228 | {printf("WARNING: IsTrackStop not yet implemented !\n"); return 0;} | |
229 | virtual Bool_t IsTrackAlive() const | |
230 | {printf("WARNING: IsTrackAlive not yet implemented !\n"); return 0;} | |
03ca248b | 231 | |
b9d0a01d | 232 | // secondaries |
233 | virtual Int_t NSecondaries() const | |
234 | {printf("WARNING: NSecondaries not yet implemented !\n"); return -1;} | |
235 | virtual void GetSecondary(Int_t isec, Int_t& particleId, | |
236 | TLorentzVector& position, TLorentzVector& momentum) | |
237 | {printf("WARNING: GetSecondary not yet implemented !\n");} | |
238 | virtual TMCProcess ProdProcess(Int_t isec) const | |
239 | {printf("WARNING: StepProcesses not yet implemented !\n"); return kPNoProcess;} | |
240 | virtual Int_t StepProcesses(TArrayI &proc) const | |
241 | {printf("WARNING: StepProcesses not yet implemented !\n"); return -1;} | |
242 | ||
243 | ||
244 | // | |
245 | // Geant3 specific methods | |
246 | // !!! need to be transformed to common interface | |
247 | // | |
248 | virtual void Gdopt(const char*,const char*) | |
249 | {printf("WARNING: Gdopt not yet implemented !\n");} | |
250 | virtual void SetClipBox(const char*,Double_t=-9999,Double_t=0, Double_t=-9999, | |
251 | Double_t=0,Double_t=-9999,Double_t=0) | |
252 | {printf("WARNING: SetClipBox not yet implemented !\n");} | |
253 | virtual void DefaultRange() | |
254 | {printf("WARNING: DefaultRange not yet implemented !\n");} | |
255 | virtual void Gdhead(Int_t, const char*, Double_t=0) | |
256 | {printf("WARNING: Gdhead not yet implemented !\n");} | |
257 | virtual void Gdman(Double_t, Double_t, const char*) | |
258 | {printf("WARNING: Gdman not yet implemented !\n");} | |
259 | virtual void SetColors() | |
260 | {printf("WARNING: SetColors not yet implemented !\n");} | |
261 | virtual void Gtreve() | |
262 | {printf("WARNING: Gtreve not yet implemented !\n");} | |
263 | virtual void GtreveRoot() | |
264 | {printf("WARNING: GtreveRoot not yet implemented !\n");} | |
265 | virtual void Gckmat(Int_t, char*) | |
266 | {printf("WARNING: Gckmat not yet implemented !\n");} | |
267 | virtual void InitLego() | |
268 | {printf("WARNING: InitLego not yet implemented !\n");} | |
269 | virtual void Gfpart(Int_t, char*, Int_t&, Float_t&, Float_t&, Float_t&) | |
270 | {printf("WARNING: Gfpart not yet implemented !\n");} | |
271 | virtual void Gspart(Int_t, const char*, Int_t, Double_t, Double_t, Double_t) | |
272 | {printf("WARNING: Gspart not yet implemented !\n");} | |
273 | ||
274 | // | |
275 | // control methods | |
276 | // ------------------------------------------------ | |
277 | // | |
278 | ||
279 | virtual void Init(); | |
bf3aa28e | 280 | virtual void FinishGeometry(); |
281 | virtual void BuildPhysics(); | |
b9d0a01d | 282 | virtual void ProcessEvent(); |
b9d0a01d | 283 | virtual void ProcessRun(Int_t nevent); |
03ca248b | 284 | |
03ca248b | 285 | |
b9d0a01d | 286 | // |
287 | //New Getter and Setters | |
288 | // ------------------------------------------------ | |
289 | // | |
290 | // - Input file name | |
291 | TString GetInputFileName() const {return fInputFileName;} | |
292 | void SetInputFileName(const char* n) {fInputFileName = n;} | |
293 | // - Verbosity level | |
294 | Int_t GetVerbosityLevel() const {return fVerbosityLevel;} | |
295 | void SetVerbosityLevel(Int_t l) {fVerbosityLevel = l;} | |
03ca248b | 296 | |
b9d0a01d | 297 | private: |
298 | TFluka(const TFluka &mc){} | |
299 | TFluka & operator=(const TFluka &) {return (*this);} | |
03ca248b | 300 | |
b9d0a01d | 301 | protected: |
302 | Int_t fVerbosityLevel; //Verbosity level (0 lowest - 3 highest) | |
303 | TString fInputFileName; //Name of the input file (f.e. mu.inp) | |
304 | ||
03ca248b | 305 | |
03ca248b | 306 | |
bf3aa28e | 307 | //Geometry through Geant4 for the time being!!! |
308 | TG4GeometryManager* fGeometryManager; //geometry manager | |
309 | TG4DetConstruction* fDetector; //Detector | |
03ca248b | 310 | |
03ca248b | 311 | |
b9d0a01d | 312 | ClassDef(TFluka,1) //C++ interface to Fluka montecarlo |
03ca248b | 313 | }; |
314 | ||
b9d0a01d | 315 | #endif //TFLUKA |
03ca248b | 316 |