1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 // Author: I. Hrivnacova
21 // ------------------------
22 // See the class description in the header file.
26 #include "TG4Globals.h"
27 #include "TG4GeometryManager.h"
29 #include "AliDecayer.h"
31 TFluka::TFluka(const char* name, const char* title)
34 // create geometry manager
35 fGeometryManager = new TG4GeometryManager();
37 //G4cout << "TG4GeometryManager has been created." << endl;
44 TFluka::TFluka(const TFluka& right) {
46 TG4Globals::Exception("TFluka is protected from copying.");
51 delete fGeometryManager;
56 TFluka& TFluka::operator=(const TFluka& right)
58 // check assignement to self
59 if (this == &right) return *this;
61 TG4Globals::Exception("TFluka is protected from assigning.");
67 // methods for building/management of geometry
68 // ------------------------------------------------
70 void TFluka::FinishGeometry() {
72 fGeometryManager->Ggclos();
75 void TFluka::Gfmate(Int_t imat, char *name, Float_t &a, Float_t &z,
76 Float_t &dens, Float_t &radl, Float_t &absl,
77 Float_t* ubuf, Int_t& nbuf) {
80 ->Gfmate(imat, name, a, z, dens, radl, absl, ubuf, nbuf);
83 void TFluka::Material(Int_t& kmat, const char* name, Float_t a,
84 Float_t z, Float_t dens, Float_t radl, Float_t absl,
85 Float_t* buf, Int_t nwbuf) {
88 ->Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
91 void TFluka::Mixture(Int_t& kmat, const char *name, Float_t *a,
92 Float_t *z, Float_t dens, Int_t nlmat, Float_t *wmat) {
95 ->Mixture(kmat, name, a, z, dens, nlmat, wmat);
98 void TFluka::Medium(Int_t& kmed, const char *name, Int_t nmat,
99 Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd,
100 Float_t stemax, Float_t deemax, Float_t epsil,
101 Float_t stmin, Float_t* ubuf, Int_t nbuf) {
104 ->Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax,
105 epsil, stmin, ubuf, nbuf);
108 void TFluka::Matrix(Int_t& krot, Float_t thetaX, Float_t phiX,
109 Float_t thetaY, Float_t phiY, Float_t thetaZ,
113 ->Matrix(krot, thetaX, phiX, thetaY, phiY, thetaZ, phiZ);
116 void TFluka::Gstpar(Int_t itmed, const char *param, Float_t parval) {
118 fGeometryManager->Gstpar(itmed, param, parval);
121 Int_t TFluka::Gsvolu(const char *name, const char *shape, Int_t nmed,
122 Float_t *upar, Int_t np) {
124 return fGeometryManager->Gsvolu(name, shape, nmed, upar, np);
127 void TFluka::Gsdvn(const char *name, const char *mother, Int_t ndiv,
130 fGeometryManager->Gsdvn(name, mother, ndiv, iaxis);
133 void TFluka::Gsdvn2(const char *name, const char *mother, Int_t ndiv,
134 Int_t iaxis, Float_t c0i, Int_t numed) {
136 fGeometryManager->Gsdvn2(name, mother, ndiv, iaxis, c0i, numed);
139 void TFluka::Gsdvt(const char *name, const char *mother, Float_t step,
140 Int_t iaxis, Int_t numed, Int_t ndvmx) {
142 fGeometryManager->Gsdvt(name, mother, step, iaxis, numed, ndvmx);
145 void TFluka::Gsdvt2(const char *name, const char *mother, Float_t step,
146 Int_t iaxis, Float_t c0, Int_t numed, Int_t ndvmx) {
148 fGeometryManager->Gsdvt2(name, mother, step, iaxis, c0, numed, ndvmx);
151 void TFluka::Gsord(const char *name, Int_t iax) {
153 fGeometryManager->Gsord(name, iax);
156 void TFluka::Gspos(const char *name, Int_t nr, const char *mother,
157 Float_t x, Float_t y, Float_t z, Int_t irot,
160 fGeometryManager->Gspos(name, nr, mother, x, y, z, irot, konly);
163 void TFluka::Gsposp(const char *name, Int_t nr, const char *mother,
164 Float_t x, Float_t y, Float_t z, Int_t irot,
165 const char *konly, Float_t *upar, Int_t np) {
167 fGeometryManager->Gsposp(name, nr, mother, x, y, z, irot, konly, upar, np);
170 void TFluka::SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov,
171 Float_t *absco, Float_t *effic, Float_t *rindex) {
173 fGeometryManager->SetCerenkov(itmed, npckov, ppckov, absco, effic, rindex);
176 void TFluka::WriteEuclid(const char* fileName, const char* topVol,
177 Int_t number, Int_t nlevel) {
179 fGeometryManager->WriteEuclid(fileName, topVol, number, nlevel);
182 //======================================================================
184 // NOT IMPLEMENTED METHODS
186 //======================================================================
188 Int_t TFluka::VolId2Mate(Int_t id) const {
190 TG4Globals:: Warning("TFluka::VolId2Mate(..) is not implemented.");
194 Int_t TFluka::VolId(const Text_t* volName) const {
196 TG4Globals:: Warning("TFluka::VolId(..) is not implemented.");
200 const char* TFluka::VolName(Int_t id) const {
202 TG4Globals:: Warning("TFluka::VolName(..) is not implemented.");
206 Int_t TFluka::NofVolumes() const {
208 TG4Globals:: Warning("TFluka::NofVolumes(..) is not implemented.");
213 // methods for physics management
214 // ------------------------------------------------
216 void TFluka::BuildPhysics() {
218 TG4Globals:: Warning("TFluka::BuildPhysics(..) is not implemented.");
221 void TFluka::SetCut(const char* cutName, Float_t cutValue) {
223 TG4Globals:: Warning("TFluka::SetCut(..) is not implemented.");
226 void TFluka::SetProcess(const char* flagName, Int_t flagValue) {
228 TG4Globals:: Warning("TFluka::SetProcess(..) is not implemented.");
231 Float_t TFluka::Xsec(char* reac, Float_t energy, Int_t part, Int_t mate) {
233 TG4Globals:: Warning("TFluka::Xsec(..) is not implemented.");
237 void TFluka::SetExternalDecayer(AliDecayer* decayer) {
239 TG4Globals:: Warning("TFluka::SetExternalDecayer(..) is not implemented.");
242 AliDecayer* TFluka::Decayer() const {
244 TG4Globals:: Warning("TFluka::Decayer(..) is not implemented.");
249 Int_t TFluka::IdFromPDG(Int_t pdgID) const {
251 TG4Globals:: Warning("TFluka::IdFromPDG(..) is not implemented.");
255 Int_t TFluka::PDGFromId(Int_t mcID) const {
257 TG4Globals:: Warning("TFluka::PDGFromId(..) is not implemented.");
261 void TFluka::DefineParticles() {
263 TG4Globals:: Warning("TFluka::DefineParticles(..) is not implemented.");
266 // methods for step management
267 // ------------------------------------------------
269 void TFluka::StopTrack()
271 TG4Globals:: Warning("TFluka::StopTrack(..) is not implemented.");
274 void TFluka::StopEvent()
276 TG4Globals:: Warning("TFluka::StopEvent(..) is not implemented.");
279 void TFluka::SetMaxStep(Float_t step)
281 TG4Globals:: Warning("TFluka::SetMaxStep(..) is not implemented.");
284 void TFluka::SetMaxNStep(Int_t number)
286 TG4Globals:: Warning("TFluka::SetMaxNStep(..) is not implemented.");
289 void TFluka::SetUserDecay(Int_t number)
291 TG4Globals:: Warning("TFluka::SetUserDecay(..) is not implemented.");
294 Int_t TFluka::CurrentVolID(Int_t& copyNo) const
296 TG4Globals:: Warning("TFluka::CurrentVolID(..) is not implemented.");
300 Int_t TFluka::CurrentVolOffID(Int_t off, Int_t& copyNo) const
302 TG4Globals:: Warning("TFluka::CurrentVolOffID(..) is not implemented.");
306 const char* TFluka::CurrentVolName() const
308 TG4Globals:: Warning("TFluka::CurrentVolName(..) is not implemented.");
312 const char* TFluka::CurrentVolOffName(Int_t off) const
314 TG4Globals:: Warning("TFluka::CurrentVolOffName(..) is not implemented.");
318 Int_t TFluka::CurrentMaterial(Float_t &a, Float_t &z,
319 Float_t &dens, Float_t &radl, Float_t &absl) const
321 TG4Globals:: Warning("TFluka::CurrentMaterial(..) is not implemented.");
325 void TFluka::Gmtod(Float_t* xm, Float_t* xd, Int_t iflag)
327 TG4Globals:: Warning("TFluka::Gmtod(..) is not implemented.");
330 void TFluka::Gdtom(Float_t* xd, Float_t* xm, Int_t iflag)
332 TG4Globals:: Warning("TFluka::Gdtom(..) is not implemented.");
335 Float_t TFluka::MaxStep() const
337 TG4Globals:: Warning("TFluka::MaxStep(..) is not implemented.");
341 Int_t TFluka::GetMaxNStep() const
343 TG4Globals:: Warning("TFluka::GetMaxNStep(..) is not implemented.");
347 Int_t TFluka::GetMedium() const
349 TG4Globals:: Warning("TFluka::GetMedium(..) is not implemented.");
353 void TFluka::TrackPosition(TLorentzVector& position) const
355 TG4Globals:: Warning("TFluka::TrackPosition(..) is not implemented.");
358 void TFluka::TrackMomentum(TLorentzVector& momentum) const
360 TG4Globals:: Warning("TFluka::TrackMomentum(..) is not implemented.");
363 void TFluka::TrackVertexPosition(TLorentzVector& position) const
365 TG4Globals:: Warning("TFluka::TrackVertexPosition(..) is not implemented.");
368 void TFluka::TrackVertexMomentum(TLorentzVector& momentum) const
370 TG4Globals:: Warning("TFluka::TrackVertexMomentum(..) is not implemented.");
373 Float_t TFluka::TrackStep() const
375 TG4Globals:: Warning("TFluka::TrackStep(..) is not implemented.");
379 Float_t TFluka::TrackLength() const
381 TG4Globals:: Warning("TFluka::TrackLength(..) is not implemented.");
385 Float_t TFluka::TrackTime() const
387 TG4Globals:: Warning("TFluka::TrackTime(..) is not implemented.");
391 Float_t TFluka::Edep() const
393 TG4Globals:: Warning("TFluka::Edep(..) is not implemented.");
397 Int_t TFluka::TrackPid() const
399 TG4Globals:: Warning("TFluka::TrackPid(..) is not implemented.");
403 Float_t TFluka::TrackCharge() const
405 TG4Globals:: Warning("TFluka::TrackCharge(..) is not implemented.");
409 Float_t TFluka::TrackMass() const
411 TG4Globals:: Warning("TFluka::TrackMass(..) is not implemented.");
415 Float_t TFluka::Etot() const
417 TG4Globals:: Warning("TFluka::Etot(..) is not implemented.");
421 Bool_t TFluka::IsTrackInside() const
423 TG4Globals:: Warning("TFluka::IsTrackInside(..) is not implemented.");
427 Bool_t TFluka::IsTrackEntering() const
429 TG4Globals:: Warning("TFluka::IsTrackEntering(..) is not implemented.");
433 Bool_t TFluka::IsTrackExiting() const
435 TG4Globals:: Warning("TFluka::IsTrackExiting(..) is not implemented.");
439 Bool_t TFluka::IsTrackOut() const
441 TG4Globals:: Warning("TFluka::IsTrackOut(..) is not implemented.");
445 Bool_t TFluka::IsTrackDisappeared() const
447 TG4Globals:: Warning("TFluka::IsTrackDisappeared(..) is not implemented.");
451 Bool_t TFluka::IsTrackStop() const
453 TG4Globals:: Warning("TFluka::IsTrackStop(..) is not implemented.");
457 Bool_t TFluka::IsTrackAlive() const
459 TG4Globals:: Warning("TFluka::IsTrackAlive(..) is not implemented.");
463 Bool_t TFluka::IsNewTrack() const
465 TG4Globals:: Warning("TFluka::IsNewTrack(..) is not implemented.");
469 Int_t TFluka::NSecondaries() const
471 TG4Globals:: Warning("TFluka::NSecondaries(..) is not implemented.");
475 void TFluka::GetSecondary(Int_t isec, Int_t& particleId,
476 TLorentzVector& position, TLorentzVector& momentum)
478 TG4Globals:: Warning("TFluka::GetSecondary(..) is not implemented.");
481 AliMCProcess TFluka::ProdProcess(Int_t isec) const
483 TG4Globals:: Warning("TFluka::ProdProcess(..) is not implemented.");
487 Int_t TFluka::StepProcesses(TArrayI &proc) const
489 TG4Globals:: Warning("TFluka::StepProcesses(..) is not implemented.");
493 // methods for visualization
494 // ------------------------------------------------
496 void TFluka::DrawOneSpec(const char* name) {
498 TG4Globals:: Warning("TFluka::DrawOneSpec(): no visualization available.");
501 void TFluka::Gsatt(const char* name, const char* att, Int_t val) {
503 TG4Globals:: Warning("TFluka::Gsatt(): no visualization available.");
506 void TFluka::Gdraw(const char* p1, Float_t theta, Float_t phi,
507 Float_t psi, Float_t u0, Float_t v0,
508 Float_t ul, Float_t vl) {
510 TG4Globals:: Warning("TFluka::Gdraw(): no visualization available.");
514 // methods for run control
515 // ------------------------------------------------
517 void TFluka::Init() {
519 TG4Globals:: Warning("TFluka::Init(..) is not implemented.");
522 void TFluka::ProcessEvent() {
524 TG4Globals:: Warning("TFluka::ProcessEvent(..) is not implemented.");
527 void TFluka::ProcessRun(Int_t nofEvents) {
529 TG4Globals:: Warning("TFluka::ProcessRun(..) is not implemented.");
532 Int_t TFluka::CurrentEvent() const {
534 TG4Globals:: Warning("TFluka::CurrentEvent(..) is not implemented.");
538 // Geant3 specific methods
539 // !!! need to be transformed to common interface
540 // ------------------------------------------------
542 void TFluka::Gdopt(const char* name, const char* value) {
544 TG4Globals:: Warning("TFluka::Gdopt(..) is not implemented.");
547 void TFluka::SetClipBox(const char *name, Float_t xmin, Float_t xmax,
548 Float_t ymin, Float_t ymax, Float_t zmin, Float_t zmax) {
550 TG4Globals:: Warning("TFluka::SetClipBox(..) is not implemented.");
553 void TFluka::DefaultRange() {
555 TG4Globals:: Warning("TFluka::DefaultRange() is not implemented.");
558 void TFluka::Gdhead(Int_t isel, const char* name, Float_t chrsiz) {
560 TG4Globals:: Warning("TFluka::Gdhead(..) is not implemented.");
563 void TFluka::Gdman(Float_t u, Float_t v, const char* type) {
565 TG4Globals:: Warning("TFluka::Gdman(..) is not implemented.");
568 void TFluka::SetColors() {
570 TG4Globals:: Warning("TFluka::SetColours() is not implemented.");
573 void TFluka::Gtreve() {
575 TG4Globals:: Warning("TFluka::Gtreve() is not implemented.");
578 void TFluka::GtreveRoot() {
580 TG4Globals:: Warning("TFluka::GtreveRoot() is not implemented.");
583 void TFluka::Gckmat(Int_t itmed, char* natmed) {
585 TG4Globals:: Warning("TFluka::Gckmat(..) is not implemented.");
588 void TFluka::InitLego() {
590 TG4Globals:: Warning("TFluka::InitLego() is not implemented.");
593 void TFluka::Gfpart(Int_t ipart, char *name, Int_t& itrtyp,
594 Float_t& amass, Float_t& charge, Float_t& tlife) {
596 TG4Globals:: Warning("TFluka::Gfpart(..) is not implemented.");
599 void TFluka::Gspart(Int_t ipart, const char *name, Int_t itrtyp,
600 Float_t amass, Float_t charge, Float_t tlife) {
602 TG4Globals:: Warning("TFluka::Gspart(..) is not implemented.");