00001 #ifndef ROOT_TGeant3
00002 #define ROOT_TGeant3
00003
00004
00005
00006
00007
00009
00011
00012 #define WITHG3
00013 #ifdef WITHROOT
00014 #undef WITHG3
00015 #endif
00016 #ifdef WITHBOTH
00017 #undef WITHG3
00018 #undef WITHROOT
00019 #endif
00020
00021 #include "TVirtualMC.h"
00022 #include "TMCProcess.h"
00023 #include "TMCParticleType.h"
00024 #include "TGeoMCGeometry.h"
00025 #include "TObjArray.h"
00026 #include "TArrayI.h"
00027
00028 class TGeoHMatrix;
00029 class TArrayD;
00030 class TString;
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 typedef struct {
00042 Int_t iquest[100];
00043 } Quest_t;
00044
00045
00046
00047
00048 typedef struct {
00049 Int_t nzebra;
00050 Float_t gversn;
00051 Float_t zversn;
00052 Int_t ixstor;
00053 Int_t ixdiv;
00054 Int_t ixcons;
00055 Float_t fendq[16];
00056 Int_t lmain;
00057 Int_t lr1;
00058 } Gcbank_t;
00059
00060
00061
00062
00063
00064 typedef struct {
00065 Int_t jdigi;
00066 Int_t jdraw;
00067 Int_t jhead;
00068 Int_t jhits;
00069 Int_t jkine;
00070 Int_t jmate;
00071 Int_t jpart;
00072 Int_t jrotm;
00073 Int_t jrung;
00074 Int_t jset;
00075 Int_t jstak;
00076 Int_t jgstat;
00077 Int_t jtmed;
00078 Int_t jtrack;
00079 Int_t jvertx;
00080 Int_t jvolum;
00081 Int_t jxyz;
00082 Int_t jgpar;
00083 Int_t jgpar2;
00084 Int_t jsklt;
00085 } Gclink_t;
00086
00087
00088
00089
00090
00091 typedef struct {
00092 Int_t idebug;
00093 Int_t idemin;
00094 Int_t idemax;
00095 Int_t itest;
00096 Int_t idrun;
00097 Int_t idevt;
00098 Int_t ieorun;
00099 Int_t ieotri;
00100 Int_t ievent;
00101 Int_t iswit[10];
00102 Int_t ifinit[20];
00103 Int_t nevent;
00104 Int_t nrndm[2];
00105 } Gcflag_t;
00106
00107
00108
00109
00110 typedef struct {
00111 Int_t ikine;
00112 Float_t pkine[10];
00113 Int_t itra;
00114 Int_t istak;
00115 Int_t ivert;
00116 Int_t ipart;
00117 Int_t itrtyp;
00118 Int_t napart[5];
00119 Float_t amass;
00120 Float_t charge;
00121 Float_t tlife;
00122 Float_t vert[3];
00123 Float_t pvert[4];
00124 Int_t ipaold;
00125 } Gckine_t;
00126
00127
00128
00129
00130 #define MXGKIN 100
00131 typedef struct {
00132 Int_t kcase;
00133 Int_t ngkine;
00134 Float_t gkin[MXGKIN][5];
00135 Float_t tofd[MXGKIN];
00136 Int_t iflgk[MXGKIN];
00137 } Gcking_t;
00138
00139
00140
00141 #define MXPHOT 800
00142 typedef struct {
00143 Int_t ngphot;
00144 Float_t xphot[MXPHOT][11];
00145 } Gckin2_t;
00146
00147
00148
00149 typedef struct {
00150 Float_t gpos[MXGKIN][3];
00151 } Gckin3_t;
00152
00153
00154
00155 typedef struct {
00156 Int_t nmat;
00157 Int_t namate[5];
00158 Float_t a;
00159 Float_t z;
00160 Float_t dens;
00161 Float_t radl;
00162 Float_t absl;
00163 } Gcmate_t;
00164
00165
00166
00167
00168 typedef struct {
00169 Int_t numed;
00170 Int_t natmed[5];
00171 Int_t isvol;
00172 Int_t ifield;
00173 Float_t fieldm;
00174 Float_t tmaxfd;
00175 Float_t stemax;
00176 Float_t deemax;
00177 Float_t epsil;
00178 Float_t stmin;
00179 Float_t cfield;
00180 Float_t prec;
00181 Int_t iupd;
00182 Int_t istpar;
00183 Int_t numold;
00184 } Gctmed_t;
00185
00186
00187 #define MAXMEC 30
00188
00189
00190
00191
00192
00193
00194 typedef struct {
00195 Float_t vect[7];
00196 Float_t getot;
00197 Float_t gekin;
00198 Float_t vout[7];
00199 Int_t nmec;
00200 Int_t lmec[MAXMEC];
00201 Int_t namec[MAXMEC];
00202 Int_t nstep;
00203 Int_t maxnst;
00204 Float_t destep;
00205 Float_t destel;
00206 Float_t safety;
00207 Float_t sleng;
00208 Float_t step;
00209 Float_t snext;
00210 Float_t sfield;
00211 Float_t tofg;
00212 Float_t gekrat;
00213 Float_t upwght;
00214 Int_t ignext;
00215 Int_t inwvol;
00216 Int_t istop;
00217 Int_t igauto;
00218 Int_t iekbin;
00219 Int_t ilosl;
00220 Int_t imull;
00221 Int_t ingoto;
00222 Int_t nldown;
00223 Int_t nlevin;
00224 Int_t nlsav;
00225 Int_t istory;
00226 } Gctrak_t;
00227
00228
00229
00230
00231
00232 typedef struct {
00233 Int_t nlevel;
00234 Int_t names[15];
00235 Int_t number[15];
00236 Int_t lvolum[15];
00237 Int_t lindex[15];
00238 Int_t infrom;
00239 Int_t nlevmx;
00240 Int_t nldev[15];
00241 Int_t linmx[15];
00242 Float_t gtran[15][3];
00243 Float_t grmat[15][10];
00244 Float_t gonly[15];
00245 Float_t glx[3];
00246 } Gcvolu_t;
00247
00248
00249
00250 typedef struct {
00251 Int_t ihset;
00252 Int_t ihdet;
00253 Int_t iset;
00254 Int_t idet;
00255 Int_t idtype;
00256 Int_t nvname;
00257 Int_t numbv[20];
00258 } Gcsets_t;
00259
00260
00261
00262
00263 typedef struct {
00264 Int_t nmate;
00265 Int_t nvolum;
00266 Int_t nrotm;
00267 Int_t ntmed;
00268 Int_t ntmult;
00269 Int_t ntrack;
00270 Int_t npart;
00271 Int_t nstmax;
00272 Int_t nvertx;
00273 Int_t nhead;
00274 Int_t nbit;
00275 } Gcnum_t;
00276
00277
00278
00279
00280 typedef struct {
00281 Float_t cutgam;
00282 Float_t cutele;
00283 Float_t cutneu;
00284 Float_t cuthad;
00285 Float_t cutmuo;
00286 Float_t bcute;
00287 Float_t bcutm;
00288 Float_t dcute;
00289 Float_t dcutm;
00290 Float_t ppcutm;
00291 Float_t tofmax;
00292 Float_t gcuts[5];
00293 } Gccuts_t;
00294
00295
00296
00297
00298 typedef struct {
00299 Float_t gcalpha;
00300 Int_t iclose;
00301 Float_t pfinal[3];
00302 Float_t dstrt;
00303 Float_t wire1[3];
00304 Float_t wire2[3];
00305 Float_t p1[3];
00306 Float_t p2[3];
00307 Float_t p3[3];
00308 Float_t cleng[3];
00309 } Gcmore_t;
00310
00311
00312
00313
00314 typedef struct {
00315 Float_t sinmul[101];
00316 Float_t cosmul[101];
00317 Float_t sqrmul[101];
00318 Float_t omcmol;
00319 Float_t chcmol;
00320 Float_t ekmin;
00321 Float_t ekmax;
00322 Int_t nekbin;
00323 Int_t nek1;
00324 Float_t ekinv;
00325 Float_t geka;
00326 Float_t gekb;
00327 Float_t ekbin[200];
00328 Float_t elow[200];
00329 } Gcmulo_t;
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345 typedef struct {
00346 Int_t ipair;
00347 Float_t spair;
00348 Float_t slpair;
00349 Float_t zintpa;
00350 Float_t steppa;
00351 Int_t icomp;
00352 Float_t scomp;
00353 Float_t slcomp;
00354 Float_t zintco;
00355 Float_t stepco;
00356 Int_t iphot;
00357 Float_t sphot;
00358 Float_t slphot;
00359 Float_t zintph;
00360 Float_t stepph;
00361 Int_t ipfis;
00362 Float_t spfis;
00363 Float_t slpfis;
00364 Float_t zintpf;
00365 Float_t steppf;
00366 Int_t idray;
00367 Float_t sdray;
00368 Float_t sldray;
00369 Float_t zintdr;
00370 Float_t stepdr;
00371 Int_t ianni;
00372 Float_t sanni;
00373 Float_t slanni;
00374 Float_t zintan;
00375 Float_t stepan;
00376 Int_t ibrem;
00377 Float_t sbrem;
00378 Float_t slbrem;
00379 Float_t zintbr;
00380 Float_t stepbr;
00381 Int_t ihadr;
00382 Float_t shadr;
00383 Float_t slhadr;
00384 Float_t zintha;
00385 Float_t stepha;
00386 Int_t imunu;
00387 Float_t smunu;
00388 Float_t slmunu;
00389 Float_t zintmu;
00390 Float_t stepmu;
00391 Int_t idcay;
00392 Float_t sdcay;
00393 Float_t slife;
00394 Float_t sumlif;
00395 Float_t dphys1;
00396 Int_t iloss;
00397 Float_t sloss;
00398 Float_t soloss;
00399 Float_t stloss;
00400 Float_t dphys2;
00401 Int_t imuls;
00402 Float_t smuls;
00403 Float_t somuls;
00404 Float_t stmuls;
00405 Float_t dphys3;
00406 Int_t irayl;
00407 Float_t srayl;
00408 Float_t slrayl;
00409 Float_t zintra;
00410 Float_t stepra;
00411 } Gcphys_t;
00412
00413
00414
00415
00416
00417 typedef struct {
00418 Int_t ilabs;
00419 Float_t slabs;
00420 Float_t sllabs;
00421 Float_t zintla;
00422 Float_t stepla;
00423 Int_t isync;
00424 Int_t istra;
00425 } Gcphlt_t;
00426
00427
00428
00429 typedef struct {
00430 Int_t ioptim;
00431 } Gcopti_t;
00432
00433
00434
00435 typedef struct {
00436 Float_t thrind;
00437 Float_t pmin;
00438 Float_t dp;
00439 Float_t dndl;
00440 Int_t jmin;
00441 Int_t itckov;
00442 Int_t imckov;
00443 Int_t npckov;
00444 } Gctlit_t;
00445
00446
00447
00448
00449 typedef struct {
00450 Int_t vdma[624];
00451 Float_t raytra;
00452 Float_t veccos[3];
00453 } Gcvdma_t;
00454
00455
00456 #define MAXME1 30
00457
00458 typedef struct {
00459 Float_t polar[3];
00460 Int_t namec1[MAXME1];
00461 } Gctpol_t;
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482 #define MXPRED 10
00483 typedef struct {
00484 Double_t erdtrp[MXPRED*5*5];
00485 Float_t errin[15];
00486 Float_t errout[MXPRED*15];
00487 Float_t ertrsp[MXPRED*5*5];
00488 Float_t erxin[3];
00489 Float_t erxout[MXPRED*3];
00490 Float_t erpin[3];
00491 Float_t erpout[MXPRED*3];
00492 Int_t nepred;
00493 Int_t inlist;
00494 Int_t ilpred;
00495 Int_t iepred;
00496 } Ertrio_t;
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508 typedef struct {
00509 Float_t erpli[3*2];
00510 Float_t erplo[MXPRED*3*4];
00511 Float_t erleng[MXPRED];
00512 Int_t nameer[MXPRED];
00513 Int_t numver[MXPRED];
00514 Int_t iovler[MXPRED];
00515 Int_t leexac;
00516 Int_t leleng;
00517 Int_t leonly;
00518 Int_t leplan;
00519 Int_t lepoin;
00520 Int_t levolu;
00521 } Eropts_t;
00522
00523 typedef struct {
00524 char chopti[8];
00525 } Eroptc_t;
00526
00527
00528
00529
00530
00531 typedef struct {
00532 Double_t a[5][5];
00533 Double_t b[5][5];
00534 Double_t s[15];
00535 Double_t tn[3];
00536 Double_t t[5];
00537 Double_t cosl;
00538 Double_t sinl;
00539 Double_t cosp;
00540 Double_t sinp;
00541 Double_t cosl1;
00542 Int_t NEW;
00543 } Trcom3_t;
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553 typedef struct {
00554 Double_t ei[15];
00555 Double_t ef[15];
00556 Double_t asdsc[5*5];
00557 Float_t xi[3];
00558 Float_t ppi[3];
00559 Float_t hi[9];
00560 Float_t xf[3];
00561 Float_t pf[3];
00562 Float_t hf[9];
00563 Float_t chtr;
00564 Float_t dedx2;
00565 Float_t backtr;
00566 Float_t cutek;
00567 Float_t tlgcm2;
00568 Float_t tlrad;
00569 } Erwork_t;
00570
00571
00572
00573 typedef struct {
00574 Int_t lsamvl;
00575 } Gcchan_t;
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594 typedef struct {
00595 Int_t use_alt_dedx;
00596 } Ptopts_t;
00597
00598
00599
00600
00601
00602
00603
00604 class TGeant3 : public TVirtualMC {
00605
00606 public:
00607 TGeant3();
00608 TGeant3(const char *title, Int_t nwgeant=0);
00609 virtual ~TGeant3();
00610
00611 virtual void LoadAddress();
00612 virtual Bool_t IsRootGeometrySupported() const {return kFALSE;}
00613
00615
00616
00617
00618
00619
00620
00622
00623 void GeomIter();
00624 Int_t CurrentMaterial(Float_t &a, Float_t &z, Float_t &dens,
00625 Float_t &radl, Float_t &absl) const;
00626 Int_t NextVolUp(Text_t *name, Int_t ©);
00627 Int_t CurrentVolID(Int_t ©) const;
00628 Int_t CurrentVolOffID(Int_t off, Int_t ©) const;
00629 const char* CurrentVolName() const;
00630 const char *CurrentVolOffName(Int_t off) const;
00631 const char* CurrentVolPath();
00632 Int_t VolId(const Text_t *name) const;
00633 Int_t MediumId(const Text_t *name) const;
00634 Int_t IdFromPDG(Int_t pdg) const;
00635 Int_t PDGFromId(Int_t pdg) const;
00636 const char* VolName(Int_t id) const;
00637 Double_t Xsec(char* reac, Double_t energy, Int_t part, Int_t mate);
00638 void TrackPosition(TLorentzVector &xyz) const;
00639 void TrackPosition(Double_t &x, Double_t &y, Double_t &z) const;
00640 void TrackMomentum(TLorentzVector &xyz) const;
00641 void TrackMomentum(Double_t &px, Double_t &py, Double_t &pz,
00642 Double_t &etot) const;
00643 Int_t NofVolumes() const;
00644 Int_t NofVolDaughters(const char* volName) const;
00645 const char* VolDaughterName(const char* volName, Int_t i) const;
00646 Int_t VolDaughterCopyNo(const char* volName, Int_t i) const;
00647 Int_t VolId2Mate(Int_t id) const;
00648 Double_t TrackTime() const;
00649 Double_t TrackCharge() const;
00650 Double_t TrackMass() const;
00651 Double_t TrackStep() const;
00652 Double_t TrackLength() const;
00653 Int_t TrackPid() const;
00654 Bool_t IsNewTrack() const;
00655 Bool_t IsTrackInside() const;
00656 Bool_t IsTrackEntering() const;
00657 Bool_t IsTrackExiting() const;
00658 Bool_t IsTrackOut() const;
00659 Bool_t IsTrackDisappeared() const;
00660 Bool_t IsTrackStop() const;
00661 Bool_t IsTrackAlive() const;
00662 Int_t NSecondaries() const;
00663 Int_t CurrentEvent() const;
00664 TMCProcess ProdProcess(Int_t isec) const;
00665 Int_t StepProcesses(TArrayI &proc) const;
00666 void GetSecondary(Int_t isec, Int_t& ipart, TLorentzVector &x,
00667 TLorentzVector &p);
00668 Bool_t SecondariesAreOrdered() const {return kTRUE;}
00669 void StopTrack();
00670 void StopEvent();
00671 void StopRun();
00672 Double_t MaxStep() const;
00673 void SetMaxStep(Double_t maxstep);
00674 void SetMaxNStep(Int_t maxnstp);
00675 Int_t GetMaxNStep() const;
00676 void ForceDecayTime(Float_t time);
00677 Bool_t SetCut(const char* cutName, Double_t cutValue);
00678 Bool_t SetProcess(const char* flagName, Int_t flagValue);
00679 const char *GetPath();
00680 const char *GetNodeName();
00681 Bool_t DefineParticle(Int_t pdg, const char* name,
00682 TMCParticleType mcType,
00683 Double_t mass, Double_t charge, Double_t lifetime);
00684 Bool_t DefineParticle(Int_t pdg, const char* name,
00685 TMCParticleType mcType,
00686 Double_t mass, Double_t charge, Double_t lifetime,
00687 const TString& , Double_t ,
00688 Int_t , Int_t , Int_t ,
00689 Int_t , Int_t , Int_t ,
00690 Int_t , Int_t ,
00691 Bool_t , Bool_t = kFALSE,
00692 const TString& = "",
00693 Int_t = 0, Double_t = 0.0,
00694 Double_t = 0.0);
00695 Bool_t DefineIon(const char* name, Int_t Z, Int_t A, Int_t Q,
00696 Double_t excEnergy, Double_t mass);
00697 virtual TString ParticleName(Int_t pdg) const;
00698 virtual Double_t ParticleMass(Int_t pdg) const;
00699 virtual Double_t ParticleCharge(Int_t pdg) const;
00700 virtual Double_t ParticleLifeTime(Int_t pdg) const;
00701 virtual TMCParticleType ParticleMCType(Int_t pdg) const;
00702
00703 virtual Int_t CurrentMedium() const;
00704 virtual Int_t GetMedium() const;
00705 virtual Double_t Edep() const;
00706 virtual Double_t Etot() const;
00707
00708 virtual void Material(Int_t& kmat, const char* name, Double_t a, Double_t z,
00709 Double_t dens, Double_t radl, Double_t absl,
00710 Float_t* buf=0, Int_t nwbuf=0);
00711 virtual void Material(Int_t& kmat, const char* name, Double_t a, Double_t z,
00712 Double_t dens, Double_t radl, Double_t absl,
00713 Double_t* buf, Int_t nwbuf);
00714 virtual void Mixture(Int_t& kmat, const char* name, Float_t* a,Float_t* z,
00715 Double_t dens, Int_t nlmat, Float_t* wmat);
00716 virtual void Mixture(Int_t& kmat, const char* name, Double_t* a,Double_t* z,
00717 Double_t dens, Int_t nlmat, Double_t* wmat);
00718 virtual void Medium(Int_t& kmed, const char* name, Int_t nmat, Int_t isvol,
00719 Int_t ifield, Double_t fieldm, Double_t tmaxfd,
00720 Double_t stemax, Double_t deemax, Double_t epsil,
00721 Double_t stmin, Float_t* ubuf=0, Int_t nbuf=0);
00722 virtual void Medium(Int_t& kmed, const char* name, Int_t nmat, Int_t isvol,
00723 Int_t ifield, Double_t fieldm, Double_t tmaxfd,
00724 Double_t stemax, Double_t deemax, Double_t epsil,
00725 Double_t stmin, Double_t* ubuf, Int_t nbuf);
00726 virtual void Matrix(Int_t& krot, Double_t thex, Double_t phix, Double_t they,
00727 Double_t phiy, Double_t thez, Double_t phiz);
00728
00729 virtual void SetRootGeometry();
00730
00732
00733
00734
00735
00737
00738
00739 Bool_t GetTransformation(const TString &volumePath,TGeoHMatrix &mat);
00740
00741
00742 Bool_t GetShape(const TString &volumePath,TString &shapeType,TArrayD &par);
00743
00744
00745 Bool_t GetMaterial(const TString &volumeName,
00746 TString &name,Int_t &imat,
00747 Double_t &a,Double_t &z,Double_t &den,
00748 Double_t &radl,Double_t &inter,TArrayD &par);
00749
00750
00751 Bool_t GetMedium(const TString &volumeName,TString &name,Int_t &imed,
00752 Int_t &nmat,Int_t &isvol,Int_t &ifield,
00753 Double_t &fieldm,Double_t &tmaxfd,Double_t &stemax,
00754 Double_t &deemax,Double_t &epsil, Double_t &stmin,
00755 TArrayD &par);
00756
00758
00759
00760
00761
00762
00764
00765
00766
00767 virtual Quest_t* Quest() const {return fQuest;}
00768 virtual Gcbank_t* Gcbank() const {return fGcbank;}
00769 virtual Gclink_t* Gclink() const {return fGclink;}
00770 virtual Gccuts_t* Gccuts() const {return fGccuts;}
00771 virtual Gcmore_t* Gcmore() const {return fGcmore;}
00772 virtual Gcmulo_t* Gcmulo() const {return fGcmulo;}
00773 virtual Gcmate_t* Gcmate() const {return fGcmate;}
00774 virtual Gctpol_t* Gctpol() const {return fGctpol;}
00775 virtual Gcnum_t* Gcnum() const {return fGcnum;}
00776 virtual Gcsets_t* Gcsets() const {return fGcsets;}
00777 virtual Gcopti_t* Gcopti() const {return fGcopti;}
00778 virtual Gctlit_t* Gctlit() const {return fGctlit;}
00779 virtual Gcvdma_t* Gcvdma() const {return fGcvdma;}
00780 virtual Gcvolu_t* Gcvolu() const {return fGcvolu;}
00781 virtual Gckine_t* Gckine() const {return fGckine;}
00782 virtual Gcflag_t* Gcflag() const {return fGcflag;}
00783 virtual Gctmed_t* Gctmed() const {return fGctmed;}
00784 virtual Gcphys_t* Gcphys() const {return fGcphys;}
00785 virtual Gcphlt_t* Gcphlt() const {return fGcphlt;}
00786 virtual Gcking_t* Gcking() const {return fGcking;}
00787 virtual Gckin2_t* Gckin2() const {return fGckin2;}
00788 virtual Gckin3_t* Gckin3() const {return fGckin3;}
00789 virtual Gctrak_t* Gctrak() const {return fGctrak;}
00790 virtual Int_t* Iq() const {return fZiq;}
00791 virtual Int_t* Lq() const {return fZlq;}
00792 virtual Float_t* Q() const {return fZq;}
00793
00794
00795
00796
00797 virtual Ertrio_t* Ertrio() const {return fErtrio;}
00798 virtual Eropts_t* Eropts() const {return fEropts;}
00799 virtual Eroptc_t* Eroptc() const {return fEroptc;}
00800 virtual Erwork_t* Erwork() const {return fErwork;}
00801 virtual Trcom3_t* Trcom3() const {return fTrcom3;}
00802
00803
00804
00805
00806 virtual Ptopts_t* Ptopts() const {return fPtopts;}
00807
00808
00809
00810 virtual void Gpcxyz();
00811 virtual void Ggclos();
00812 virtual void Gfile(const char *filename, const char *option="I");
00813 virtual void Glast();
00814 virtual void Gprint(const char *name);
00815 virtual void Grun();
00816 virtual void Gtrig();
00817 virtual void Gtrigc();
00818 virtual void Gtrigi();
00819 virtual void Gwork(Int_t nwork);
00820 virtual void Gzinit();
00821
00822
00823 virtual void Gfmate(Int_t imat, char *name, Float_t &a, Float_t &z,
00824 Float_t &dens, Float_t &radl, Float_t &absl,
00825 Float_t* ubuf, Int_t& nbuf);
00826 virtual void Gfmate(Int_t imat, char *name, Double_t &a, Double_t &z,
00827 Double_t &dens, Double_t &radl, Double_t &absl,
00828 Double_t* ubuf, Int_t& nbuf);
00829 virtual void Gfpart(Int_t ipart, char *name, Int_t &itrtyp,
00830 Float_t &amass,Float_t &charge,Float_t &tlife) const;
00831
00832
00833 virtual void Gppart(Int_t ipart = 0);
00834
00835 virtual void Gftmed(Int_t numed, char *name, Int_t &nmat, Int_t &isvol,
00836 Int_t &ifield, Float_t &fieldm, Float_t &tmaxfd,
00837 Float_t &stemax, Float_t &deemax, Float_t &epsil,
00838 Float_t &stmin, Float_t *buf=0, Int_t *nbuf=0);
00839
00840
00841 virtual void Gptmed(Int_t numed);
00842
00843 virtual void Gftmat(Int_t imate, Int_t ipart, char *chmeca, Int_t kdim,
00844 Float_t* tkin, Float_t* value, Float_t* pcut,
00845 Int_t &ixst);
00846 virtual Float_t Gbrelm(Float_t z, Float_t t, Float_t cut);
00847 virtual Float_t Gprelm(Float_t z, Float_t t, Float_t cut);
00848 virtual void Gmate();
00849 virtual void Gpart();
00850 virtual void Gsckov(Int_t itmed, Int_t npckov, Float_t *ppckov,
00851 Float_t *absco, Float_t *effic, Float_t *rindex);
00852 virtual void Gsdk(Int_t ipart, Float_t *bratio, Int_t *mode);
00853 virtual void Gsmate(Int_t imat, const char *name, Float_t a, Float_t z,
00854 Float_t dens, Float_t radl, Float_t absl);
00855 virtual void Gfang( Float_t* p, Float_t& costh, Float_t& sinth,
00856 Float_t& cosph, Float_t& sinph, Int_t& rotate);
00857 virtual void Gsmixt(Int_t imat, const char *name, Float_t *a, Float_t *z,
00858 Float_t dens, Int_t nlmat, Float_t *wmat);
00859 virtual void Gspart(Int_t ipart, const char *name, Int_t itrtyp,
00860 Double_t amass, Double_t charge, Double_t tlife);
00861 virtual void Gstmed(Int_t numed,const char *name,Int_t nmat, Int_t isvol,
00862 Int_t ifield, Float_t fieldm, Float_t tmaxfd,
00863 Float_t stemax, Float_t deemax, Float_t epsil,
00864 Float_t stmin);
00865 virtual void Gstpar(Int_t itmed, const char *param, Double_t parval);
00866
00867 virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov,
00868 Float_t *absco, Float_t *effic, Float_t *rindex);
00869 virtual void SetCerenkov(Int_t itmed, Int_t npckov, Double_t *ppckov,
00870 Double_t *absco, Double_t *effic, Double_t *rindex);
00871
00872
00873
00874 virtual void DefineOpSurface(const char* name,
00875 EMCOpSurfaceModel model,
00876 EMCOpSurfaceType surfaceType,
00877 EMCOpSurfaceFinish surfaceFinish,
00878 Double_t sigmaAlpha);
00879 virtual void SetBorderSurface(const char* name,
00880 const char* vol1Name, int vol1CopyNo,
00881 const char* vol2Name, int vol2CopyNo,
00882 const char* opSurfaceName);
00883 virtual void SetSkinSurface(const char* name,
00884 const char* volName,
00885 const char* opSurfaceName);
00886 virtual void SetMaterialProperty(
00887 Int_t itmed, const char* propertyName,
00888 Int_t np, Double_t* pp, Double_t* values);
00889 virtual void SetMaterialProperty(
00890 Int_t itmed, const char* propertyName,
00891 Double_t value);
00892 virtual void SetMaterialProperty(
00893 const char* surfaceName, const char* propertyName,
00894 Int_t np, Double_t* pp, Double_t* values);
00895
00896
00897 virtual void Gfkine(Int_t itra, Float_t *vert, Float_t *pvert,
00898 Int_t &ipart, Int_t &nvert);
00899 virtual void Gfvert(Int_t nvtx,Float_t *v,Int_t &ntbeam,Int_t &nttarg,
00900 Float_t &tofg);
00901 virtual Int_t Gskine(Float_t *plab, Int_t ipart, Int_t nv,
00902 Float_t *ubuf=0, Int_t nwbuf=0);
00903 virtual Int_t Gsvert(Float_t *v, Int_t ntbeam, Int_t nttarg,
00904 Float_t *ubuf=0, Int_t nwbuf=0);
00905
00906
00907 virtual void Gphysi();
00908
00909
00910 virtual void Gdebug();
00911 virtual void Gekbin();
00912 virtual void Gfinds();
00913 virtual void Gsking(Int_t igk);
00914 virtual void Gskpho(Int_t igk);
00915 virtual void Gsstak(Int_t iflag);
00916 virtual void Gsxyz();
00917 virtual void Gtrack();
00918 virtual void Gtreve();
00919 virtual void GtreveRoot();
00920 virtual void Grndm(Float_t *rvec, Int_t len) const;
00921 virtual void Grndmq(Int_t &is1, Int_t &is2, Int_t iseq,
00922 const Text_t *chopt);
00923
00924
00925 virtual void Gdxyz(Int_t it);
00926 virtual void Gdcxyz();
00927
00928
00929 virtual void Gdtom(Float_t *xd, Float_t *xm, Int_t iflag);
00930 virtual void Gdtom(Double_t *xd, Double_t *xm, Int_t iflag);
00931 virtual void Glmoth(const char* iudet, Int_t iunum, Int_t &nlev,
00932 Int_t *lvols, Int_t *lindx);
00933 virtual void Gmedia(Float_t *x, Int_t &numed);
00934 virtual void Gmtod(Float_t *xm, Float_t *xd, Int_t iflag);
00935 virtual void Gmtod(Double_t *xm, Double_t *xd, Int_t iflag);
00936 virtual void Gsdvn(const char *name, const char *mother,
00937 Int_t ndiv, Int_t iaxis);
00938 virtual void Gsdvn2(const char *name, const char *mother,
00939 Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed);
00940 virtual void Gsdvs(const char *name, const char *mother,
00941 Float_t step, Int_t iaxis, Int_t numed);
00942 virtual void Gsdvs2(const char *name, const char *mother,
00943 Float_t step, Int_t iaxis, Float_t c0, Int_t numed);
00944 virtual void Gsdvt(const char *name, const char *mother,
00945 Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx);
00946 virtual void Gsdvt2(const char *name, const char *mother,
00947 Double_t step, Int_t iaxis,
00948 Double_t c0, Int_t numed, Int_t ndvmx);
00949 virtual void Gsord(const char *name, Int_t iax);
00950 virtual void Gspos(const char *name, Int_t nr, const char *mother,
00951 Double_t x, Double_t y, Double_t z, Int_t irot,
00952 const char *konly="ONLY");
00953 virtual void Gsposp(const char *name, Int_t nr, const char *mother,
00954 Double_t x, Double_t y, Double_t z, Int_t irot,
00955 const char *konly, Float_t *upar, Int_t np);
00956 virtual void Gsposp(const char *name, Int_t nr, const char *mother,
00957 Double_t x, Double_t y, Double_t z, Int_t irot,
00958 const char *konly, Double_t *upar, Int_t np);
00959 virtual void Gsrotm(Int_t nmat, Float_t theta1, Float_t phi1,
00960 Float_t theta2, Float_t phi2,
00961 Float_t theta3, Float_t phi3);
00962 virtual void Gprotm(Int_t nmat=0);
00963 virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed,
00964 Float_t *upar, Int_t np);
00965 virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed,
00966 Double_t *upar, Int_t np);
00967 virtual void Gsatt(const char *name, const char *att, Int_t val);
00968 virtual void Gfpara(const char *name,Int_t number,Int_t intext,Int_t& npar,
00969 Int_t& natt, Float_t* par, Float_t* att);
00970 virtual void Gckpar(Int_t ish, Int_t npar, Float_t *par);
00971 virtual void Gckmat(Int_t itmed, char *natmed);
00972 virtual Int_t Glvolu(Int_t nlev, Int_t *lnam,Int_t *lnum);
00973 virtual void Gsbool(const char* ,
00974 const char* ) {}
00975
00976
00977 virtual void DefaultRange();
00978 virtual void InitHIGZ();
00979 virtual void Gdopen(Int_t view);
00980 virtual void Gdclose();
00981 virtual void Gdelete(Int_t view);
00982 virtual void Gdshow(Int_t view);
00983 virtual void Gdopt(const char *name,const char *value);
00984 virtual void Gdraw(const char *name,Double_t theta=30, Double_t phi=30,
00985 Double_t psi=0,Double_t u0=10,Double_t v0=10,
00986 Double_t ul=0.01,Double_t vl=0.01);
00987 virtual void Gdrawc(const char *name,Int_t axis=1, Float_t cut=0,
00988 Float_t u0=10,Float_t v0=10,Float_t ul=0.01,
00989 Float_t vl=0.01);
00990 virtual void Gdrawx(const char *name,Float_t cutthe, Float_t cutphi,
00991 Float_t cutval, Float_t theta=30, Float_t phi=30,
00992 Float_t u0=10,Float_t v0=10,Float_t ul=0.01,
00993 Float_t vl=0.01);
00994 virtual void Gdhead(Int_t isel, const char *name, Double_t chrsiz=0.6);
00995 virtual void Gdman(Double_t u0, Double_t v0, const char *type="MAN");
00996 virtual void Gdspec(const char *name);
00997 virtual void DrawOneSpec(const char *name);
00998 virtual void Gdtree(const char *name,Int_t levmax=15,Int_t ispec=0);
00999 virtual void GdtreeParent(const char *name,Int_t levmax=15,Int_t ispec=0);
01000
01001 virtual void WriteEuclid(const char* filnam, const char* topvol,
01002 Int_t number, Int_t nlevel);
01003
01004 virtual void SetABAN(Int_t par=1);
01005 virtual void SetANNI(Int_t par=1);
01006 virtual void SetAUTO(Int_t par=1);
01007 virtual void SetBOMB(Float_t bomb=1);
01008 virtual void SetBREM(Int_t par=1);
01009 virtual void SetCKOV(Int_t par=1);
01010 virtual void SetClipBox(const char *name,Double_t xmin=-9999,
01011 Double_t xmax=0, Double_t ymin=-9999,
01012 Double_t ymax=0,Double_t zmin=-9999,
01013 Double_t zmax=0);
01014 virtual void SetCOMP(Int_t par=1);
01015
01016
01017
01018
01019
01020 virtual void SetCUTS(Float_t cutgam,Float_t cutele,Float_t cutneu,
01021 Float_t cuthad,Float_t cutmuo ,Float_t bcute ,
01022 Float_t bcutm ,Float_t dcute ,
01023 Float_t dcutm ,Float_t ppcutm, Float_t tofmax, Float_t
01024 *gcuts=0);
01025
01026 virtual void InitGEANE();
01027 virtual void SetClose(Int_t iclose,Float_t *pf,Float_t dstrt,
01028 Float_t *w1,Float_t *w2,
01029 Float_t *p1,Float_t *p2,Float_t *p3,Float_t *cl);
01030 virtual void GetClose(Float_t *p1,Float_t *p2,Float_t *p3, Float_t *len);
01031 virtual void SetECut(Float_t gcalpha);
01032 virtual void SetDCAY(Int_t par=1);
01033 virtual void SetDEBU(Int_t emin=1, Int_t emax=999, Int_t emod=1);
01034 virtual void SetDRAY(Int_t par=1);
01035 virtual void SetERAN(Float_t ekmin=1.e-5, Float_t ekmax=1.e4,
01036 Int_t nekbin=90);
01037 virtual void SetHADR(Int_t par=1);
01038 virtual void SetKINE(Int_t kine, Float_t xk1=0, Float_t xk2=0,
01039 Float_t xk3=0, Float_t xk4=0,
01040 Float_t xk5=0, Float_t xk6=0, Float_t xk7=0,
01041 Float_t xk8=0, Float_t xk9=0, Float_t xk10=0);
01042 virtual void SetLOSS(Int_t par=2);
01043 virtual void SetMULS(Int_t par=1);
01044 virtual void SetMUNU(Int_t par=1);
01045 virtual void SetOPTI(Int_t par=2);
01046 virtual void SetPAIR(Int_t par=1);
01047 virtual void SetPFIS(Int_t par=1);
01048 virtual void SetPHOT(Int_t par=1);
01049 virtual void SetRAYL(Int_t par=1);
01050 virtual void SetSTRA(Int_t par=0);
01051 virtual void SetSWIT(Int_t sw, Int_t val=1);
01052 virtual void SetTRIG(Int_t nevents=1);
01053 virtual void SetUserDecay(Int_t ipart);
01054 virtual Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3]);
01055 virtual void Vname(const char *name, char *vname);
01056 virtual void InitLego();
01057
01058
01059
01060 virtual void Ertrgo();
01061 virtual void Ertrak(const Float_t *x1, const Float_t *p1,
01062 const Float_t *x2, const Float_t *p2,
01063 Int_t ipa, Option_t *chopt);
01064 virtual void Eufill(Int_t n,Float_t *ein,Float_t *xlf);
01065 virtual void Eufilp(const Int_t n, Float_t *ein,
01066 Float_t *pli, Float_t *plf);
01067 virtual void Eufilv(Int_t n, Float_t *ein,
01068 Char_t *namv, Int_t *numv,Int_t *iovl);
01069 virtual void Trscsd(Float_t *pc,Float_t *rc,Float_t *pd,Float_t *rd,Float_t *h,
01070 Float_t ch,Int_t ierr,Float_t spu,Float_t *dj,Float_t *dk);
01071 virtual void Trsdsc(Float_t *pd,Float_t *rd,Float_t *pc,Float_t *rc,Float_t *h,
01072 Float_t *ch,Int_t *ierr,Float_t *spu,Float_t *dj,Float_t *dk);
01073 virtual void Trscsp(Float_t *ps,Float_t *rs,Float_t *pc,Float_t *rc,Float_t *h,
01074 Float_t *ch,Int_t *ierr,Float_t *spx);
01075 virtual void Trspsc(Float_t *ps,Float_t *rs,Float_t *pc,Float_t *rc,Float_t *h,
01076 Float_t *ch,Int_t *ierr,Float_t *spx);
01077
01078
01079
01080
01081
01082 virtual void SetALTDEDX(Int_t par=1);
01083
01084
01085
01086
01087 virtual void SetUserDecayProductStableMinLifetime(
01088 Double_t lifetime=1.E-15);
01089 Double_t GetUserDecayProductStableMinLifetime() const
01090 { return fUserDecayProductStableMinLifetime; }
01091
01092
01093
01094
01095 virtual void FinishGeometry();
01096 virtual void BuildPhysics();
01097 virtual void Init();
01098 virtual void ProcessEvent();
01099 virtual Bool_t ProcessRun(Int_t nevent);
01100 virtual void AddParticlesToPdgDataBase() const;
01101
01102
01103 virtual void SetColors();
01104
01105 void SetTrack(Int_t done, Int_t parent, Int_t pdg,
01106 Float_t *pmom, Float_t *vpos, Float_t *polar,
01107 Float_t tof, TMCProcess mech, Int_t &ntr,
01108 Float_t weight, Int_t is);
01109
01110 Ertrio_t *fErtrio;
01111 Eropts_t *fEropts;
01112 Eroptc_t *fEroptc;
01113 Erwork_t *fErwork;
01114 Trcom3_t *fTrcom3;
01115
01116
01117 private:
01118 Int_t ConvertVolumePathString(const TString &volumeName,Int_t **lnam,
01119 Int_t **lnum);
01120
01121
01122
01123 protected:
01124 Int_t fNextVol;
01125 char fPath[512];
01126
01127 Int_t *fZiq;
01128 Int_t *fZlq;
01129 Float_t *fZq;
01130
01131 Quest_t *fQuest;
01132 Gcbank_t *fGcbank;
01133 Gclink_t *fGclink;
01134 Gccuts_t *fGccuts;
01135 Gcmore_t *fGcmore;
01136 Gcmulo_t *fGcmulo;
01137 Gcmate_t *fGcmate;
01138 Gctpol_t *fGctpol;
01139 Gcnum_t *fGcnum;
01140 Gcsets_t *fGcsets;
01141 Gcopti_t *fGcopti;
01142 Gctlit_t *fGctlit;
01143 Gcvdma_t *fGcvdma;
01144 Gcvolu_t *fGcvolu;
01145 Gckine_t *fGckine;
01146 Gcflag_t *fGcflag;
01147 Gctmed_t *fGctmed;
01148 Gcphys_t *fGcphys;
01149 Gcphlt_t *fGcphlt;
01150 Gcking_t *fGcking;
01151 Gckin2_t *fGckin2;
01152 Gckin3_t *fGckin3;
01153 Gctrak_t *fGctrak;
01154 Gcchan_t *fGcchan;
01155
01156
01157
01158
01159
01160 Ptopts_t *fPtopts;
01161
01162
01163
01164
01165 char (*fVolNames)[5];
01166 TObjArray fMedNames;
01167
01168 Int_t fNG3Particles;
01169 Int_t fNPDGCodes;
01170 TArrayI fPDGCode;
01171 TGeoMCGeometry* fMCGeo;
01172 Bool_t fImportRootGeometry;
01173
01174
01175 Bool_t fStopRun;
01176
01177
01178 Double_t fUserDecayProductStableMinLifetime;
01179
01180
01181 TMCProcess G3toVMC(Int_t iproc) const;
01182
01183 void DefineParticles();
01184 Int_t TransportMethod(TMCParticleType particleType) const;
01185 TString ParticleClass(TMCParticleType particleType) const;
01186 TMCParticleType ParticleType(Int_t itrtyp) const;
01187
01188 enum {kTRIG = BIT(14),
01189 kSWIT = BIT(15),
01190 kDEBU = BIT(16),
01191 kAUTO = BIT(17),
01192 kABAN = BIT(18),
01193 kOPTI = BIT(19),
01194 kERAN = BIT(20)
01195 };
01196 TGeant3(const TGeant3 &) : TVirtualMC() {}
01197 TGeant3 & operator=(const TGeant3&) {return *this;}
01198
01199
01200 Float_t* CreateFloatArray(Float_t* array, Int_t size) const;
01201 Float_t* CreateFloatArray(Double_t* array, Int_t size) const;
01202 Int_t NextKmat() const;
01203
01204
01205
01206 void G3Material(Int_t& kmat, const char* name, Double_t a, Double_t z,
01207 Double_t dens, Double_t radl, Double_t absl,
01208 Float_t* buf=0, Int_t nwbuf=0);
01209 void G3Mixture(Int_t& kmat, const char* name, Float_t* a,Float_t* z,
01210 Double_t dens, Int_t nlmat, Float_t* wmat);
01211 void G3Medium(Int_t& kmed, const char* name, Int_t nmat, Int_t isvol,
01212 Int_t ifield, Double_t fieldm, Double_t tmaxfd,
01213 Double_t stemax, Double_t deemax, Double_t epsil,
01214 Double_t stmin, Float_t* ubuf=0, Int_t nbuf=0);
01215 Int_t G3Gsvolu(const char *name, const char *shape, Int_t nmed,
01216 Float_t *upar, Int_t np);
01217 void G3Gsposp(const char *name, Int_t nr, const char *mother,
01218 Double_t x, Double_t y, Double_t z, Int_t irot,
01219 const char *konly, Float_t *upar, Int_t np);
01220
01221
01222 Int_t GetIonPdg(Int_t z, Int_t a, Int_t i = 0) const;
01223 Int_t GetSpecialPdg(Int_t number) const;
01224
01225 ClassDef(TGeant3,1)
01226 };
01227
01228 #endif //ROOT_TGeant3