4 // See the class description in the header file.
8 #include "TG4Globals.h"
9 #include "TG4GeometryManager.h"
11 #include "AliDecayer.h"
13 TFluka::TFluka(const char* name, const char* title)
16 // create geometry manager
17 fGeometryManager = new TG4GeometryManager();
19 //G4cout << "TG4GeometryManager has been created." << endl;
26 TFluka::TFluka(const TFluka& right) {
28 TG4Globals::Exception("TFluka is protected from copying.");
33 delete fGeometryManager;
38 TFluka& TFluka::operator=(const TFluka& right)
40 // check assignement to self
41 if (this == &right) return *this;
43 TG4Globals::Exception("TFluka is protected from assigning.");
49 // methods for building/management of geometry
50 // ------------------------------------------------
52 void TFluka::FinishGeometry() {
54 fGeometryManager->Ggclos();
57 void TFluka::Gfmate(Int_t imat, char *name, Float_t &a, Float_t &z,
58 Float_t &dens, Float_t &radl, Float_t &absl,
59 Float_t* ubuf, Int_t& nbuf) {
62 ->Gfmate(imat, name, a, z, dens, radl, absl, ubuf, nbuf);
65 void TFluka::Material(Int_t& kmat, const char* name, Float_t a,
66 Float_t z, Float_t dens, Float_t radl, Float_t absl,
67 Float_t* buf, Int_t nwbuf) {
70 ->Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
73 void TFluka::Mixture(Int_t& kmat, const char *name, Float_t *a,
74 Float_t *z, Float_t dens, Int_t nlmat, Float_t *wmat) {
77 ->Mixture(kmat, name, a, z, dens, nlmat, wmat);
80 void TFluka::Medium(Int_t& kmed, const char *name, Int_t nmat,
81 Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd,
82 Float_t stemax, Float_t deemax, Float_t epsil,
83 Float_t stmin, Float_t* ubuf, Int_t nbuf) {
86 ->Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax,
87 epsil, stmin, ubuf, nbuf);
90 void TFluka::Matrix(Int_t& krot, Float_t thetaX, Float_t phiX,
91 Float_t thetaY, Float_t phiY, Float_t thetaZ,
95 ->Matrix(krot, thetaX, phiX, thetaY, phiY, thetaZ, phiZ);
98 void TFluka::Gstpar(Int_t itmed, const char *param, Float_t parval) {
100 fGeometryManager->Gstpar(itmed, param, parval);
103 Int_t TFluka::Gsvolu(const char *name, const char *shape, Int_t nmed,
104 Float_t *upar, Int_t np) {
106 return fGeometryManager->Gsvolu(name, shape, nmed, upar, np);
109 void TFluka::Gsdvn(const char *name, const char *mother, Int_t ndiv,
112 fGeometryManager->Gsdvn(name, mother, ndiv, iaxis);
115 void TFluka::Gsdvn2(const char *name, const char *mother, Int_t ndiv,
116 Int_t iaxis, Float_t c0i, Int_t numed) {
118 fGeometryManager->Gsdvn2(name, mother, ndiv, iaxis, c0i, numed);
121 void TFluka::Gsdvt(const char *name, const char *mother, Float_t step,
122 Int_t iaxis, Int_t numed, Int_t ndvmx) {
124 fGeometryManager->Gsdvt(name, mother, step, iaxis, numed, ndvmx);
127 void TFluka::Gsdvt2(const char *name, const char *mother, Float_t step,
128 Int_t iaxis, Float_t c0, Int_t numed, Int_t ndvmx) {
130 fGeometryManager->Gsdvt2(name, mother, step, iaxis, c0, numed, ndvmx);
133 void TFluka::Gsord(const char *name, Int_t iax) {
135 fGeometryManager->Gsord(name, iax);
138 void TFluka::Gspos(const char *name, Int_t nr, const char *mother,
139 Float_t x, Float_t y, Float_t z, Int_t irot,
142 fGeometryManager->Gspos(name, nr, mother, x, y, z, irot, konly);
145 void TFluka::Gsposp(const char *name, Int_t nr, const char *mother,
146 Float_t x, Float_t y, Float_t z, Int_t irot,
147 const char *konly, Float_t *upar, Int_t np) {
149 fGeometryManager->Gsposp(name, nr, mother, x, y, z, irot, konly, upar, np);
152 void TFluka::SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov,
153 Float_t *absco, Float_t *effic, Float_t *rindex) {
155 fGeometryManager->SetCerenkov(itmed, npckov, ppckov, absco, effic, rindex);
158 void TFluka::WriteEuclid(const char* fileName, const char* topVol,
159 Int_t number, Int_t nlevel) {
161 fGeometryManager->WriteEuclid(fileName, topVol, number, nlevel);
164 //======================================================================
166 // NOT IMPLEMENTED METHODS
168 //======================================================================
170 Int_t TFluka::VolId2Mate(Int_t id) const {
172 TG4Globals:: Warning("TFluka::VolId2Mate(..) is not implemented.");
176 Int_t TFluka::VolId(const Text_t* volName) const {
178 TG4Globals:: Warning("TFluka::VolId(..) is not implemented.");
182 const char* TFluka::VolName(Int_t id) const {
184 TG4Globals:: Warning("TFluka::VolName(..) is not implemented.");
188 Int_t TFluka::NofVolumes() const {
190 TG4Globals:: Warning("TFluka::NofVolumes(..) is not implemented.");
195 // methods for physics management
196 // ------------------------------------------------
198 void TFluka::BuildPhysics() {
200 TG4Globals:: Warning("TFluka::BuildPhysics(..) is not implemented.");
203 void TFluka::SetCut(const char* cutName, Float_t cutValue) {
205 TG4Globals:: Warning("TFluka::SetCut(..) is not implemented.");
208 void TFluka::SetProcess(const char* flagName, Int_t flagValue) {
210 TG4Globals:: Warning("TFluka::SetProcess(..) is not implemented.");
213 Float_t TFluka::Xsec(char* reac, Float_t energy, Int_t part, Int_t mate) {
215 TG4Globals:: Warning("TFluka::Xsec(..) is not implemented.");
219 void TFluka::SetExternalDecayer(AliDecayer* decayer) {
221 TG4Globals:: Warning("TFluka::SetExternalDecayer(..) is not implemented.");
224 AliDecayer* TFluka::Decayer() const {
226 TG4Globals:: Warning("TFluka::Decayer(..) is not implemented.");
231 Int_t TFluka::IdFromPDG(Int_t pdgID) const {
233 TG4Globals:: Warning("TFluka::IdFromPDG(..) is not implemented.");
237 Int_t TFluka::PDGFromId(Int_t mcID) const {
239 TG4Globals:: Warning("TFluka::PDGFromId(..) is not implemented.");
243 void TFluka::DefineParticles() {
245 TG4Globals:: Warning("TFluka::DefineParticles(..) is not implemented.");
248 // methods for step management
249 // ------------------------------------------------
251 void TFluka::StopTrack()
253 TG4Globals:: Warning("TFluka::StopTrack(..) is not implemented.");
256 void TFluka::StopEvent()
258 TG4Globals:: Warning("TFluka::StopEvent(..) is not implemented.");
261 void TFluka::SetMaxStep(Float_t step)
263 TG4Globals:: Warning("TFluka::SetMaxStep(..) is not implemented.");
266 void TFluka::SetMaxNStep(Int_t number)
268 TG4Globals:: Warning("TFluka::SetMaxNStep(..) is not implemented.");
271 void TFluka::SetUserDecay(Int_t number)
273 TG4Globals:: Warning("TFluka::SetUserDecay(..) is not implemented.");
276 Int_t TFluka::CurrentVolID(Int_t& copyNo) const
278 TG4Globals:: Warning("TFluka::CurrentVolID(..) is not implemented.");
282 Int_t TFluka::CurrentVolOffID(Int_t off, Int_t& copyNo) const
284 TG4Globals:: Warning("TFluka::CurrentVolOffID(..) is not implemented.");
288 const char* TFluka::CurrentVolName() const
290 TG4Globals:: Warning("TFluka::CurrentVolName(..) is not implemented.");
294 const char* TFluka::CurrentVolOffName(Int_t off) const
296 TG4Globals:: Warning("TFluka::CurrentVolOffName(..) is not implemented.");
300 Int_t TFluka::CurrentMaterial(Float_t &a, Float_t &z,
301 Float_t &dens, Float_t &radl, Float_t &absl) const
303 TG4Globals:: Warning("TFluka::CurrentMaterial(..) is not implemented.");
307 void TFluka::Gmtod(Float_t* xm, Float_t* xd, Int_t iflag)
309 TG4Globals:: Warning("TFluka::Gmtod(..) is not implemented.");
312 void TFluka::Gdtom(Float_t* xd, Float_t* xm, Int_t iflag)
314 TG4Globals:: Warning("TFluka::Gdtom(..) is not implemented.");
317 Float_t TFluka::MaxStep() const
319 TG4Globals:: Warning("TFluka::MaxStep(..) is not implemented.");
323 Int_t TFluka::GetMaxNStep() const
325 TG4Globals:: Warning("TFluka::GetMaxNStep(..) is not implemented.");
329 Int_t TFluka::GetMedium() const
331 TG4Globals:: Warning("TFluka::GetMedium(..) is not implemented.");
335 void TFluka::TrackPosition(TLorentzVector& position) const
337 TG4Globals:: Warning("TFluka::TrackPosition(..) is not implemented.");
340 void TFluka::TrackMomentum(TLorentzVector& momentum) const
342 TG4Globals:: Warning("TFluka::TrackMomentum(..) is not implemented.");
345 void TFluka::TrackVertexPosition(TLorentzVector& position) const
347 TG4Globals:: Warning("TFluka::TrackVertexPosition(..) is not implemented.");
350 void TFluka::TrackVertexMomentum(TLorentzVector& momentum) const
352 TG4Globals:: Warning("TFluka::TrackVertexMomentum(..) is not implemented.");
355 Float_t TFluka::TrackStep() const
357 TG4Globals:: Warning("TFluka::TrackStep(..) is not implemented.");
361 Float_t TFluka::TrackLength() const
363 TG4Globals:: Warning("TFluka::TrackLength(..) is not implemented.");
367 Float_t TFluka::TrackTime() const
369 TG4Globals:: Warning("TFluka::TrackTime(..) is not implemented.");
373 Float_t TFluka::Edep() const
375 TG4Globals:: Warning("TFluka::Edep(..) is not implemented.");
379 Int_t TFluka::TrackPid() const
381 TG4Globals:: Warning("TFluka::TrackPid(..) is not implemented.");
385 Float_t TFluka::TrackCharge() const
387 TG4Globals:: Warning("TFluka::TrackCharge(..) is not implemented.");
391 Float_t TFluka::TrackMass() const
393 TG4Globals:: Warning("TFluka::TrackMass(..) is not implemented.");
397 Float_t TFluka::Etot() const
399 TG4Globals:: Warning("TFluka::Etot(..) is not implemented.");
403 Bool_t TFluka::IsTrackInside() const
405 TG4Globals:: Warning("TFluka::IsTrackInside(..) is not implemented.");
409 Bool_t TFluka::IsTrackEntering() const
411 TG4Globals:: Warning("TFluka::IsTrackEntering(..) is not implemented.");
415 Bool_t TFluka::IsTrackExiting() const
417 TG4Globals:: Warning("TFluka::IsTrackExiting(..) is not implemented.");
421 Bool_t TFluka::IsTrackOut() const
423 TG4Globals:: Warning("TFluka::IsTrackOut(..) is not implemented.");
427 Bool_t TFluka::IsTrackDisappeared() const
429 TG4Globals:: Warning("TFluka::IsTrackDisappeared(..) is not implemented.");
433 Bool_t TFluka::IsTrackStop() const
435 TG4Globals:: Warning("TFluka::IsTrackStop(..) is not implemented.");
439 Bool_t TFluka::IsTrackAlive() const
441 TG4Globals:: Warning("TFluka::IsTrackAlive(..) is not implemented.");
445 Bool_t TFluka::IsNewTrack() const
447 TG4Globals:: Warning("TFluka::IsNewTrack(..) is not implemented.");
451 Int_t TFluka::NSecondaries() const
453 TG4Globals:: Warning("TFluka::NSecondaries(..) is not implemented.");
457 void TFluka::GetSecondary(Int_t isec, Int_t& particleId,
458 TLorentzVector& position, TLorentzVector& momentum)
460 TG4Globals:: Warning("TFluka::GetSecondary(..) is not implemented.");
463 AliMCProcess TFluka::ProdProcess(Int_t isec) const
465 TG4Globals:: Warning("TFluka::ProdProcess(..) is not implemented.");
469 Int_t TFluka::StepProcesses(TArrayI &proc) const
471 TG4Globals:: Warning("TFluka::StepProcesses(..) is not implemented.");
475 // methods for visualization
476 // ------------------------------------------------
478 void TFluka::DrawOneSpec(const char* name) {
480 TG4Globals:: Warning("TFluka::DrawOneSpec(): no visualization available.");
483 void TFluka::Gsatt(const char* name, const char* att, Int_t val) {
485 TG4Globals:: Warning("TFluka::Gsatt(): no visualization available.");
488 void TFluka::Gdraw(const char* p1, Float_t theta, Float_t phi,
489 Float_t psi, Float_t u0, Float_t v0,
490 Float_t ul, Float_t vl) {
492 TG4Globals:: Warning("TFluka::Gdraw(): no visualization available.");
496 // methods for run control
497 // ------------------------------------------------
499 void TFluka::Init() {
501 TG4Globals:: Warning("TFluka::Init(..) is not implemented.");
504 void TFluka::ProcessEvent() {
506 TG4Globals:: Warning("TFluka::ProcessEvent(..) is not implemented.");
509 void TFluka::ProcessRun(Int_t nofEvents) {
511 TG4Globals:: Warning("TFluka::ProcessRun(..) is not implemented.");
514 Int_t TFluka::CurrentEvent() const {
516 TG4Globals:: Warning("TFluka::CurrentEvent(..) is not implemented.");
520 // Geant3 specific methods
521 // !!! need to be transformed to common interface
522 // ------------------------------------------------
524 void TFluka::Gdopt(const char* name, const char* value) {
526 TG4Globals:: Warning("TFluka::Gdopt(..) is not implemented.");
529 void TFluka::SetClipBox(const char *name, Float_t xmin, Float_t xmax,
530 Float_t ymin, Float_t ymax, Float_t zmin, Float_t zmax) {
532 TG4Globals:: Warning("TFluka::SetClipBox(..) is not implemented.");
535 void TFluka::DefaultRange() {
537 TG4Globals:: Warning("TFluka::DefaultRange() is not implemented.");
540 void TFluka::Gdhead(Int_t isel, const char* name, Float_t chrsiz) {
542 TG4Globals:: Warning("TFluka::Gdhead(..) is not implemented.");
545 void TFluka::Gdman(Float_t u, Float_t v, const char* type) {
547 TG4Globals:: Warning("TFluka::Gdman(..) is not implemented.");
550 void TFluka::SetColors() {
552 TG4Globals:: Warning("TFluka::SetColours() is not implemented.");
555 void TFluka::Gtreve() {
557 TG4Globals:: Warning("TFluka::Gtreve() is not implemented.");
560 void TFluka::GtreveRoot() {
562 TG4Globals:: Warning("TFluka::GtreveRoot() is not implemented.");
565 void TFluka::Gckmat(Int_t itmed, char* natmed) {
567 TG4Globals:: Warning("TFluka::Gckmat(..) is not implemented.");
570 void TFluka::InitLego() {
572 TG4Globals:: Warning("TFluka::InitLego() is not implemented.");
575 void TFluka::Gfpart(Int_t ipart, char *name, Int_t& itrtyp,
576 Float_t& amass, Float_t& charge, Float_t& tlife) {
578 TG4Globals:: Warning("TFluka::Gfpart(..) is not implemented.");
581 void TFluka::Gspart(Int_t ipart, const char *name, Int_t itrtyp,
582 Float_t amass, Float_t charge, Float_t tlife) {
584 TG4Globals:: Warning("TFluka::Gspart(..) is not implemented.");