]>
Commit | Line | Data |
---|---|---|
6f5667d1 | 1 | #ifndef TFLUKA_H |
2 | #define TFLUKA_H | |
829fb838 | 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 VirtualMC Interface // | |
12 | // // | |
13 | // // | |
14 | /////////////////////////////////////////////////////////////////////////////// | |
15 | ||
16 | ||
17 | #include "TVirtualMC.h" | |
c54ce58e | 18 | #include "TMCOptical.h" |
a9ea1616 | 19 | #include "TFlukaCodes.h" |
4aba9d66 | 20 | #include "TFlukaMCGeometry.h" |
21 | ||
829fb838 | 22 | //Forward declaration |
6f5667d1 | 23 | class TGeoMCGeometry; |
4aba9d66 | 24 | //class TFlukaMCGeometry; |
829fb838 | 25 | class TGeoMaterial; |
26 | ||
27 | class TFluka : public TVirtualMC { | |
28 | ||
29 | public: | |
30 | TFluka(const char *title, Int_t verbosity = 0, Bool_t isRootGeometrySupported = 0); | |
31 | TFluka(); | |
32 | virtual ~TFluka(); | |
7110de2d | 33 | virtual Bool_t IsRootGeometrySupported() const { return kTRUE;} |
829fb838 | 34 | |
4aba9d66 | 35 | Int_t GetNstep() { return fGeom->GetNstep(); } // to be removed |
36 | ||
829fb838 | 37 | // |
b496f27c | 38 | // Methods for building/management of geometry |
829fb838 | 39 | // ------------------------------------------------ |
40 | // | |
41 | ||
b496f27c | 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 | virtual void Gfmate(Int_t imat, char *name, Double_t &a, Double_t &z, | |
47 | Double_t &dens, Double_t &radl, Double_t &absl, | |
48 | Double_t* ubuf, Int_t& nbuf); | |
49 | ||
50 | // Detector composition | |
51 | virtual void Material(Int_t& kmat, const char* name, Double_t a, | |
52 | Double_t z, Double_t dens, Double_t radl, Double_t absl, | |
53 | Float_t* buf, Int_t nwbuf); | |
54 | virtual void Material(Int_t& kmat, const char* name, Double_t a, | |
55 | Double_t z, Double_t dens, Double_t radl, Double_t absl, | |
56 | Double_t* buf, Int_t nwbuf); | |
57 | virtual void Mixture(Int_t& kmat, const char *name, Float_t *a, | |
58 | Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat); | |
59 | virtual void Mixture(Int_t& kmat, const char *name, Double_t *a, | |
60 | Double_t *z, Double_t dens, Int_t nlmat, Double_t *wmat); | |
61 | virtual void Medium(Int_t& kmed, const char *name, Int_t nmat, | |
62 | Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, | |
63 | Double_t stemax, Double_t deemax, Double_t epsil, | |
64 | Double_t stmin, Float_t* ubuf, Int_t nbuf); | |
65 | virtual void Medium(Int_t& kmed, const char *name, Int_t nmat, | |
66 | Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, | |
67 | Double_t stemax, Double_t deemax, Double_t epsil, | |
68 | Double_t stmin, Double_t* ubuf, Int_t nbuf); | |
69 | virtual void Matrix(Int_t& krot, Double_t thetaX, Double_t phiX, | |
70 | Double_t thetaY, Double_t phiY, Double_t thetaZ, | |
71 | Double_t phiZ); | |
72 | virtual void Gstpar(Int_t itmed, const char *param, Double_t parval); | |
73 | ||
74 | // Functions from GGEOM | |
829fb838 | 75 | virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, |
76 | Float_t *upar, Int_t np); | |
77 | virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, | |
78 | Double_t *upar, Int_t np); | |
b496f27c | 79 | virtual void Gsdvn(const char *name, const char *mother, Int_t ndiv, |
80 | Int_t iaxis); | |
81 | virtual void Gsdvn2(const char *name, const char *mother, Int_t ndiv, | |
82 | Int_t iaxis, Double_t c0i, Int_t numed); | |
83 | virtual void Gsdvt(const char *name, const char *mother, Double_t step, | |
84 | Int_t iaxis, Int_t numed, Int_t ndvmx); | |
85 | virtual void Gsdvt2(const char *name, const char *mother, Double_t step, | |
829fb838 | 86 | Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx); |
b496f27c | 87 | virtual void Gsord(const char *name, Int_t iax); |
88 | virtual void Gspos(const char *name, Int_t nr, const char *mother, | |
89 | Double_t x, Double_t y, Double_t z, Int_t irot, | |
829fb838 | 90 | const char *konly="ONLY"); |
b496f27c | 91 | virtual void Gsposp(const char *name, Int_t nr, const char *mother, |
92 | Double_t x, Double_t y, Double_t z, Int_t irot, | |
93 | const char *konly, Float_t *upar, Int_t np); | |
94 | virtual void Gsposp(const char *name, Int_t nr, const char *mother, | |
95 | Double_t x, Double_t y, Double_t z, Int_t irot, | |
96 | const char *konly, Double_t *upar, Int_t np); | |
97 | virtual void Gsbool(const char* onlyVolName, const char* manyVolName); | |
98 | ||
a9ea1616 | 99 | // functions for access to geometry |
100 | // | |
101 | // Return the Transformation matrix between the volume specified by | |
102 | // the path volumePath and the top or master volume. | |
103 | virtual Bool_t GetTransformation(const TString& volumePath, | |
104 | TGeoHMatrix& matrix); | |
105 | ||
106 | // Return the name of the shape and its parameters for the volume | |
107 | // specified by the volume name. | |
108 | virtual Bool_t GetShape(const TString& volumePath, | |
109 | TString& shapeType, TArrayD& par); | |
110 | ||
111 | // Returns the material parameters for the volume specified by | |
112 | // the volume name. | |
113 | virtual Bool_t GetMaterial(const TString& volumeName, | |
114 | TString& name, Int_t& imat, | |
115 | Double_t& a, Double_t& z, Double_t& density, | |
116 | Double_t& radl, Double_t& inter, TArrayD& par); | |
117 | ||
118 | // Returns the medium parameters for the volume specified by the | |
119 | // volume name. | |
120 | virtual Bool_t GetMedium(const TString& volumeName, | |
121 | TString& name, Int_t& imed, | |
122 | Int_t& nmat, Int_t& isvol, Int_t& ifield, | |
123 | Double_t& fieldm, Double_t& tmaxfd, Double_t& stemax, | |
124 | Double_t& deemax, Double_t& epsil, Double_t& stmin, | |
125 | TArrayD& par); | |
126 | ||
b496f27c | 127 | virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov, |
128 | Float_t *absco, Float_t *effic, Float_t *rindex); | |
129 | virtual void SetCerenkov(Int_t itmed, Int_t npckov, Double_t *ppckov, | |
130 | Double_t *absco, Double_t *effic, Double_t *rindex); | |
b2be0e73 | 131 | virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov, |
132 | Float_t *absco, Float_t *effic, Float_t *rindex, Float_t *rfl); | |
133 | virtual void SetCerenkov(Int_t itmed, Int_t npckov, Double_t *ppckov, | |
134 | Double_t *absco, Double_t *effic, Double_t *rindex, Double_t *rfl); | |
b496f27c | 135 | |
c54ce58e | 136 | // |
137 | virtual void DefineOpSurface(const char* name, EMCOpSurfaceModel model, EMCOpSurfaceType surface, | |
138 | EMCOpSurfaceFinish surfaceFinish, Double_t sigmaAlpha); | |
139 | ||
140 | virtual void SetBorderSurface(const char* name, const char* vol1Name, int vol1CopyNo, const char* vol2Name, int vol2CopyNo, | |
141 | const char* opSurfaceName); | |
142 | ||
b496f27c | 143 | |
c54ce58e | 144 | virtual void SetSkinSurface(const char* name, const char* volName, const char* opSurfaceName); |
145 | ||
146 | virtual void SetMaterialProperty(Int_t itmed, const char* propertyName, Int_t np, Double_t* pp, Double_t* values); | |
147 | ||
148 | virtual void SetMaterialProperty(Int_t itmed, const char* propertyName, Double_t value); | |
149 | ||
150 | virtual void SetMaterialProperty(const char* surfaceName, const char* propertyName, Int_t np, Double_t* pp, Double_t* values); | |
151 | ||
b496f27c | 152 | // Functions for drawing |
153 | virtual void DrawOneSpec(const char* /*name*/) | |
a9ea1616 | 154 | {Warning("DrawOneSpec", "Not yet implemented !\n");} |
b496f27c | 155 | virtual void Gsatt(const char* name, const char* att, Int_t val); |
156 | virtual void Gdraw(const char*,Double_t /*theta = 30*/, Double_t /*phi = 30*/, | |
157 | Double_t /*psi = 0*/, Double_t /*u0 = 10*/, Double_t /*v0 = 10*/, | |
158 | Double_t /*ul = 0.01*/, Double_t /*vl = 0.01*/) | |
a9ea1616 | 159 | {Warning("Gdraw", "Not yet implemented !\n");} |
829fb838 | 160 | |
161 | // Euclid | |
b496f27c | 162 | virtual void WriteEuclid(const char*, const char*, Int_t, Int_t); |
829fb838 | 163 | |
b496f27c | 164 | // Getters |
a9ea1616 | 165 | Int_t GetDummyRegion() const; |
166 | Int_t GetDummyLattice() const; | |
b496f27c | 167 | virtual Int_t VolId(const Text_t* volName) const; |
168 | virtual const char* VolName(Int_t id) const; | |
169 | virtual Int_t NofVolumes() const {return fNVolumes;} | |
170 | virtual Int_t VolId2Mate(Int_t id) const; | |
a8e4986c | 171 | // Return the unique numeric identifier for medium name mediumName |
172 | virtual Int_t MediumId(const Text_t* mediumName) const; | |
173 | ||
829fb838 | 174 | // |
b496f27c | 175 | // Methods for physics management |
829fb838 | 176 | // ------------------------------------------------ |
177 | // | |
178 | ||
b496f27c | 179 | // User configuration |
b2129742 | 180 | virtual Bool_t SetProcess(const char* flagName, Int_t flagValue); |
181 | virtual void SetProcess(const char* flagName, Int_t flagValue, Int_t imed); | |
182 | virtual Bool_t SetCut(const char* cutName, Double_t cutValue); | |
183 | virtual void SetCut(const char* cutName, Double_t cutValue, Int_t imed); | |
acf2e119 | 184 | virtual void SetModelParameter(const char* parName, Double_t parValue, Int_t imed); |
fb2cbbec | 185 | virtual TObjArray* GetListOfUserConfigs() {return fUserConfig;} |
b2129742 | 186 | virtual Double_t Xsec(char*, Double_t, Int_t, Int_t); |
f450e9d0 | 187 | |
829fb838 | 188 | |
b496f27c | 189 | // Particle table usage |
190 | virtual Int_t IdFromPDG(Int_t id) const; | |
191 | virtual Int_t PDGFromId(Int_t pdg) const; | |
192 | virtual void DefineParticles() | |
a9ea1616 | 193 | {Warning("DefineParticles", "Not yet implemented !\n");} |
829fb838 | 194 | |
195 | // | |
196 | // methods for step management | |
197 | // ------------------------------------------------ | |
198 | // | |
199 | ||
b496f27c | 200 | // Action methods |
bd3d5c8a | 201 | virtual void StopTrack(); |
202 | virtual void ResetStoppingCondition() {fStopped = kFALSE;} | |
eb49ba4d | 203 | virtual Bool_t GetStoppingCondition() const {return fStopped;} |
bd3d5c8a | 204 | |
b496f27c | 205 | virtual void StopEvent() {fStopEvent = kTRUE;} |
206 | virtual void StopRun() {fStopEvent = kTRUE; fStopRun = kTRUE;} | |
eb49ba4d | 207 | virtual Bool_t EventIsStopped() const {return fStopEvent;} |
b496f27c | 208 | virtual void SetStopEvent(Bool_t flag) {fStopEvent = flag;} |
829fb838 | 209 | |
b496f27c | 210 | // Set methods |
07f5b33e | 211 | virtual void SetMaxStep (Double_t step); |
829fb838 | 212 | virtual void SetMaxNStep(Int_t); |
213 | virtual void SetUserDecay(Int_t); | |
214 | ||
b496f27c | 215 | // Get methods |
216 | // Tracking volume(s) | |
829fb838 | 217 | virtual Int_t CurrentVolID(Int_t& copyNo) const; |
218 | virtual Int_t CurrentVolOffID(Int_t off, Int_t& copyNo) const; | |
219 | virtual const char* CurrentVolName() const; | |
220 | virtual const char* CurrentVolOffName(Int_t off) const; | |
221 | virtual Int_t CurrentMaterial(Float_t &a, Float_t &z, | |
222 | Float_t &dens, Float_t &radl, Float_t &absl) const; | |
b496f27c | 223 | virtual Int_t CurrentEvent() const {return fNEvent;} |
224 | ||
829fb838 | 225 | virtual void Gmtod(Float_t* xm, Float_t* xd, Int_t iflag); |
226 | ||
227 | virtual void Gmtod(Double_t* xm, Double_t* xd, Int_t iflag); | |
228 | ||
229 | virtual void Gdtom(Float_t* xd, Float_t* xm, Int_t iflag); | |
230 | ||
231 | virtual void Gdtom(Double_t* xd, Double_t* xm, Int_t iflag); | |
232 | ||
2f09b80e | 233 | virtual Double_t MaxStep() const; |
829fb838 | 234 | virtual Int_t GetMaxNStep() const |
a9ea1616 | 235 | {Warning("GetMaxNStep", "Not yet implemented !\n"); return -1;} |
829fb838 | 236 | virtual Int_t GetMedium() const; |
432716fc | 237 | virtual Int_t CurrentMedium() const {return GetMedium();} |
829fb838 | 238 | |
b496f27c | 239 | // Tracking particle |
829fb838 | 240 | // dynamic properties |
241 | virtual void TrackPosition(TLorentzVector& position) const; | |
242 | virtual void TrackPosition(Double_t& x, Double_t& y, Double_t& z) const; | |
243 | virtual void TrackMomentum(TLorentzVector& momentum) const; | |
244 | virtual void TrackMomentum(Double_t& px, Double_t& py, Double_t& pz, Double_t& e) const; | |
245 | virtual Double_t TrackStep() const; | |
246 | virtual Double_t TrackLength() const; | |
247 | virtual Double_t TrackTime() const; | |
248 | virtual Double_t Edep() const; | |
b496f27c | 249 | // Static properties |
18e0cabb | 250 | virtual Int_t CorrectFlukaId() const; |
829fb838 | 251 | virtual Int_t TrackPid() const; |
252 | virtual Double_t TrackCharge() const; | |
253 | virtual Double_t TrackMass() const; | |
254 | virtual Double_t Etot() const; | |
b496f27c | 255 | // Track status |
829fb838 | 256 | virtual Bool_t IsNewTrack() const; |
257 | virtual Bool_t IsTrackInside() const; | |
258 | virtual Bool_t IsTrackEntering() const; | |
259 | virtual Bool_t IsTrackExiting() const; | |
260 | virtual Bool_t IsTrackOut() const; | |
261 | virtual Bool_t IsTrackDisappeared() const; | |
262 | virtual Bool_t IsTrackStop() const; | |
263 | virtual Bool_t IsTrackAlive() const; | |
264 | ||
b496f27c | 265 | // Secondaries |
7b203b6e | 266 | virtual Int_t NSecondaries() const; |
267 | virtual void SetNCerenkov(Int_t nc) {fNCerenkov = nc;} | |
268 | ||
829fb838 | 269 | virtual void GetSecondary(Int_t isec, Int_t& particleId, |
270 | TLorentzVector& position, TLorentzVector& momentum); | |
bd3d5c8a | 271 | virtual Bool_t SecondariesAreOrdered() const {return kFALSE;} |
829fb838 | 272 | virtual TMCProcess ProdProcess(Int_t iproc) const ; |
b496f27c | 273 | virtual Int_t StepProcesses(TArrayI & proc) const; |
829fb838 | 274 | // |
275 | // Geant3 specific methods | |
276 | // !!! need to be transformed to common interface | |
277 | // | |
278 | virtual void Gdopt(const char*,const char*) | |
a9ea1616 | 279 | {Warning("Gdopt", "Not yet implemented !\n");} |
829fb838 | 280 | virtual void SetClipBox(const char*,Double_t=-9999,Double_t=0, Double_t=-9999, |
281 | Double_t=0,Double_t=-9999,Double_t=0) | |
a9ea1616 | 282 | {Warning("SetClipBox", "Not yet implemented !\n");} |
829fb838 | 283 | virtual void DefaultRange() |
a9ea1616 | 284 | {Warning("DefaultRange", "Not yet implemented !\n");} |
829fb838 | 285 | virtual void Gdhead(Int_t, const char*, Double_t=0) |
a9ea1616 | 286 | {Warning("Gdhead", "Not yet implemented !\n");} |
829fb838 | 287 | virtual void Gdman(Double_t, Double_t, const char*) |
a9ea1616 | 288 | {Warning("Gdman", "Not yet implemented !\n");} |
829fb838 | 289 | virtual void SetColors() |
a9ea1616 | 290 | {Warning("SetColors", "Not yet implemented !\n");} |
829fb838 | 291 | virtual void Gtreve() |
a9ea1616 | 292 | {Warning("Gtreve", "Not yet implemented !\n");} |
829fb838 | 293 | virtual void GtreveRoot() |
a9ea1616 | 294 | {Warning("GtreveRoot", "Not yet implemented !\n");} |
829fb838 | 295 | virtual void Gckmat(Int_t, char*) |
a9ea1616 | 296 | {Warning("Gckmat", "Not yet implemented !\n");} |
829fb838 | 297 | virtual void InitLego() |
a9ea1616 | 298 | {Warning("InitLego", "Not yet implemented !\n");} |
b496f27c | 299 | // |
300 | virtual void Gfpart(Int_t pdg, char* name, Int_t& type, Float_t& mass, Float_t& charge, Float_t& tlife); | |
829fb838 | 301 | virtual void Gspart(Int_t, const char*, Int_t, Double_t, Double_t, Double_t) |
a9ea1616 | 302 | {Warning("Gspart", "Not yet implemented !\n");} |
b496f27c | 303 | |
b496f27c | 304 | // |
305 | // Particle Properties | |
306 | // ------------------- | |
307 | // | |
13f199e9 | 308 | virtual Bool_t DefineParticle(Int_t, const char*, TMCParticleType, Double_t, Double_t, Double_t) {return kFALSE;} |
309 | virtual Bool_t DefineParticle(Int_t, const char*, TMCParticleType, Double_t, Double_t, Double_t, | |
310 | const TString&, Double_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, | |
311 | Bool_t, Bool_t = kFALSE, const TString& = "", Int_t = 0, Double_t = 0.0, Double_t = 0.0) {return kFALSE;} | |
b496f27c | 312 | virtual Bool_t DefineIon(const char*, int, int, int, double, double) {return kFALSE;} |
313 | virtual TString ParticleName(int pdg) const; | |
314 | virtual Double_t ParticleMass(int pdg) const; | |
ece92b30 | 315 | virtual Double_t ParticleMassFPC(int fpc) const; |
b496f27c | 316 | virtual Double_t ParticleCharge(int pdg) const; |
317 | virtual Double_t ParticleLifeTime(int pdg) const; | |
318 | virtual TMCParticleType ParticleMCType(int) const {return (TMCParticleType) 9;} | |
829fb838 | 319 | // |
b496f27c | 320 | // Control methods |
829fb838 | 321 | // ------------------------------------------------ |
322 | // | |
323 | ||
324 | virtual void Init(); | |
325 | virtual void InitPhysics(); | |
326 | virtual void FinishGeometry(); | |
327 | virtual void BuildPhysics(); | |
328 | virtual void ProcessEvent(); | |
329 | virtual Bool_t ProcessRun(Int_t nevent); | |
330 | ||
f450e9d0 | 331 | |
332 | // | |
333 | // FLUKA Scoring specific methods | |
334 | // ------------------------------ | |
335 | // | |
6f1aaa8e | 336 | virtual void SetUserScoring(const char* option, const char* sdum, Int_t npr,char* outfile, Float_t* what); |
337 | virtual void SetUserScoring(const char* option, const char* sdum, Int_t npr,char* outfile, Float_t* what, | |
f450e9d0 | 338 | const char* det1, const char* det2, const char* det3); |
829fb838 | 339 | // |
b496f27c | 340 | // New Getter and Setters |
829fb838 | 341 | // ------------------------------------------------ |
342 | // | |
343 | // - Core input file name | |
344 | TString GetCoreInputFileName() const {return fCoreInputFileName;} | |
3b8c325d | 345 | void SetCoreInputFileName(const char* file = "coreFlukaVmc.inp") {fCoreInputFileName = file;} |
829fb838 | 346 | |
347 | // - Input file name | |
348 | TString GetInputFileName() const {return fInputFileName;} | |
3b8c325d | 349 | void SetInputFileName(const char* file = "FlukaVmc.inp") {fInputFileName = file;} |
829fb838 | 350 | |
829fb838 | 351 | // - Verbosity level |
352 | Int_t GetVerbosityLevel() const {return fVerbosityLevel;} | |
353 | void SetVerbosityLevel(Int_t l) {fVerbosityLevel = l;} | |
354 | ||
4aba9d66 | 355 | // |
356 | // - Fluka Draw procedures identifiers, see TFlukaCodes.h | |
357 | // | |
a9ea1616 | 358 | FlukaCallerCode_t GetCaller() const {return fCaller;} |
a9ea1616 | 359 | FlukaProcessCode_t GetIcode() const {return fIcode;} |
829fb838 | 360 | Int_t GetMreg() const {return fCurrentFlukaRegion;} |
829fb838 | 361 | Int_t GetNewreg() const {return fNewReg;} |
829fb838 | 362 | Double_t GetRull() const {return fRull;} |
829fb838 | 363 | Double_t GetXsco() const {return fXsco;} |
829fb838 | 364 | Double_t GetYsco() const {return fYsco;} |
829fb838 | 365 | Double_t GetZsco() const {return fZsco;} |
4aba9d66 | 366 | Int_t GetCurrentFlukaRegion() const {return fCurrentFlukaRegion;} |
367 | // - Fluka Draw Setters | |
368 | void SetCurrentFlukaRegion(Int_t reg) {fCurrentFlukaRegion=reg;} | |
369 | void SetCaller(FlukaCallerCode_t l) {fCaller = l;} | |
370 | void SetIcode(FlukaProcessCode_t l) {fIcode = l;} | |
371 | void SetMreg(Int_t l, Int_t lttc); | |
372 | void SetNewreg(Int_t l, Int_t /*lttc*/) {fNewReg = l;} | |
373 | void SetRull(Double_t r) {fRull = r;} | |
374 | void SetXsco(Double_t x) {fXsco = x;} | |
375 | void SetYsco(Double_t y) {fYsco = y;} | |
5125d6e5 | 376 | void SetZsco(Double_t z) {fZsco = z;} |
9216eabf | 377 | void SetPint(Double_t px, Double_t py, Double_t pz, Double_t e) {fPint[0] = px; fPint[1] = py; fPint[2] = pz; fPint[3] = e;} |
4aba9d66 | 378 | void SetTrackIsEntering(){fTrackIsEntering = kTRUE; fTrackIsExiting = kFALSE;} |
379 | void SetTrackIsExiting() {fTrackIsExiting = kTRUE; fTrackIsEntering = kFALSE;} | |
380 | void SetTrackIsInside() {fTrackIsExiting = kFALSE; fTrackIsEntering = kFALSE;} | |
381 | void SetTrackIsNew(Bool_t flag = kTRUE); | |
829fb838 | 382 | |
383 | void SetDummyBoundary(Int_t mode) {fDummyBoundary = mode;} | |
384 | Int_t GetDummyBoundary() const {return fDummyBoundary;} | |
385 | Bool_t IsDummyBoundary() const {return (fDummyBoundary==0)?kFALSE:kTRUE;} | |
386 | ||
829fb838 | 387 | void EnableField(Bool_t flag=kTRUE) {fFieldFlag = flag;} |
388 | Bool_t IsFieldEnabled() const {return fFieldFlag;} | |
7cad64b7 | 389 | |
5125d6e5 | 390 | Int_t GetMaterialIndex(Int_t idmat) const {return fMaterials[idmat];} |
4aba9d66 | 391 | |
392 | TObjArray * GetFlukaMaterials(); | |
5125d6e5 | 393 | virtual void SetRootGeometry() {;} // Dummy |
a2f1f85d | 394 | virtual Int_t NofVolDaughters(const char* volName) const; |
395 | virtual const char* VolDaughterName(const char* volName, Int_t i) const; | |
396 | virtual Int_t VolDaughterCopyNo(const char* volName, Int_t i) const; | |
397 | virtual const char* CurrentVolPath(); | |
398 | virtual void ForceDecayTime(Float_t){;} | |
b1fd8547 | 399 | // |
400 | // Info about primary ionization electrons | |
401 | Int_t GetNPrimaryElectrons(); | |
5125d6e5 | 402 | Double_t GetPrimaryElectronKineticEnergy(Int_t i) const; |
15a8a899 | 403 | void GetPrimaryElectronPosition(Int_t i, Double_t& x, Double_t& y, Double_t& z, Double_t& t) const; |
5125d6e5 | 404 | void SetCurrentPrimaryElectronIndex(Int_t i) {fPrimaryElectronIndex = i;} |
b6a89226 | 405 | void PrimaryIonisationStepping(Int_t nprim); |
ca01d0af | 406 | |
407 | void AddIon(Int_t a, Int_t z) const; | |
408 | Int_t GetIonPdg(Int_t z, Int_t a, Int_t i = 0) const; | |
5125d6e5 | 409 | private: |
4aba9d66 | 410 | |
411 | // Copy constructor and operator= declared but not implemented (-Weff++ flag) | |
412 | TFluka(const TFluka &mc); //: TVirtualMC(mc) {;} | |
413 | TFluka & operator=(const TFluka &); // {return (*this);} | |
414 | ||
13858fbd | 415 | void PrintHeader(); |
416 | void AddParticlesToPdgDataBase() const; | |
ca01d0af | 417 | |
cee6a756 | 418 | Int_t GetSpecialPdg(Int_t number) const; |
419 | ||
b6a89226 | 420 | Float_t* CreateFloatArray(Double_t* array, Int_t size) const; |
421 | ||
ea262cc6 | 422 | // |
829fb838 | 423 | Int_t fVerbosityLevel; //Verbosity level (0 lowest - 3 highest) |
b496f27c | 424 | Int_t fNEvent; //Current event number |
3b8c325d | 425 | TString fInputFileName; //Name of the real input file |
426 | TString fCoreInputFileName; //Name of the input file | |
829fb838 | 427 | |
4aba9d66 | 428 | FlukaCallerCode_t fCaller; // Parameter to indicate who is the caller of the Fluka Draw |
429 | FlukaProcessCode_t fIcode; // Fluka Draw procedures formal parameter | |
430 | Int_t fNewReg; // Fluka Draw procedures formal parameter | |
431 | Double_t fRull; // Fluka Draw procedures formal parameter | |
432 | Double_t fXsco; // Fluka Draw procedures formal parameter | |
433 | Double_t fYsco; // Fluka Draw procedures formal parameter | |
434 | Double_t fZsco; // Fluka Draw procedures formal parameter | |
9216eabf | 435 | Double_t fPint[4]; // 4-vector of particle after interaction |
5125d6e5 | 436 | Bool_t fTrackIsEntering; // Flag for track entering |
437 | Bool_t fTrackIsExiting; // Flag for track exiting | |
438 | Bool_t fTrackIsNew; // Flag for new track | |
439 | Bool_t fFieldFlag; // Flag for magnetic field | |
5125d6e5 | 440 | Int_t fDummyBoundary; // Flag for crossing dummy boundaries |
441 | Bool_t fStopped; // Flag for stopping | |
442 | Bool_t fStopEvent; // Flag for stopped event | |
443 | Bool_t fStopRun; // Flag for stopped run | |
444 | Int_t fPrimaryElectronIndex; // Primary electron Index | |
bd3d5c8a | 445 | |
b496f27c | 446 | // |
829fb838 | 447 | //Geometry through TGeo |
b496f27c | 448 | // |
449 | Int_t* fMaterials; //!Array of indices | |
829fb838 | 450 | Int_t fNVolumes; //!Current number of volumes |
7b203b6e | 451 | Int_t fCurrentFlukaRegion; // Index of fluka region at each step |
452 | Int_t fNCerenkov; // Number of cerekov photons | |
829fb838 | 453 | TFlukaMCGeometry *fGeom; // TGeo-FLUKA interface |
454 | TGeoMCGeometry *fMCGeo; // Interface to TGeo builder | |
455 | ||
1df5fa54 | 456 | // SetProcess, SetCut and user Scoring dynamic storage |
fb2cbbec | 457 | TObjArray* fUserConfig; // List of user physics configuration |
1df5fa54 | 458 | TObjArray* fUserScore; // List of user scoring options |
459 | ||
4aba9d66 | 460 | |
829fb838 | 461 | ClassDef(TFluka,1) //C++ interface to Fluka montecarlo |
a2f1f85d | 462 | |
463 | ||
464 | // Temporary implementation of new functions | |
465 | // To be removed with the next release | |
829fb838 | 466 | }; |
a2f1f85d | 467 | inline Int_t TFluka::NofVolDaughters(const char* /*volName*/) const { |
468 | Warning("NofVolDaughters", "New function - not yet implemented."); | |
469 | return 0; | |
470 | } | |
471 | ||
472 | inline const char* TFluka::VolDaughterName(const char* /*volName*/, Int_t /*i*/) const { | |
473 | Warning("VolDaughterName", "New function - not yet implemented."); | |
474 | return ""; | |
475 | } | |
476 | ||
477 | inline Int_t TFluka::VolDaughterCopyNo(const char* /*volName*/, Int_t /*i*/) const { | |
478 | Warning("VolDaughterCopyNo", "New function - not yet implemented."); | |
479 | return 0; | |
480 | } | |
481 | ||
d59acfe7 | 482 | |
c54ce58e | 483 | inline void TFluka::DefineOpSurface(const char* /*name*/, EMCOpSurfaceModel /*model*/, EMCOpSurfaceType /*surface*/, |
484 | EMCOpSurfaceFinish /*surfaceFinish*/, Double_t /*sigmaAlpha*/) | |
485 | { | |
486 | Warning("DefineOpSurface", "New function - not yet implemented."); | |
487 | } | |
488 | ||
489 | ||
490 | inline void TFluka::SetBorderSurface(const char* /*name*/, const char* /*vol1Name*/, int /*vol1CopyNo*/, const char* /*vol2Name*/, | |
491 | int /*vol2CopyNo*/, const char* /*opSurfaceName*/) | |
492 | { | |
493 | Warning("SetBorderSurface", "New function - not yet implemented."); | |
494 | } | |
495 | ||
496 | ||
497 | inline void TFluka::SetSkinSurface(const char* /*name*/, const char* /*volName*/, const char* /*opSurfaceName*/) | |
498 | { | |
499 | Warning("SetSkinSurface", "New function - not yet implemented."); | |
500 | } | |
501 | ||
502 | ||
503 | inline void TFluka::SetMaterialProperty(Int_t /*itmed*/, const char* /*propertyName*/, Int_t /*np*/, Double_t* /*pp*/, Double_t* /*values*/) | |
504 | { | |
505 | Warning("SetMaterialProperty", "New function - not yet implemented."); | |
506 | } | |
507 | ||
508 | ||
509 | inline void TFluka::SetMaterialProperty(Int_t /*itmed*/, const char* /*propertyName*/, Double_t /*value*/) | |
510 | { | |
511 | Warning("SetMaterialProperty", "New function - not yet implemented."); | |
512 | } | |
513 | ||
514 | ||
515 | inline void TFluka::SetMaterialProperty(const char* /*surfaceName*/, const char* /*propertyName*/, Int_t /*np*/, | |
516 | Double_t* /*pp*/, Double_t* /*values*/) | |
517 | { | |
518 | Warning("SetMaterialProperty", "New function - not yet implemented."); | |
519 | } | |
520 | ||
521 | ||
829fb838 | 522 | |
523 | #endif //TFLUKA | |
524 |