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