515 #include "TParticle.h" 516 #include "TDatabasePDG.h" 517 #include "TLorentzVector.h" 521 #include "TParameter.h" 522 #include "TGeoMatrix.h" 523 #include "TObjString.h" 528 #include "TVirtualMCDecayer.h" 529 #include "TPDGCode.h" 532 # define g3zebra g3zebra_ 533 # define grfile grfile_ 534 # define g3pcxyz g3pcxyz_ 535 # define g3gclos g3gclos_ 536 # define g3last g3last_ 537 # define g3init g3init_ 538 # define g3cinit g3cinit_ 539 # define g3run g3run_ 540 # define g3trig g3trig_ 541 # define g3trigc g3trigc_ 542 # define g3trigi g3trigi_ 543 # define g3work g3work_ 544 # define g3zinit g3zinit_ 545 # define g3fmate g3fmate_ 546 # define g3fpart g3fpart_ 547 # define g3ftmed g3ftmed_ 548 # define g3ftmat g3ftmat_ 549 # define g3mate g3mate_ 550 # define g3part g3part_ 551 # define g3sdk g3sdk_ 552 # define g3smate g3smate_ 553 # define g3fang g3fang_ 554 # define g3smixt g3smixt_ 555 # define g3spart g3spart_ 556 # define g3stmed g3stmed_ 557 # define g3sckov g3sckov_ 558 # define g3stpar g3stpar_ 559 # define g3fkine g3fkine_ 560 # define g3fvert g3fvert_ 561 # define g3skine g3skine_ 562 # define g3svert g3svert_ 563 # define g3physi g3physi_ 564 # define g3debug g3debug_ 565 # define g3ekbin g3ekbin_ 566 # define g3finds g3finds_ 567 # define g3sking g3sking_ 568 # define g3skpho g3skpho_ 569 # define g3sstak g3sstak_ 570 # define g3sxyz g3sxyz_ 571 # define g3many g3many_ 572 # define g3track g3track_ 573 # define g3treve g3treve_ 574 # define gtreveroot gtreveroot_ 575 # define grndm grndm_ 576 # define grndmq grndmq_ 577 # define g3dtom g3dtom_ 578 # define g3lmoth g3lmoth_ 579 # define g3media g3media_ 580 # define g3mtod g3mtod_ 581 # define g3sdvn g3sdvn_ 582 # define g3sdvn2 g3sdvn2_ 583 # define g3sdvs g3sdvs_ 584 # define g3sdvs2 g3sdvs2_ 585 # define g3sdvt g3sdvt_ 586 # define g3sdvt2 g3sdvt2_ 587 # define g3sord g3sord_ 588 # define g3spos g3spos_ 589 # define g3sposp g3sposp_ 590 # define g3srotm g3srotm_ 591 # define g3protm g3protm_ 592 # define g3svolu g3svolu_ 593 # define g3print g3print_ 594 # define dzshow dzshow_ 595 # define g3satt g3satt_ 596 # define g3fpara g3fpara_ 597 # define gckpar gckpar_ 598 # define g3ckmat g3ckmat_ 599 # define g3lvolu g3lvolu_ 600 # define geditv geditv_ 601 # define mzdrop mzdrop_ 603 # define ertrak ertrak_ 604 # define ertrgo ertrgo_ 605 # define eufill eufill_ 606 # define eufilp eufilp_ 607 # define eufilv eufilv_ 608 # define trscsp trscsp_ 609 # define trspsc trspsc_ 610 # define trscsd trscsd_ 611 # define trsdsc trsdsc_ 612 # define erxyzc erxyzc_ 614 # define gcomad gcomad_ 616 # define g3brelm g3brelm_ 617 # define g3prelm g3prelm_ 619 # define rxgtrak rxgtrak_ 620 # define rxouth rxouth_ 621 # define rxinh rxinh_ 626 # define gzebra GZEBRA 627 # define grfile GRFILE 628 # define gpcxyz GPCXYZ 629 # define ggclos GGCLOS 632 # define g3cinit G3CINIT 635 # define gtrigc GTRIGC 636 # define gtrigi GTRIGI 638 # define g3zinit G3ZINIT 639 # define gfmate GFMATE 640 # define gfpart GFPART 641 # define gftmed GFTMED 642 # define gftmat GFTMAT 646 # define gsmate GSMATE 647 # define gsmixt GSMIXT 648 # define gspart GSPART 649 # define gstmed GSTMED 650 # define gsckov GSCKOV 651 # define gstpar GSTPAR 652 # define gfkine GFKINE 653 # define gfvert GFVERT 654 # define gskine GSKINE 655 # define gsvert GSVERT 656 # define gphysi GPHYSI 657 # define gdebug GDEBUG 658 # define gekbin GEKBIN 659 # define gfinds GFINDS 660 # define gsking GSKING 661 # define gskpho GSKPHO 662 # define gsstak GSSTAK 664 # define gtrack GTRACK 665 # define gtreve GTREVE 666 # define gtreveroot GTREVEROOT 668 # define grndmq GRNDMQ 670 # define glmoth GLMOTH 671 # define gmedia GMEDIA 674 # define gsdvn2 GSDVN2 676 # define gsdvs2 GSDVS2 678 # define gsdvt2 GSDVT2 681 # define gsposp GSPOSP 682 # define gsrotm GSROTM 683 # define gprotm GPROTM 684 # define gsvolu GSVOLU 685 # define gprint GPRINT 686 # define dzshow DZSHOW 688 # define gfpara GFPARA 689 # define gckpar GCKPAR 690 # define gckmat GCKMAT 691 # define glvolu GLVOLU 692 # define geditv GEDITV 693 # define mzdrop MZDROP 695 # define ertrak ERTRAK 696 # define ertrgo ERTRGO 697 # define eufill EUFILL 698 # define eufilp EUFILP 699 # define eufilv EUFILV 700 # define trscsp TRSCSP 701 # define trspsc TRSPSC 702 # define trscsd TRSCSD 703 # define trsdsc TRSDSC 704 # define erxyzc ERXYZC 706 # define gcomad GCOMAD 708 # define gbrelm GBRELM 709 # define gprelm GPRELM 711 # define rxgtrak RXGTRAK 712 # define rxouth RXOUTH 755 Int_t &, Float_t *, Int_t &);
758 Float_t &, Float_t *, Int_t &);
793 for(Int_t
i=0;
i<
n;
i++)
794 do r[
i]=gRandom->Rndm();
while(0>=r[
i] || r[
i]>=1);
799 {is1=gRandom->GetSeed(); is2=0; }
811 const Float_t &,
const Float_t &,
const Float_t &,
820 Float_t &, Float_t &, Float_t &, Float_t *,
824 Float_t &, Float_t &, Float_t &,
828 Float_t &, Float_t &, Float_t *, Int_t & DEFCHARL);
831 Float_t &, Float_t &, Float_t &, Float_t &,
832 Float_t &, Float_t &, Float_t *, Int_t * DEFCHARL);
836 ,Float_t *, Int_t & DEFCHARL);
839 Float_t &, Float_t &, Float_t &, Float_t *,
843 const Float_t *,
const Float_t &,
const Int_t &,
847 Float_t &, Float_t &, Float_t *, Int_t & DEFCHARL);
851 Float_t &, Float_t &, Float_t &, Float_t &,
852 Float_t &, Float_t &, Float_t *, Int_t & DEFCHARL);
855 Float_t *absco, Float_t *effic, Float_t *rindex);
862 Int_t & DEFCHARL DEFCHARL);
868 Int_t & DEFCHARL DEFCHARL);
871 Int_t & DEFCHARL DEFCHARL);
874 Int_t &, Int_t & DEFCHARL DEFCHARL);
879 Float_t &, Int_t &,
DEFCHARD DEFCHARL DEFCHARL
884 Float_t *, Int_t & DEFCHARL DEFCHARL DEFCHARL);
887 Int_t & DEFCHARL DEFCHARL);
892 Float_t*, Float_t* DEFCHARL);
903 const int&,
const int&,
const int& DEFCHARL
910 Float_t &, Float_t & DEFCHARL);
915 const Float_t *x2,
const Float_t *p2,
916 const Int_t &ipa,
DEFCHARD DEFCHARL);
920 Float_t *pli,Float_t *plf);
922 Char_t *namv, Int_t *numv,Int_t *iovl);
924 Float_t *
h,Float_t ch,Int_t ierr,Float_t spu,Float_t *dj,Float_t *dk);
926 Float_t *h,Float_t *ch,Int_t *ierr,Float_t *spu,Float_t *dj,Float_t *dk);
928 Float_t *ch,Int_t *ierr,Float_t *spx);
930 Float_t *ch,Int_t *ierr,Float_t *spx);
943 # define gudigi gudigi_ 944 # define guhadr guhadr_ 945 # define guout guout_ 946 # define guphad guphad_ 947 # define gudcay gudcay_ 948 # define guiget guiget_ 949 # define guinme guinme_ 950 # define guinti guinti_ 951 # define gunear gunear_ 952 # define guskip guskip_ 953 # define guview guview_ 954 # define gupara gupara_ 955 # define gudtim gudtim_ 956 # define guplsh guplsh_ 957 # define gutrev gutrev_ 958 # define gutrak gutrak_ 959 # define guswim guswim_ 960 # define gufld gufld_ 961 # define gustep gustep_ 962 # define gukine gukine_ 964 # define gheish gheish_ 965 # define flufin flufin_ 966 # define gfmfin gfmfin_ 967 # define gpghei gpghei_ 968 # define fldist fldist_ 969 # define gfmdis gfmdis_ 970 # define g3helx3 g3helx3_ 971 # define g3helix g3helix_ 972 # define g3rkuta g3rkuta_ 973 # define g3track g3track_ 974 # define gtreveroot gtreveroot_ 975 # define g3last g3last_ 976 # define g3invol g3invol_ 977 # define g3tmedi g3tmedi_ 978 # define g3media g3media_ 979 # define g3tmany g3tmany_ 980 # define g3tnext g3tnext_ 981 # define g3gperp g3gperp_ 982 # define ginvol ginvol_ 983 # define gtmedi gtmedi_ 984 # define gtmany gtmany_ 985 # define gtonly gtonly_ 986 # define gmedia gmedia_ 987 # define glvolu glvolu_ 988 # define gtnext gtnext_ 989 # define ggperp ggperp_ 992 # define gudigi GUDIGI 993 # define guhadr GUHADR 995 # define guphad GUPHAD 996 # define gudcay GUDCAY 997 # define guiget GUIGET 998 # define guinme GUINME 999 # define guinti GUINTI 1000 # define gunear GUNEAR 1001 # define guskip GUSKIP 1002 # define guview GUVIEW 1003 # define gupara GUPARA 1004 # define gudtim GUDTIM 1005 # define guplsh GUPLSH 1006 # define gutrev GUTREV 1007 # define gutrak GUTRAK 1008 # define guswim GUSWIM 1009 # define gufld GUFLD 1010 # define gustep GUSTEP 1011 # define gukine GUKINE 1013 # define eustep EUSTEP 1015 # define gheish GHEISH 1016 # define flufin FLUFIN 1017 # define gfmfin GFMFIN 1018 # define gpghei GPGHEI 1019 # define fldist FLDIST 1020 # define gfmdis GFMDIS 1021 # define g3helx3 G3HELX3 1022 # define g3helix G3HELIX 1023 # define g3gperp G3GPERP 1024 # define g3rkuta G3RKUTA 1025 # define gtrack GTRACK 1026 # define gtreveroot GTREVEROOT 1027 # define glast GLAST 1028 # define ginvol GINVOL 1029 # define gtmedi GTMEDI 1030 # define gtmany GTMANY 1031 # define gmedia GMEDIA 1032 # define glvolu GLVOLU 1033 # define gtnext GTNEXT 1034 # define ggperp GGPERP 1061 extern "C" type_of_call void glvolu(Int_t &nlev, Int_t *lnam,Int_t *lnum, Int_t &ier);
1093 void (*
fglvolu)(Int_t &nlev, Int_t *lnam,Int_t *lnum, Int_t &ier) = 0;
1101 Double_t oldvect[6], oldstep, oldsafety;
1102 Int_t statcode, statsame;
1103 Char_t statpath[120];
1104 Double_t statsafety, statsnext;
1116 fImportRootGeometry(kFALSE),
1127 : TVirtualMC(
"TGeant3",title, kFALSE),
1141 statfile =
new TFile(
"stat.root",
"recreate");
1142 stattree =
new TTree(
"stat",
"stat tree");
1143 stattree->Branch(
"statcode",&statcode,
"statcode/I");
1144 stattree->Branch(
"statsame",&statsame,
"statsame/I");
1145 stattree->Branch(
"statpath",statpath,
"statpath/C");
1146 stattree->Branch(
"oldvect",oldvect,
"oldvect[6]/D");
1147 stattree->Branch(
"oldsafety",&oldsafety,
"oldsafety/D");
1148 stattree->Branch(
"oldstep",&oldstep,
"oldstep/D");
1149 stattree->Branch(
"snext",&statsnext,
"statsnext/D");
1150 stattree->Branch(
"safety",&statsafety,
"statsafety/D");
1197 Float_t &radl, Float_t &absl)
const 1232 Float_t pf[3]={0.,0.,0.};
1233 Float_t w1[3]={0.,0.,0.};
1234 Float_t w2[3]={0.,0.,0.};
1235 Float_t p1[3]={0.,0.,0.};
1236 Float_t p2[3]={0.,0.,0.};
1237 Float_t p3[3]={0.,0.,0.};
1238 Float_t cl[3]={0.,0.,0.};
1241 geant3->
SetClose(0,pf,999.,w1,w2,p1,p2,p3,cl);
1323 else printf(
"GeomTree: Volume %s not found in bank\n",name);
1341 TDatabasePDG *pdgDB = TDatabasePDG::Instance();
1343 const Double_t kAu2Gev=0.9314943228;
1344 const Double_t khSlash = 1.0545726663e-27;
1345 const Double_t kErg2Gev = 1/1.6021773349e-3;
1346 const Double_t khShGev = khSlash*kErg2Gev;
1347 const Double_t kYear2Sec = 3600*24*365.25;
1358 if ( !pdgDB->GetParticle(
GetIonPdg(1,2)) )
1359 pdgDB->AddParticle(
"Deuteron",
"Deuteron",2*kAu2Gev+8.071e-3,kTRUE,
1362 if ( !pdgDB->GetParticle(
GetIonPdg(1,3)) )
1363 pdgDB->AddParticle(
"Triton",
"Triton",3*kAu2Gev+14.931e-3,kFALSE,
1364 khShGev/(12.33*kYear2Sec),3,
"Ion",
GetIonPdg(1,3));
1366 if ( !pdgDB->GetParticle(
GetIonPdg(2,4)) )
1367 pdgDB->AddParticle(
"Alpha",
"Alpha",4*kAu2Gev+2.424e-3,kTRUE,
1368 khShGev/(12.33*kYear2Sec),6,
"Ion",
GetIonPdg(2,4));
1370 if ( !pdgDB->GetParticle(
GetIonPdg(2,3)) )
1371 pdgDB->AddParticle(
"HE3",
"HE3",3*kAu2Gev+14.931e-3,kFALSE,
1377 pdgDB->AddParticle(
"Cherenkov",
"Cherenkov",0,kFALSE,
1381 pdgDB->AddParticle(
"FeedbackPhoton",
"FeedbackPhoton",0,kFALSE,
1395 Warning(
"CurrentVolID",
"Stack depth only %d\n",
fGcvolu->
nlevel);
1401 else Warning(
"CurrentVolID",
"Volume %4s not found\n",(
char*)&gname);
1415 Warning(
"CurrentVolOffID",
"Offset requested %d but stack depth %d\n",
1422 else Warning(
"CurrentVolOffID",
"Volume %4s not found\n",(
char*)&gname);
1435 Warning(
"CurrentVolName",
"Stack depth %d\n",
fGcvolu->
nlevel);
1441 else Warning(
"CurrentVolName",
"Volume %4s not found\n",(
char*) &gname);
1455 Warning(
"CurrentVolOffName",
1456 "Offset requested %d but stack depth %d\n",off,
fGcvolu->
nlevel);
1462 else Warning(
"CurrentVolOffName",
"Volume %4s not found\n",(
char*)&gname);
1684 for (kz = 0; kz < 6; ++kz) {
1695 Gsdk(ipa, bratio, mode);
1697 for (kz = 0; kz < 6; ++kz) {
1712 Gsdk(ipa, bratio, mode);
1778 for (kz = 0; kz < 6; ++kz) {
1785 Gsdk(ipa, bratio, mode);
1787 for (kz = 0; kz < 6; ++kz) {
1794 Gsdk(ipa, bratio, mode);
1796 for (kz = 0; kz < 6; ++kz) {
1803 Gsdk(ipa, bratio, mode);
1834 strncpy((
char *) &gname, name, 4);
1837 printf(
"VolId: Volume %s not found\n",name);
1846 Int_t nmed =
fMedNames.GetEntriesFast();
1847 for ( Int_t imed = 1; imed < nmed; imed++ ) {
1850 if ( name == TString(medName) )
return imed;
1852 printf(
"MediumId: Medium %s not found\n", medName);
1872 Int_t idvol =
VolId(volName);
1875 Int_t nin = Int_t(
fZq[jvo+3]);
1886 Int_t idvol =
VolId(volName);
1890 Int_t jin =
fZlq[jvo-nin];
1891 Int_t idvold = Int_t(
fZq[jin+2]);;
1904 Int_t idvol =
VolId(volName);
1908 Int_t jin =
fZlq[jvo-nin];
1910 return Int_t(
fZq[jin +3]);
1923 return Int_t(
fZq[jvo+4]);
1945 Bool_t success = kTRUE;
1947 if(!strcmp(cutName,
"CUTGAM"))
1949 else if(!strcmp(cutName,
"CUTELE"))
1951 else if(!strcmp(cutName,
"CUTNEU"))
1953 else if(!strcmp(cutName,
"CUTHAD"))
1955 else if(!strcmp(cutName,
"CUTMUO"))
1957 else if(!strcmp(cutName,
"BCUTE"))
1959 else if(!strcmp(cutName,
"BCUTM"))
1961 else if(!strcmp(cutName,
"DCUTE"))
1963 else if(!strcmp(cutName,
"DCUTM"))
1965 else if(!strcmp(cutName,
"PPCUTM"))
1967 else if(!strcmp(cutName,
"TOFMAX"))
1970 Warning(
"SetCut",
"Cut %s not implemented\n",cutName);
1983 Bool_t success = kTRUE;
1985 if(!strcmp(flagName,
"PAIR"))
1987 else if(!strcmp(flagName,
"COMP"))
1989 else if(!strcmp(flagName,
"PHOT"))
1991 else if(!strcmp(flagName,
"PFIS"))
1993 else if(!strcmp(flagName,
"DRAY"))
1995 else if(!strcmp(flagName,
"ANNI"))
1997 else if(!strcmp(flagName,
"BREM"))
1999 else if(!strcmp(flagName,
"HADR"))
2001 else if(!strcmp(flagName,
"MUNU"))
2003 else if(!strcmp(flagName,
"DCAY"))
2005 else if(!strcmp(flagName,
"LOSS"))
2007 else if(!strcmp(flagName,
"MULS"))
2009 else if(!strcmp(flagName,
"RAYL"))
2011 else if(!strcmp(flagName,
"STRA"))
2013 else if(!strcmp(flagName,
"SYNC"))
2015 else if(!strcmp(flagName,
"CKOV"))
2018 Warning(
"SetFlag",
"Flag %s not implemented\n",flagName);
2027 Double_t mass, Double_t charge, Double_t lifetime)
2031 TVirtualMC::DefineParticle(pdg, name, type, mass, charge, lifetime);
2039 Double_t mass, Double_t charge, Double_t lifetime,
2040 const TString& , Double_t ,
2041 Int_t , Int_t , Int_t ,
2042 Int_t , Int_t , Int_t ,
2058 Error(
"SetParticle",
"Particle already exists.");
2065 Error(
"SetParticle",
"Unknown particle transport.");
2074 if (!TDatabasePDG::Instance()->GetParticle(pdg))
2075 TDatabasePDG::Instance()
2076 ->AddParticle(name, name, mass, kTRUE, 0, charge*3,
2090 Double_t , Double_t mass)
2099 Int_t pdgMax = pdg + 9;
2102 while (TDatabasePDG::Instance()->GetParticle(pdg) &&
2105 if (TDatabasePDG::Instance()->GetParticle(pdg)) {
2106 Fatal(
"SetIon",
"All isomer numbers are already used");
2112 if (mass < 1
e-09) mass = 0.9382723 *
A;
2114 Double_t charge =
Q;
2115 TMCParticleType partType = kPTIon;
2116 Double_t lifetime = 1.e20;
2120 pdg, name, partType, mass, charge, lifetime,
2121 "nucleus", 0.0, 1, 1, 0, 1, 1, 0, 0, 1, kTRUE);
2132 Float_t amass, charge, tlife;
2133 Gfpart(pdg, name, itrtyp,amass, charge, tlife);
2136 return TString(name);
2147 Float_t mass, charge, tlife;
2148 Gfpart(pdg,name, itrtyp, mass, charge, tlife);
2161 Float_t mass, charge, tlife;
2162 Gfpart(pdg,name, itrtyp, mass, charge, tlife);
2175 Float_t mass, charge, tlife;
2176 Gfpart(pdg, name, itrtyp, mass, charge, tlife);
2189 Float_t mass, charge, tlife;
2190 Gfpart(pdg,name, itrtyp, mass, charge, tlife);
2203 if(!strcmp(reac,
"PHOT"))
2206 Error(
"Xsec",
"Can calculate photoelectric only for photons\n");
2262 Double_t &etot)
const 2417 TMCProcess vmcmech =
G3toVMC(imech+1);
2418 if ( vmcmech == kPNoProcess ) {
2421 "* TGeant3::ProdProcess secondaries present,but no matching process!* \n");
2447 for (i=0; i<nproc; ++
i)
2448 if((proc[nvproc]=
G3toVMC(
Gctrak()->lmec[i]))!=kPNoProcess) nvproc++;
2462 const TMCProcess kPG2MC1[30] = {
2463 kPTransportation, kPMultipleScattering, kPEnergyLoss, kPMagneticFieldL, kPDecay,
2464 kPPair, kPCompton, kPPhotoelectric, kPBrem, kPDeltaRay,
2465 kPAnnihilation, kPHadronic, kPHCElastic, kPEvaporation, kPNuclearFission,
2466 kPNuclearAbsorption, kPPbarAnnihilation, kPNCapture, kPHIElastic,
2467 kPHInhelastic, kPMuonNuclear, kPTOFlimit, kPPhotoFission, kPNoProcess,
2468 kPRayleigh, kPNoProcess, kPNoProcess, kPNoProcess, kPNull, kPStop};
2470 const TMCProcess kPG2MC2[9] = {
2471 kPLightAbsorption, kPLightScattering, kStepMax, kPNoProcess, kPCerenkov,
2472 kPLightReflection, kPLightRefraction, kPSynchrotron, kPNoProcess};
2474 TMCProcess proc=kPNoProcess;
2475 if(0<iproc && iproc<=30) proc= kPG2MC1[iproc-1];
2476 else if(101<=iproc && iproc<=109) proc= kPG2MC2[iproc-100-1];
2483 TLorentzVector &
x, TLorentzVector &
p)
2490 if(-1<isec && isec<fGcking->ngkine) {
2499 printf(
" * TGeant3::GetSecondary * Secondary %d does not exist\n",isec);
2500 x[0]=x[1]=x[2]=x[3]=p[0]=p[1]=p[2]=p[3]=0;
2600 Gcphys()->
sumlif = time / p.Beta() / p.Gamma() * 2.99792458e10;
2614 Double_t
z, Double_t dens, Double_t radl,
2615 Double_t absl, Float_t* buf, Int_t nwbuf)
2640 for(i=1; i<=
ns; i++) {
2641 if(
fZlq[jmate-i]==0) {
2649 Float_t fdens = dens;
2650 Float_t fradl = radl;
2651 Float_t fabsl = absl;
2659 Double_t dens, Double_t radl, Double_t absl, Float_t* buf,
2680 G3Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
2685 Double_t dens, Double_t radl, Double_t absl, Double_t* buf,
2708 G3Material(kmat, name, a, z, dens, radl, absl, fbuf, nwbuf);
2714 Double_t dens, Int_t nlmat, Float_t* wmat)
2735 for(i=1; i<=
ns; i++) {
2736 if(
fZlq[jmate-i]==0) {
2747 Double_t dens, Int_t nlmat, Float_t* wmat)
2766 G3Mixture(kmat, name, fa, fz, dens, nlmat, fwmat);
2768 for (i=0; i<TMath::Abs(nlmat); i++) {
2769 a[
i] = fa[
i]; z[
i] = fz[
i]; wmat[
i] = fwmat[
i];
2779 Double_t dens, Int_t nlmat, Double_t* wmat)
2798 G3Mixture(kmat, name, fa, fz, dens, nlmat, fwmat);
2800 for (i=0; i<TMath::Abs(nlmat); i++) {
2801 a[
i] = fa[
i]; z[
i] = fz[
i]; wmat[
i] = fwmat[
i];
2811 Int_t ifield, Double_t fieldm, Double_t tmaxfd,
2812 Double_t stemax, Double_t deemax, Double_t epsil,
2813 Double_t stmin, Float_t* ubuf, Int_t nbuf)
2838 for(i=1; i<=
ns; i++) {
2839 if(
fZlq[jtmed-i]==0) {
2845 Float_t ffieldm = fieldm;
2846 Float_t ftmaxfd = tmaxfd;
2847 Float_t fstemax = stemax;
2848 Float_t fdeemax = deemax;
2849 Float_t fepsil = epsil;
2850 Float_t fstmin = stmin;
2852 fdeemax, fepsil, fstmin, ubuf, nbuf
PASSCHARL(name));
2854 fMedNames.AddAtAndExpand(
new TObjString(name), kmed);
2859 Int_t ifield, Double_t fieldm, Double_t tmaxfd,
2860 Double_t stemax, Double_t deemax, Double_t epsil,
2861 Double_t stmin, Float_t* ubuf, Int_t nbuf)
2881 G3Medium(kmed,name,nmat,isvol,ifield,fieldm,tmaxfd,stemax,deemax,epsil,
2888 Int_t ifield, Double_t fieldm, Double_t tmaxfd,
2889 Double_t stemax, Double_t deemax, Double_t epsil,
2890 Double_t stmin, Double_t* ubuf, Int_t nbuf)
2911 G3Medium(kmed,name,nmat,isvol,ifield,fieldm,tmaxfd,stemax,deemax,epsil,
2912 stmin, fubuf, nbuf);
2919 Double_t phiy, Double_t thez, Double_t phiz)
2939 for(i=1; i<=
ns; i++) {
2940 if(
fZlq[jrotm-i]==0) {
2946 g3srotm(krot, thex, phix, they, phiy, thez, phiz);
2974 Warning(
"GetMedium",
2975 "Deprecated function - use CurrentMedium() instead");
2987 Fatal(
"SetRootGeometry",
2988 "TGeant3 does not support Root geometry");
3008 Warning(
"GetPath",
"level null");
3013 char *namcur =
fPath+1;
3016 for (j=0; j<i+1; j++) {
3019 memcpy(name, &gname, 4);
3021 sprintf(namcur,
"%s_%d/", name, copy);
3022 nch = strlen(
fPath);
3038 memcpy(name, &gname, 4);
3040 sprintf(
fPath,
"%s_%d", name, copy);
3228 Float_t &dens, Float_t &radl, Float_t &absl,
3229 Float_t* ubuf, Int_t& nbuf)
3240 Double_t &dens, Double_t &radl, Double_t &absl,
3241 Double_t* ubuf, Int_t& nbuf)
3248 Float_t fdens = dens;
3249 Float_t fradl = radl;
3250 Float_t fabsl = absl;
3253 Gfmate(imat, name, fa, fz, fdens, fradl, fabsl, fubuf, nbuf);
3260 for (Int_t
i=0;
i<nbuf;
i++) ubuf[
i] = fubuf[
i];
3267 Float_t &amass, Float_t &charge, Float_t &tlife)
const 3282 Int_t &ifield, Float_t &fieldm, Float_t &tmaxfd,
3283 Float_t &stemax, Float_t &deemax, Float_t &epsil,
3284 Float_t &stmin, Float_t *ubuf, Int_t *nbuf)
3289 g3ftmed(numed,
PASSCHARD(name), nmat, isvol, ifield, fieldm, tmaxfd, stemax,
3290 deemax, epsil, stmin, ubuf, nbuf
PASSCHARL(name));
3296 Float_t* tkin, Float_t*
value, Float_t* pcut,
3303 tkin, value, pcut, ixst
PASSCHARL(chmeca));
3349 g3sdk(ipart,bratio,mode);
3354 Float_t dens, Float_t radl, Float_t absl)
3375 if (dens <= 0 && a != 0 && z != 0) {
3376 Warning(
"Gsmate",
"Density was o, set to 0.01 for imat=%d, name=%s",
3386 Float_t dens, Int_t nlmat, Float_t *wmat)
3405 Double_t amass, Double_t charge, Double_t tlife)
3419 Float_t fmass = amass;
3420 Float_t fcharge = charge;
3421 Float_t flife = tlife;
3429 Int_t ifield, Float_t fieldm, Float_t tmaxfd,
3430 Float_t stemax, Float_t deemax, Float_t epsil,
3452 g3stmed(numed,
PASSCHARD(name), nmat, isvol, ifield, fieldm, tmaxfd, stemax,
3453 deemax, epsil, stmin, ubuf, nbuf
PASSCHARL(name));
3458 Float_t *absco, Float_t *effic, Float_t *rindex)
3475 g3sckov(itmed,npckov,ppckov,absco,effic,rindex);
3480 Float_t *absco, Float_t *effic, Float_t *rindex)
3497 g3sckov(itmed,npckov,ppckov,absco,effic,rindex);
3502 Double_t *absco, Double_t *effic, Double_t *rindex)
3525 SetCerenkov(itmed, npckov, fppckov, fabsco, feffic, frindex);
3535 EMCOpSurfaceModel , EMCOpSurfaceType ,
3536 EMCOpSurfaceFinish , Double_t )
3539 Warning(
"DefineOpSurface",
3540 Form(
"Called for surface %s. Not applicable in Geant3 - setting is ignored.", name));
3549 Warning(
"SetBorderSurface",
3550 Form(
"Called for border surface %s. Not applicable in Geant3 - setting is ignored.", name));
3558 Warning(
"SetSkinSurface",
3559 Form(
"Called for skin surface %s. Not applicable in Geant3 - setting is ignored.", name));
3564 Int_t itmed,
const char* ,
3565 Int_t , Double_t* , Double_t* )
3567 Warning(
"SetMaterialProperty",
3568 Form(
"Called for material ID %5d. Not applicable in Geant3 - setting is ignored.", itmed));
3573 Int_t itmed,
const char* ,
3576 Warning(
"SetMaterialProperty",
3577 Form(
"Called for material ID %5d. Not applicable in Geant3 - setting is ignored.", itmed));
3582 const char* surfaceName,
const char* ,
3583 Int_t , Double_t* , Double_t* )
3585 Warning(
"SetMaterialProperty",
3586 Form(
"Called for material surface %s. Not applicable in Geant3 - setting is ignored.", surfaceName));
3605 Float_t fparval = parval;
3617 Int_t &ipart, Int_t &nvert)
3653 g3fkine(itra,vert,pvert,ipart,nvert,ubuf,nbuf);
3667 g3fvert(nvtx,v,ntbeam,nttarg,tofg,ubuf,nbuf);
3679 g3skine(plab, ipart, nv, buf, nwbuf, nt);
3693 g3svert(v, ntbeam, nttarg, ubuf, nwbuf, nwtx);
3836 TRandom*
r=gMC->GetRandom();
3837 for(Int_t
i=0;
i<len; rvec[
i++]=r->Rndm()) {};
3848 is1 = gRandom->GetSeed();
3915 Gdtom(fxd, fxm, iflag) ;
3917 for (Int_t
i=0;
i<3;
i++) {
3918 xd[
i] = fxd[
i]; xm[
i] = fxm[
i];
3927 Int_t *lvols, Int_t *lindx)
3952 static Int_t
check = 0;
3994 Gmtod(fxm, fxd, iflag) ;
3996 for (Int_t
i=0;
i<3;
i++) {
3997 xm[
i] = fxm[
i]; xd[
i] = fxd[
i];
4022 Vname(mother,vmother);
4030 Int_t iaxis, Double_t c0i, Int_t numed)
4042 Vname(mother,vmother);
4051 Int_t iaxis, Int_t numed)
4059 Vname(mother,vmother);
4067 Int_t iaxis, Float_t c0, Int_t numed)
4075 Vname(mother,vmother);
4083 Int_t iaxis, Int_t numed, Int_t ndvmx)
4099 Vname(mother,vmother);
4101 Float_t fstep =
step;
4108 Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx)
4124 Vname(mother,vmother);
4126 Float_t fstep =
step;
4156 Double_t
x, Double_t
y, Double_t
z, Int_t irot,
4174 TString only = konly;
4176 Bool_t isOnly = kFALSE;
4177 if (only.Contains(
"only")) isOnly = kTRUE;
4181 Vname(mother,vmother);
4193 Double_t
x, Double_t
y, Double_t
z, Int_t irot,
4194 const char *konly, Float_t *upar, Int_t np )
4200 TString only = konly;
4202 Bool_t isOnly = kFALSE;
4203 if (only.Contains(
"only")) isOnly = kTRUE;
4207 Vname(mother,vmother);
4219 Double_t
x, Double_t
y, Double_t
z, Int_t irot,
4220 const char *konly, Float_t *upar, Int_t np )
4227 G3Gsposp(name, nr, mother, x, y, z, irot, konly, upar, np);
4232 Double_t
x, Double_t
y, Double_t
z, Int_t irot,
4233 const char *konly, Double_t *upar, Int_t np )
4241 G3Gsposp(name, nr, mother, x, y, z, irot, konly, fupar, np);
4247 Float_t phi2, Float_t theta3, Float_t phi3)
4261 g3srotm(nmat, theta1, phi1, theta2, phi2, theta3, phi3);
4276 Float_t *upar, Int_t npar)
4291 Vname(shape,vshape);
4300 Float_t *upar, Int_t npar)
4313 ivolu =
G3Gsvolu(name, shape, nmed, upar, npar);
4320 Double_t *upar, Int_t npar)
4335 ivolu =
G3Gsvolu(name, shape, nmed, fupar, npar);
4492 Int_t& natt, Float_t* par, Float_t* att)
4540 g3lvolu(nlev, lnam, lnum, ier);
4626 Vname(value,vvalue);
4633 Double_t , Double_t , Double_t , Double_t ,
4674 Float_t , Float_t , Float_t )
4696 Float_t , Float_t , Float_t , Float_t ,
4697 Float_t ,Float_t , Float_t )
4902 Double_t , Double_t , Double_t , Double_t )
4949 Float_t cuthad,Float_t cutmuo ,Float_t bcute ,
4950 Float_t bcutm ,Float_t dcute ,Float_t dcutm ,
4951 Float_t ppcutm, Float_t tofmax, Float_t *gcuts)
4999 Float_t *w1, Float_t *w2,
5000 Float_t *p1,Float_t *p2,Float_t *p3,Float_t *clen)
5112 Float_t xk4, Float_t xk5, Float_t xk6, Float_t xk7,
5113 Float_t xk8, Float_t xk9, Float_t xk10)
5259 if (sw <= 0 || sw > 10)
return;
5285 printf(
"Particle %d not in geant\n",pdg);
5289 Int_t jpa=
fZlq[jpart-ipart];
5292 Int_t jpa1=
fZlq[jpa-1];
5295 Int_t jpa2=
fZlq[jpa-2];
5307 printf(
"Cannot define decay mode for particle with PDG=0");
5312 printf(
"Particle %d not in geant\n",pdg);
5320 for (Int_t k1=0; k1<6; k1++) g3mode[k1]=0;
5321 for (Int_t
k=0;
k<6;
k++) {
5326 printf(
"Particle %d not in geant\n",mode[k][0]);
5335 printf(
"Particle %d not in geant\n",mode[k][1]);
5344 printf(
"Particle %d not in geant\n",mode[k][1]);
5349 g3mode[
k]=id1 + id2* 100+ id3 * 10000 ;
5362 Int_t l = strlen(name);
5365 for (i=0;i<l;i++) vname[i] = toupper(name[i]);
5366 for (i=l;i<4;i++) vname[i] =
' ';
5381 const Float_t *x2,
const Float_t *p2,
5382 Int_t ipa, Option_t *chopt)
5455 const Int_t mxpred=10;
5467 Float_t *pli, Float_t *plf)
5489 const Int_t mxpred=10;
5497 for (Int_t j=0;j<
n;j++) {
5498 for(Int_t
i=0;
i<9;
i++) {
5503 TVector3 v3=v1.Cross(v2);
5512 Char_t *namv, Int_t *numv,Int_t *iovl)
5532 const Int_t mxpred=15;
5546 void TGeant3::Trscsd(Float_t *pc,Float_t *
rc,Float_t *pd,Float_t *rd,Float_t *
h,Float_t ch,Int_t ierr,Float_t spu,Float_t *dj,Float_t *dk){
5573 printf(
"%d\n",ierr);
5574 trscsd(pc,rc,pd,rd,h,ch,ierr,spu,dj,dk);
5577 void TGeant3::Trsdsc(Float_t *pd,Float_t *rd,Float_t *pc,Float_t *
rc,Float_t *
h,Float_t *ch,Int_t *ierr,Float_t *spu,Float_t *dj,Float_t *dk) {
5602 trsdsc(pd,rd,pc,rc,h,ch,ierr,spu,dj,dk);
5605 void TGeant3::Trscsp(Float_t *pc,Float_t *
rc,Float_t *
ps,Float_t *rs,Float_t *
h,Float_t *ch,Int_t *ierr, Float_t *spx){
5632 trscsp(pc,rc,ps,rs,h,ch,ierr,spx);
5635 void TGeant3::Trspsc(Float_t *
ps,Float_t *rs,Float_t *pc,Float_t *
rc,Float_t *
h,Float_t *ch,Int_t *ierr,Float_t *spx) {
5664 trspsc(ps,rs,pc,rc,h,ch,ierr,spx);
5671 Int_t number, Int_t nlevel)
5698 const char kShape[][5]={
"BOX ",
"TRD1",
"TRD2",
"TRAP",
"TUBE",
"TUBS",
"CONE",
5699 "CONS",
"SPHE",
"PARA",
"PGON",
"PCON",
"ELTU",
"HYPE",
5701 Int_t
i,
end, itm, irm, jrm,
k, nmed;
5705 char *filext, *filetme;
5706 char natmed[21], namate[21];
5707 char natmedc[21], namatec[21];
5708 char key[5],
name[5], mother[5], konly[5];
5710 Int_t iadvol, iadtmd, iadrot, nwtot, iret;
5711 Int_t mlevel, numbr, natt, numed, nin, ndata;
5712 Int_t iname, ivo, ish, jvo, nvstak, ivstak;
5713 Int_t jdiv, ivin, in, jin, jvin, irot;
5714 Int_t jtm, imat, jma, flag=0, imatc;
5715 Float_t az, dens, radl, absl,
a,
step,
x,
y,
z;
5716 Int_t npar, ndvmx,
left;
5717 Float_t zc, densc, radlc, abslc, c0, tmaxfd;
5719 Int_t iomate[100], iotmed[100];
5720 Float_t par[100], att[20], ubuf[50];
5723 Int_t
level, ndiv, iaxe;
5724 Int_t itmedc, nmatc, isvolc, ifieldc, nwbufc, isvol, nmat, ifield, nwbuf;
5725 Float_t fieldmc, tmaxfdc, stemaxc, deemaxc, epsilc, stminc, fieldm;
5726 Float_t tmaxf, stemax, deemax, epsil, stmin;
5727 const char *k10000=
"!\n%s\n!\n";
5730 for(i=0;i<
end;i++)
if(filnam[i]==
'.') {
5734 filext=
new char[end+5];
5735 filetme=
new char[end+5];
5736 strncpy(filext,filnam,end);
5737 strncpy(filetme,filnam,end);
5740 strcpy(&filext[end],
".euc");
5741 strcpy(&filetme[end],
".tme");
5742 lun=fopen(filext,
"w");
5754 qws =
new float[nwtot+1];
5755 for (i=0;i<nwtot+1;i++) qws[i]=0;
5758 if(nlevel==0) mlevel=20;
5761 numbr = number>0 ? number : 1;
5762 Gfpara(topvol,numbr,1,npar,natt,par,att);
5764 printf(
" *** GWEUCL *** top volume : %s number : %3d can not be " 5765 "a valid root\n", topvol, numbr);
5770 strncpy((
char *)&iname, topvol, 4);
5777 ish = Int_t (
fZq[jvo+2]);
5779 printf(
" *** GWEUCL *** top volume : %s number : %3d can not be " 5780 "a valid root\n",topvol, numbr);
5786 iws[iadvol+ivo] =
level;
5795 ivo = TMath::Abs(iws[ivstak]);
5799 numed = Int_t (
fZq[jvo + 4]);
5800 iws[iadtmd + numed] = 1;
5803 level = iws[iadvol+ivo];
5804 if (level < mlevel) {
5806 nin = Int_t (
fZq[jvo + 3]);
5810 jdiv =
fZlq[jvo - 1];
5811 ivin = Int_t (
fZq[jdiv + 2]);
5813 iws[nvstak] = -ivin;
5814 iws[iadvol+ivin] =
level;
5817 }
else if (nin > 0) {
5818 for(in=1; in<=nin; in++) {
5819 jin =
fZlq[jvo - in];
5820 ivin = Int_t (
fZq[jin + 2 ]);
5822 ish = Int_t (
fZq[jvin + 2]);
5826 if (iws[iadvol+ivin]==0) {
5829 iws[iadvol+ivin] =
level;
5832 irot = Int_t (
fZq[jin + 4 ]);
5833 if (irot > 0) iws[iadrot+irot] = 1;
5840 if (ivstak < nvstak)
goto L10;
5845 FILE* luncor=fopen(
"euc_medi.dat",
"r");
5849 if (iws[iadtmd+itm] > 0) {
5851 strncpy(natmed,(
char *)&
fZiq[jtm+1],20);
5852 imat = Int_t (
fZq[jtm+6]);
5855 printf(
" *** GWEUCL *** material not defined for tracking medium " 5856 "%5i %s\n",itm,natmed);
5859 strncpy(namate,(
char *)&
fZiq[jma+1],20);
5865 iret=fscanf(luncor,
"%4s,%130s",key,card);
5866 if(iret<=0)
goto L26;
5868 if(!strcmp(key,
"MATE")) {
5869 sscanf(card,
"%d %s %f %f %f %f %f %d",&imatc,namatec,&az,&zc,
5870 &densc,&radlc,&abslc,&nparc);
5871 Gfmate(imat,namate,a,z,dens,radl,absl,par,npar);
5872 if(!strcmp(namatec,namate)) {
5873 if(az==a && zc==z && densc==dens && radlc==radl
5874 && abslc==absl && nparc==nparc) {
5877 printf(
"*** GWEUCL *** material : %3d '%s' restored as %3d\n",
5880 printf(
"*** GWEUCL *** different definitions for material: %s\n",
5885 if(strcmp(key,
"END") && !flag)
goto L23;
5887 printf(
"*** GWEUCL *** cannot restore original number for " 5888 "material: %s\n",namate);
5895 iret=fscanf(luncor,
"%4s,%130s",key,card);
5896 if(iret<=0)
goto L26;
5898 if (!strcmp(key,
"TMED")) {
5899 sscanf(card,
"%d %s %d %d %d %f %f %f %f %f %f %d\n",
5900 &itmedc,natmedc,&nmatc,&isvolc,&ifieldc,&fieldmc,
5901 &tmaxfdc,&stemaxc,&deemaxc,&epsilc,&stminc,&nwbufc);
5902 Gftmed(itm,natmed,nmat,isvol,ifield,fieldm,tmaxf,stemax,deemax,
5903 epsil,stmin,ubuf,&nwbuf);
5904 if(!strcmp(natmedc,natmed)) {
5905 if (iomate[nmat]==nmatc && nwbuf==nwbufc) {
5908 printf(
"*** GWEUCL *** medium : %3d '%20s' restored as %3d\n",
5911 printf(
"*** GWEUCL *** different definitions for tracking " 5912 "medium: %s\n",natmed);
5916 if(strcmp(key,
"END") && !flag)
goto L24;
5918 printf(
"cannot restore original number for medium : %s\n",natmed);
5926 L26: printf(
"*** GWEUCL *** cannot read the data file\n");
5928 L29:
if(luncor) fclose (luncor);
5933 strcpy(card,
"! Tracking medium");
5934 fprintf(lun,k10000,card);
5937 if (iws[iadtmd+itm]>0) {
5939 strncpy(natmed,(
char *)&
fZiq[jtm+1],20);
5941 imat = Int_t (
fZq[jtm+6]);
5945 iotmed[itm]=++imxtmed;
5946 iomate[imat]=++imxmate;
5951 printf(
" *** GWEUCL *** material not defined for tracking " 5952 "medium %5d %s\n", itm,natmed);
5954 strncpy(namate,(
char *)&
fZiq[jma+1],20);
5957 fprintf(lun,
"TMED %3d '%20s' %3d '%20s'\n",iotmed[itm],natmed,
5958 iomate[imat],namate);
5964 strcpy(card,
"! Reperes");
5965 fprintf(lun,k10000,card);
5968 if (iws[iadrot+irm]>0) {
5970 fprintf(lun,
"ROTM %3d",irm);
5971 for(k=11;k<=16;k++) fprintf(lun,
" %8.3f",
fZq[jrm+k]);
5978 strcpy(card,
"! Volumes");
5979 fprintf(lun,k10000,card);
5981 for(ivstak=1;ivstak<=nvstak;ivstak++) {
5987 ish = Int_t (
fZq[jvo+2]);
5988 nmed = Int_t (
fZq[jvo+4]);
5989 npar = Int_t (
fZq[jvo+5]);
5991 if (ivstak>1)
for(i=0;i<npar;i++) par[i]=
fZq[jvo+7+i];
5993 fprintf(lun,
"VOLU '%4s' '%4s' %3d %3d\n",name,kShape[ish-1],
5995 for(i=0;i<(npar-1)/6+1;i++) {
5998 for(k=0;k<(left<6?left:6);k++) fprintf(lun,
" %11.5f",par[i*6+k]);
6002 fprintf(lun,
"VOLU '%4s' '%4s' %3d %3d\n",name,kShape[ish-1],
6010 fprintf(lun,k10000,
"! Divisions");
6011 for(ivstak=1;ivstak<=nvstak;ivstak++) {
6012 ivo = TMath::Abs(iws[ivstak]);
6014 ish = Int_t (
fZq[jvo+2]);
6015 nin = Int_t (
fZq[jvo+3]);
6019 iaxe = Int_t (
fZq[jdiv+1]);
6020 ivin = Int_t (
fZq[jdiv+2]);
6021 ndiv = Int_t (
fZq[jdiv+3]);
6025 nmed = Int_t (
fZq[jvin+4]);
6030 if ((step<=0.)||(ish>=11)) {
6032 fprintf(lun,
"DIVN '%4s' '%4s' %3d %3d\n",name,mother,ndiv,iaxe);
6033 }
else if ((ndiv<=0)||(ish==10)) {
6035 ndvmx = TMath::Abs(ndiv);
6036 fprintf(lun,
"DIVT '%4s' '%4s' %11.5f %3d %3d %3d\n",
6037 name,mother,step,iaxe,iotmed[nmed],ndvmx);
6040 fprintf(lun,
"DVT2 '%4s' '%4s' %11.5f %3d %11.5f %3d %3d\n",
6041 name,mother,step,iaxe,c0,iotmed[nmed],ndiv);
6048 fprintf(lun,k10000,
"! Positionnements\n");
6050 for(ivstak = 1;ivstak<=nvstak;ivstak++) {
6051 ivo = TMath::Abs(iws[ivstak]);
6055 nin = Int_t(
fZq[jvo+3]);
6058 for (in=1;in<=nin;in++) {
6060 ivin = Int_t (
fZq[jin +2]);
6061 numb = Int_t (
fZq[jin +3]);
6062 irot = Int_t (
fZq[jin +4]);
6066 strcpy(konly,
"ONLY");
6067 if (
fZq[jin+8]!=1.) strcpy(konly,
"MANY");
6071 ish = Int_t (
fZq[jvin+2]);
6073 ndata =
fZiq[jin-1];
6075 fprintf(lun,
"POSI '%4s' %4d '%4s' %11.5f %11.5f %11.5f %3d '%4s'\n",
6076 name,numb,mother,x,y,z,irot,konly);
6078 npar = Int_t (
fZq[jin+9]);
6079 for(i=0;i<npar;i++) par[i]=
fZq[jin+10+i];
6081 fprintf(lun,
"POSP '%4s' %4d '%4s' %11.5f %11.5f %11.5f %3d '%4s' %3d\n",
6082 name,numb,mother,x,y,z,irot,konly,npar);
6084 for(i=0;i<npar;i++) fprintf(lun,
" %11.5f",par[i]);
6091 fprintf(lun,
"END\n");
6096 lun=fopen(filetme,
"w");
6099 if (iws[iadtmd+itm]>0) {
6101 strncpy(natmed,(
char*)&
fZiq[jtm+1],4);
6102 imat = Int_t (
fZq[jtm+6]);
6105 Gfmate (imat,namate,a,z,dens,radl,absl,par,npar);
6106 fprintf(lun,
"MATE %4d '%20s'%11.5E %11.5E %11.5E %11.5E %11.5E %3d\n",
6107 iomate[imat],namate,a,z,dens,radl,absl,npar);
6111 for(i=0;i<npar;i++) fprintf(lun,
" %11.5f",par[i]);
6115 Gftmed(itm,natmed,nmat,isvol,ifield,fieldm,tmaxfd,stemax,deemax,
6116 epsil,stmin,par,&npar);
6117 fprintf(lun,
"TMED %4d '%20s' %3d %1d %3d %11.5f %11.5f %11.5f " 6118 "%11.5f %11.5f %11.5f %3d\n",
6119 iotmed[itm],natmed,iomate[nmat],isvol,ifield,
6120 fieldm,tmaxfd,stemax,deemax,epsil,stmin,npar);
6124 for(i=0;i<npar;i++) fprintf(lun,
" %11.5f",par[i]);
6130 fprintf(lun,
"END\n");
6132 printf(
" *** GWEUCL *** file: %s is now written out\n",filext);
6133 printf(
" *** GWEUCL *** file: %s is now written out\n",filetme);
6149 switch (particleType) {
6150 case kPTGamma:
return 1;
6151 case kPTElectron:
return 2;
6152 case kPTNeutron:
return 3;
6153 case kPTHadron:
return 4;
6154 case kPTMuon:
return 5;
6155 case kPTGeantino:
return 6;
6156 case kPTOpticalPhoton:
return 7;
6157 case kPTIon:
return 8;
6170 case 1:
return kPTGamma;
6171 case 2:
return kPTElectron;
6172 case 3:
return kPTNeutron;
6173 case 4:
return kPTHadron;
6174 case 5:
return kPTMuon;
6175 case 6:
return kPTGeantino;
6176 case 7:
return kPTOpticalPhoton;
6177 case 8:
return kPTIon;
6178 default:
return kPTUndefined;
6191 switch (particleType) {
6192 case kPTGamma:
return TString(
"Photon");
6193 case kPTElectron:
return TString(
"Lepton");
6194 case kPTNeutron:
return TString(
"Hadron");
6195 case kPTHadron:
return TString(
"Hadron");
6196 case kPTMuon:
return TString(
"Lepton");
6197 case kPTGeantino:
return TString(
"Special");
6198 case kPTIon:
return TString(
"Ion");
6199 case kPTOpticalPhoton:
return TString(
"Photon");
6200 default:
return TString(
"Unknown");
6212 if (gDebug > 0) printf(
"FinishGeometry, calling ggclos\n");
6217 if (gDebug > 0) printf(
"FinishGeometry, calling SetColors\n");
6221 if (gDebug > 0) printf(
"FinishGeometry, returning\n");
6244 fApplication->AddParticles();
6245 fApplication->AddIons();
6246 fApplication->ConstructGeometry();
6248 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,01,1) 6249 fApplication->ConstructOpGeometry();
6251 fApplication->InitGeometry();
6261 Int_t todo = TMath::Abs(nevent);
6262 for (Int_t
i=0;
i<todo;
i++) {
6267 fApplication->BeginEvent();
6271 fApplication->FinishEvent();
6275 if (
fStopRun) printf(
" **** Run stopped ***\n");
6284 stattree->AutoSave();
6286 printf(
"Statistics tree saved.\n");
6319 for(kv=1;kv<=nvolum;kv++) {
6321 Int_t itm=Int_t (
fZq[
fZlq[jvolum-kv]+4]);
6331 strncpy(name,(
char*)&
fZiq[jvolum+kv],4);
6333 Gsatt(name,
"COLO",icol);
6339 Float_t *vpos, Float_t *polar, Float_t tof,
6340 TMCProcess mech, Int_t &ntr, Float_t
weight, Int_t is)
6366 Float_t mass = TDatabasePDG::Instance()->GetParticle(pdg)->Mass();
6367 Float_t
e=TMath::Sqrt(mass*mass+pmom[0]*pmom[0]+
6368 pmom[1]*pmom[1]+pmom[2]*pmom[2]);
6376 GetStack()->PushTrack(done, parent, pdg, pmom[0], pmom[1], pmom[2], e,
6377 vpos[0],vpos[1],vpos[2],tof,polar[0],polar[1],polar[2],
6378 mech, ntr, weight, is);
6389 Float_t* floatArray;
6391 floatArray =
new Float_t[size];
6392 for (Int_t
i=0;
i<size;
i++)
6393 if (array[
i] >= FLT_MAX )
6394 floatArray[
i] = FLT_MAX/100.;
6396 floatArray[
i] = array[
i];
6400 floatArray =
new Float_t[1];
6413 Float_t* floatArray;
6415 floatArray =
new Float_t[size];
6416 for (Int_t
i=0;
i<size;
i++)
6417 if (array[
i] >= FLT_MAX )
6418 floatArray[
i] = FLT_MAX/100.;
6420 floatArray[
i] = array[
i];
6424 floatArray =
new Float_t[1];
6431 void TGeant3::Streamer(TBuffer &R__b)
6436 if (R__b.IsReading()) {
6437 Version_t R__v = R__b.ReadVersion();
if (R__v) { }
6438 TVirtualMC::Streamer(R__b);
6444 R__b.WriteVersion(TGeant3::IsA());
6445 TVirtualMC::Streamer(R__b);
6462 Float_t &
e,Float_t *vpos,Float_t *polar,
6479 TParticle* track = gMC->GetStack()->PopNextTrack(mtrack);
6483 pmom[0] = track->Px();
6484 pmom[1] = track->Py();
6485 pmom[2] = track->Pz();
6486 e = track->Energy();
6487 vpos[0] = track->Vx();;
6488 vpos[1] = track->Vy();
6489 vpos[2] = track->Vz();
6492 track->GetPolarisation(pol);
6496 ipart = gMC->IdFromPDG(track->GetPdgCode());
6509 TVirtualMCApplication::Instance()->FinishPrimary();
6518 TVirtualMCApplication::Instance()->BeginPrimary();
6534 statsame = gcchan->
lsamvl;
6535 for (
int j=0;j<6;j++)
if (j <3) oldvect[j] = x[j];
else oldvect[j]=0;
6536 oldsafety = gctrak->
safety;
6537 oldstep = gctrak->
step;
6538 sprintf(statpath,
"%s",geant3->
GetPath());
6539 statsnext=gctrak->
snext;
6540 statsafety=gctrak->
safety;
6554 for (
int j=0;j<6;j++)
if (j <3) oldvect[j] = x[j];
else oldvect[j]=0;
6555 oldsafety = gctrak->
safety;
6556 oldstep = gctrak->
step;
6557 sprintf(statpath,
"%s",geant3->
GetPath());
6558 statsnext=gctrak->
snext;
6559 statsafety=gctrak->
safety;
6586 void glvolu(Int_t &nlev, Int_t *lnam,Int_t *lnum, Int_t &ier)
6607 fglvolu(nlev, lnam, lnum, ier);
6618 for (
int j=0;j<6;j++) oldvect[j] = gctrak->
vect[j];
6619 oldsafety = gctrak->
safety;
6620 oldstep = gctrak->
step;
6621 sprintf(statpath,
"%s",geant3->
GetPath());
6627 statsnext=gctrak->
snext;
6628 statsafety=gctrak->
safety;
6659 Int_t
i,
n,
k,*lnam=0,*lnum=0;
6661 Double_t
m[9] = {1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0};
6662 Double_t
s[3] = {1.0,1.0,1.0};
6663 Double_t
t[3] = {0.0,0.0,0.0};
6675 mat.SetTranslation(t);
6680 i = this->
Glvolu(k,lnam,lnum);
6684 if(i!=0)
return kFALSE;
6686 if(!((this->
Gcvolu()->grmat[n][9])==0.0)) {
6687 for(i=0;i<9;i++) m[i] = (Double_t) this->
Gcvolu()->
grmat[
n][
i];
6690 for(i=0;i<3;i++) t[i] = (Double_t) (this->
Gcvolu()->
gtran[
n][
i]);
6691 mat.SetTranslation(t);
6750 const Int_t nshapes = 16;
6751 const Char_t *vname[nshapes] = {
"BOX",
"TRD1",
"TRD2",
"TRAP",
"TUBE",
"TUBS",
6752 "CONE",
"CONS",
"SPHE",
"PARA",
"PGON",
"PCON",
6753 "ELTU",
"HYPE",
"GTRA",
"CTUB"};
6754 Int_t volid,
i,
k,jv0,ishape,npar,*lnam=0,*lnum=0;
6764 i = this->
Glvolu(k,lnam,lnum);
6773 ishape = (Int_t)(this->
Q()[jv0+2]);
6774 if(ishape<1||ishape>nshapes)
return kFALSE;
6775 npar = (Int_t)(this->
Q()[jv0+5]);
6776 qpar = (this->
Q())+jv0+7;
6778 for(i=0;i<npar;i++) par.AddAt((Double_t)qpar[i],i);
6779 shapeType = vname[ishape-1];
6780 shapeType = shapeType.Strip();
6785 TString &
name,Int_t &imat,
6786 Double_t &
a,Double_t &
z,Double_t &dens,
6787 Double_t &radl,Double_t &inter,TArrayD &par){
6806 Int_t
i,volid,jma,nbuf;
6807 Float_t af,zf,densf,radlf,interf;
6809 Char_t *ch,namec[20] = {20*
'\0'};
6811 volid =
VolId(volumeName.Data());
6812 if(volid==0)
return kFALSE;
6814 Int_t imed = (Int_t) (this->
Q()[this->
Lq()[
6817 imat = (Int_t)(this->
Q()[jtm+6]);
6820 Int_t jdiv = this->
Lq()[
i];
6821 Int_t ivin = (Int_t) (this->
Q()[jdiv+2]);
6823 Int_t jvin = this->
Lq()[
i];
6824 Int_t idmed = (Int_t)(this->
Q()[jvin+4]);
6826 Int_t jtm = this->
Lq()[
i];
6827 imat = (Int_t)(this->
Q()[jtm+6]);
6830 ubuf =
new Float_t[nbuf];
6831 Gfmate(imat,namec,af,zf,densf,radlf,interf,ubuf,nbuf);
6834 ch = (
char *)(this->
Iq()+jma+1);
6835 for(i=0;i<20;i++)
if(ch[i]!=
' ') namec[
i] = ch[
i];
6837 name = name.Strip();
6840 for(i=0;i<nbuf;i++) par.AddAt(((Double_t)ubuf[i]),i);
6844 dens = (Double_t) densf;
6845 radl = (Double_t) radlf;
6846 inter = (Double_t) interf;
6851 Int_t &imed,Int_t &nmat,Int_t &isvol,Int_t &ifield,
6852 Double_t &fieldm,Double_t &tmaxfd,Double_t &stemax,
6853 Double_t &deemax,Double_t &epsil, Double_t &stmin,
6877 Float_t fieldmf,tmaxfdf,stemaxf,deemaxf,epsilf,stminf;
6879 Char_t namec[25] = {25*
'\0'};
6881 volid =
VolId(volumeName.Data());
6882 if(volid==0)
return kFALSE;
6884 imed = (Int_t)(this->
Q()[this->
Lq()[this->
Gclink()->
jvolum-volid]+4]);
6887 Int_t ivin = (Int_t) (this->
Q()[jdiv+2]);
6889 imed = (Int_t)(this->
Q()[jvin+4]);
6892 buf =
new Float_t[nbuf];
6893 Gftmed(imed,namec,nmat,isvol,ifield,fieldmf,tmaxfdf,stemaxf,deemaxf,
6894 epsilf,stminf,buf,&nbuf);
6896 name = name.Strip();
6898 for(i=0;i<nbuf;i++) par.AddAt(((Double_t)buf[i]),i);
6900 fieldm = (Double_t) fieldmf;
6901 tmaxfd = (Double_t) tmaxfdf;
6902 stemax = (Double_t) stemaxf;
6903 deemax = (Double_t) deemaxf;
6904 epsil = (Double_t) epsilf;
6905 stmin = (Double_t) stminf;
6910 Int_t **lnam,Int_t **lnum){
6928 Int_t
i,j=0,
k=0,ireturn,ichar,*inam;
6929 Char_t *buf,**levels,**copies,nam[4];
6932 buf =
new Char_t[volumePath.Length()+1];
6933 for(i=0;i<volumePath.Length();i++) {
6934 if(volumePath[i]!=
' ')buf[j++] = volumePath[
i];
6935 if(volumePath[i]==
'/')
k++;
6938 if(buf[j-1]==
'/') {
k--; buf[j-1]=
'\0';}
6940 levels =
new Char_t*[
k];
6941 copies =
new Char_t*[
k];
6942 (*lnam) =
new Int_t[
k];
6943 (*lnum) =
new Int_t[
k];
6948 for(i=0;i<ichar;i++) {
6950 levels[
k++] = &(buf[i+1]);
6954 copies[j++] = &(buf[i+1]);
6967 Error(
"ConvertVolumePathString",
"Different number of volume names %d" 6968 " and copy numbers %d in volumePath:%s",
k,j,volumePath.Data());
6973 (*lnum)[
i] = atoi(copies[i]);
6975 if(levels[i][j] == 0)
break;
6976 nam[j] = levels[
i][j];
6989 Float_t& cosph, Float_t& sinph, Int_t& rotate)
6992 g3fang(p, costh, sinth, cosph, sinph, rotate );
7001 return 1000000000 + 10*1000*z + 10*a +
i;
7009 return 50000000 + number;
virtual void Vname(const char *name, char *vname)
virtual void SetUserParameters(Bool_t isUserParameters)
virtual TString ParticleName(Int_t pdg) const
#define PASSCHARL(string)
void TrackPosition(TLorentzVector &xyz) const
Int_t NSecondaries() const
virtual void Trscsd(Float_t *pc, Float_t *rc, Float_t *pd, Float_t *rd, Float_t *h, Float_t ch, Int_t ierr, Float_t spu, Float_t *dj, Float_t *dk)
Gcflag_t * fGcflag
GCKINE common structure.
virtual void SetABAN(Int_t par=1)
virtual void Gckmat(Int_t itmed, char *natmed)
Bool_t IsTrackExiting() const
virtual void Gdspec(const char *name)
Int_t GetMaxNStep() const
Gcphlt_t * fGcphlt
GCPHYS common structure.
virtual void BuildPhysics()
virtual void SetCKOV(Int_t par=1)
virtual void SetBorderSurface(const char *name, const char *vol1Name, int vol1CopyNo, const char *vol2Name, int vol2CopyNo, const char *opSurfaceName)
Bool_t IsTrackStop() const
void ForceDecayTime(Float_t time)
virtual void SetANNI(Int_t par=1)
void(* fgtmany)(Int_t &)=0
virtual void SetSWIT(Int_t sw, Int_t val=1)
void(* fglvolu)(Int_t &nlev, Int_t *lnam, Int_t *lnum, Int_t &ier)=0
virtual void SetCUTS(Float_t cutgam, Float_t cutele, Float_t cutneu, Float_t cuthad, Float_t cutmuo, Float_t bcute, Float_t bcutm, Float_t dcute, Float_t dcutm, Float_t ppcutm, Float_t tofmax, Float_t *gcuts)
Bool_t DefineParticle(Int_t pdg, const char *name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime)
virtual Int_t Gsvert(Float_t *v, Int_t ntbeam, Int_t nttarg, Float_t *ubuf=0, Int_t nwbuf=0)
Int_t CurrentMaterial(Float_t &a, Float_t &z, Float_t &dens, Float_t &radl, Float_t &absl) const
Eropts_t * fEropts
ERTRIO1 common structure.
virtual void SetPFIS(Int_t par=1)
Bool_t IsTrackEntering() const
virtual Double_t Edep() const
Gcjump_t * fGcjump
GCONSX common structure.
Quest_t * fQuest
Good Old Q of Zebra.
virtual void LoadAddress()
virtual void ProcessEvent()
virtual void SetBREM(Int_t par=1)
virtual void Gdhead(Int_t isel, const char *name, Double_t chrsiz=0.6)
Gctlit_t * fGctlit
GCOPTI common structure.
const char * VolDaughterName(const char *volName, Int_t i) const
Gcvolu_t * fGcvolu
GCVDMA common structure.
virtual void Gsatt(const char *name, const char *att, Int_t val)
Double_t TrackLength() const
virtual void Gprint(const char *name)
Float_t * CreateFloatArray(Float_t *array, Int_t size) const
virtual void GdtreeParent(const char *name, Int_t levmax=15, Int_t ispec=0)
const char * GetNodeName()
Int_t fNG3Particles
Names of geant medias as TObjString.
virtual void Gfile(const char *filename, const char *option="I")
virtual void Gskpho(Int_t igk)
virtual void Ertrak(const Float_t *x1, const Float_t *p1, const Float_t *x2, const Float_t *p2, Int_t ipa, Option_t *chopt)
Gcnum_t * fGcnum
GCTPOL common structure.
virtual void Gsdvn2(const char *name, const char *mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed)
virtual void Gsdvt(const char *name, const char *mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx)
virtual void SetDCAY(Int_t par=1)
static const Int_t kDefSize
Float_t * fZq
Good Old LQ of Zebra.
Gccuts_t * fGccuts
GCLINK common structure.
TMCParticleType ParticleType(Int_t itrtyp) const
virtual Gcvolu_t * Gcvolu() const
virtual void SetRootGeometry()
Gcbank_t * fGcbank
QUEST common structure.
Bool_t IsTrackOut() const
Eroptc_t * fEroptc
EROPTS common structure.
Gcphys_t * fGcphys
GCTMED common structure.
virtual Bool_t ProcessRun(Int_t nevent)
void TrackMomentum(TLorentzVector &xyz) const
virtual void Trscsp(Float_t *ps, Float_t *rs, Float_t *pc, Float_t *rc, Float_t *h, Float_t *ch, Int_t *ierr, Float_t *spx)
void type_of_call g3rfile(const Int_t &, DEFCHARD, DEFCHARD DEFCHARL DEFCHARL)
virtual void Gsmate(Int_t imat, const char *name, Float_t a, Float_t z, Float_t dens, Float_t radl, Float_t absl)
Erwork_t * fErwork
EROPTC common structure.
virtual void Gdopt(const char *name, const char *value)
virtual void Gftmat(Int_t imate, Int_t ipart, char *chmeca, Int_t kdim, Float_t *tkin, Float_t *value, Float_t *pcut, Int_t &ixst)
virtual void DefineOpSurface(const char *name, EMCOpSurfaceModel model, EMCOpSurfaceType surfaceType, EMCOpSurfaceFinish surfaceFinish, Double_t sigmaAlpha)
virtual void SetDEBU(Int_t emin=1, Int_t emax=999, Int_t emod=1)
virtual void Gsdvt2(const char *name, const char *mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx)
const char * VolName(Int_t id) const
virtual void Eufilp(const Int_t n, Float_t *ein, Float_t *pli, Float_t *plf)
virtual void SetPAIR(Int_t par=1)
virtual void Gdshow(Int_t view)
virtual void Gfkine(Int_t itra, Float_t *vert, Float_t *pvert, Int_t &ipart, Int_t &nvert)
virtual void Mixture(Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat)
Int_t PDGFromId(Int_t pdg) const
virtual void Gmtod(Float_t *xm, Float_t *xd, Int_t iflag)
char(* fVolNames)[5]
GCJUMP common structure.
virtual void Gsmixt(Int_t imat, const char *name, Float_t *a, Float_t *z, Float_t dens, Int_t nlmat, Float_t *wmat)
virtual void DrawOneSpec(const char *name)
bool check(const std::vector< std::vector< float > > &outputs)
virtual void Gsckov(Int_t itmed, Int_t npckov, Float_t *ppckov, Float_t *absco, Float_t *effic, Float_t *rindex)
virtual void SetCOMP(Int_t par=1)
Bool_t IsTrackDisappeared() const
virtual Float_t Gbrelm(Float_t z, Float_t t, Float_t cut)
virtual TMCParticleType ParticleMCType(Int_t pdg) const
void type_of_call setbomb(Float_t &)
Int_t VolId2Mate(Int_t id) const
Int_t G3Gsvolu(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np)
virtual void Gsdvn(const char *name, const char *mother, Int_t ndiv, Int_t iaxis)
Gcking_t * fGcking
GCPHLT common structure.
virtual Double_t Etot() const
virtual void SetRAYL(Int_t par=1)
virtual void Gfmate(Int_t imat, char *name, Float_t &a, Float_t &z, Float_t &dens, Float_t &radl, Float_t &absl, Float_t *ubuf, Int_t &nbuf)
virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov, Float_t *absco, Float_t *effic, Float_t *rindex)
virtual void Gdopen(Int_t view)
Gclink_t * fGclink
GCBANK common structure.
Int_t NofVolDaughters(const char *volName) const
void G3Mixture(Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat)
void(* fgtmedi)(Float_t *, Int_t &)=0
virtual Double_t ParticleCharge(Int_t pdg) const
virtual void Eufilv(Int_t n, Float_t *ein, Char_t *namv, Int_t *numv, Int_t *iovl)
virtual void Gsdvs2(const char *name, const char *mother, Float_t step, Int_t iaxis, Float_t c0, Int_t numed)
virtual void GetClose(Float_t *p1, Float_t *p2, Float_t *p3, Float_t *len)
Int_t GetSpecialPdg(Int_t number) const
Int_t * fZlq
Good Old IQ of Zebra.
Int_t IdFromPDG(Int_t pdg) const
auto array(Array const &a)
Returns a manipulator which will print the specified array.
Gcmore_t * fGcmore
GCCUTS common structure.
virtual Int_t CurrentMedium() const
void(* fginvol)(Float_t *, Int_t &)=0
Int_t CurrentVolOffID(Int_t off, Int_t ©) const
void(* fgmedia)(Float_t *, Int_t &, Int_t &)=0
Int_t CurrentVolID(Int_t ©) const
virtual void Gsdvs(const char *name, const char *mother, Float_t step, Int_t iaxis, Int_t numed)
Int_t StepProcesses(TArrayI &proc) const
void G3Material(Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Float_t *buf=0, Int_t nwbuf=0)
virtual void Trsdsc(Float_t *pd, Float_t *rd, Float_t *pc, Float_t *rc, Float_t *h, Float_t *ch, Int_t *ierr, Float_t *spu, Float_t *dj, Float_t *dk)
Bool_t GetTransformation(const TString &volumePath, TGeoHMatrix &mat)
Int_t GetIonPdg(Int_t z, Int_t a, Int_t i=0) const
virtual Int_t Gskine(Float_t *plab, Int_t ipart, Int_t nv, Float_t *ubuf=0, Int_t nwbuf=0)
const char * CurrentVolPath()
virtual void GtreveRoot()
virtual Gctrak_t * Gctrak() const
virtual void SetSkinSurface(const char *name, const char *volName, const char *opSurfaceName)
Gconsx_t * cconsx
GCONST common structure.
Double_t Xsec(char *reac, Double_t energy, Int_t part, Int_t mate)
Int_t ConvertVolumePathString(const TString &volumeName, Int_t **lnam, Int_t **lnum)
TRCOM3 common structure.
Int_t NextVolUp(Text_t *name, Int_t ©)
Int_t TransportMethod(TMCParticleType particleType) const
virtual void SetMUNU(Int_t par=1)
Gckin2_t * fGckin2
GCKING common structure.
virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np)
void G3Gsposp(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly, Float_t *upar, Int_t np)
Double_t TrackCharge() const
virtual void Grndmq(Int_t &is1, Int_t &is2, Int_t iseq, const Text_t *chopt)
Gckin3_t * fGckin3
GCKIN2 common structure.
virtual void Gsking(Int_t igk)
Int_t VolDaughterCopyNo(const char *volName, Int_t i) const
virtual void SetClipBox(const char *name, Double_t xmin=-9999, Double_t xmax=0, Double_t ymin=-9999, Double_t ymax=0, Double_t zmin=-9999, Double_t zmax=0)
virtual void Gdelete(Int_t view)
virtual void SetDRAY(Int_t par=1)
virtual void SetPHOT(Int_t par=1)
virtual Int_t GetMedium() const
Double_t TrackStep() const
virtual void SetHADR(Int_t par=1)
Gconsx_t * fGconsx
GCONST common structure.
virtual void Gftmed(Int_t numed, char *name, Int_t &nmat, Int_t &isvol, Int_t &ifield, Float_t &fieldm, Float_t &tmaxfd, Float_t &stemax, Float_t &deemax, Float_t &epsil, Float_t &stmin, Float_t *buf=0, Int_t *nbuf=0)
auto norm(Vector const &v)
Return norm of the specified vector.
virtual void SetERAN(Float_t ekmin=1.e-5, Float_t ekmax=1.e4, Int_t nekbin=90)
virtual void Gdtree(const char *name, Int_t levmax=15, Int_t ispec=0)
virtual void WriteEuclid(const char *filnam, const char *topvol, Int_t number, Int_t nlevel)
virtual void SetClose(Int_t iclose, Float_t *pf, Float_t dstrt, Float_t *w1, Float_t *w2, Float_t *p1, Float_t *p2, Float_t *p3, Float_t *cl)
void SetTrack(Int_t done, Int_t parent, Int_t pdg, Float_t *pmom, Float_t *vpos, Float_t *polar, Float_t tof, TMCProcess mech, Int_t &ntr, Float_t weight, Int_t is)
virtual Gcphys_t * Gcphys() const
virtual void SetOPTI(Int_t par=2)
const char * CurrentVolName() const
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
virtual Double_t ParticleLifeTime(Int_t pdg) const
virtual void AddParticlesToPdgDataBase() const
virtual void Grndm(Float_t *rvec, Int_t len) const
Gcopti_t * fGcopti
GCSETS common structure.
Bool_t SetProcess(const char *flagName, Int_t flagValue)
void(* fggperp)(Float_t *, Float_t *, Int_t &)=0
virtual void Gprotm(Int_t nmat=0)
virtual Double_t ParticleMass(Int_t pdg) const
virtual void Gdraw(const char *name, Double_t theta=30, Double_t phi=30, Double_t psi=0, Double_t u0=10, Double_t v0=10, Double_t ul=0.01, Double_t vl=0.01)
void G3Medium(Int_t &kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Float_t *ubuf=0, Int_t nbuf=0)
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
virtual void Glmoth(const char *iudet, Int_t iunum, Int_t &nlev, Int_t *lvols, Int_t *lindx)
virtual Float_t Gprelm(Float_t z, Float_t t, Float_t cut)
Bool_t DefineIon(const char *name, Int_t Z, Int_t A, Int_t Q, Double_t excEnergy, Double_t mass)
void SetMaxStep(Double_t maxstep)
virtual void SetBOMB(Float_t bomb=1)
virtual void Gfpart(Int_t ipart, char *name, Int_t &itrtyp, Float_t &amass, Float_t &charge, Float_t &tlife) const
Gcmulo_t * fGcmulo
GCMORE common structure.
virtual Float_t * Q() const
virtual void Gmedia(Float_t *x, Int_t &numed)
Gcmate_t * fGcmate
GCMULO common structure.
string GetString(xmlDocPtr xml_doc, string node_path)
void SetMaxNStep(Int_t maxnstp)
virtual void Gstmed(Int_t numed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, Float_t stmin)
Gckine_t * fGckine
GCVOLU common structure.
const GenericPointer< typename T::ValueType > T2 value
virtual void Gdrawx(const char *name, Float_t cutthe, Float_t cutphi, Float_t cutval, Float_t theta=30, Float_t phi=30, Float_t u0=10, Float_t v0=10, Float_t ul=0.01, Float_t vl=0.01)
virtual void SetUserDecay(Int_t ipart)
for(std::string line;std::getline(inFile, line);)
Gctpol_t * fGctpol
GCMATE common structure.
Gctmed_t * fGctmed
GCFLAG common structure.
virtual Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3])
TObjArray fMedNames
Names of geant volumes as C++ chars.
virtual void Eufill(Int_t n, Float_t *ein, Float_t *xlf)
virtual void Gspos(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly="ONLY")
void(* fgtonly)(Int_t &)=0
Double_t TrackTime() const
virtual void SetLOSS(Int_t par=2)
virtual void Gfvert(Int_t nvtx, Float_t *v, Int_t &ntbeam, Int_t &nttarg, Float_t &tofg)
virtual Int_t * Lq() const
Bool_t IsTrackInside() const
Bool_t IsTrackAlive() const
Bool_t SetCut(const char *cutName, Double_t cutValue)
virtual void Gwork(Int_t nwork)
virtual Int_t Glvolu(Int_t nlev, Int_t *lnam, Int_t *lnum)
Ertrio1_t * fErtrio1
ERTRIO common structure.
void type_of_call setclip(DEFCHARD, Float_t &, Float_t &, Float_t &, Float_t &, Float_t &, Float_t &DEFCHARL)
Gcvdma_t * fGcvdma
GCTLIT common structure.
virtual void Gsdk(Int_t ipart, Float_t *bratio, Int_t *mode)
TMCProcess ProdProcess(Int_t isec) const
Double_t TrackMass() const
Gcjump_t * gcjump
GCONSX common structure.
virtual void Material(Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Float_t *buf=0, Int_t nwbuf=0)
Bool_t fImportRootGeometry
virtual void Gsstak(Int_t iflag)
virtual void SetTRIG(Int_t nevents=1)
Int_t MediumId(const Text_t *name) const
virtual void Gckpar(Int_t ish, Int_t npar, Float_t *par)
virtual void Gsrotm(Int_t nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, Float_t phi3)
virtual void Gfpara(const char *name, Int_t number, Int_t intext, Int_t &npar, Int_t &natt, Float_t *par, Float_t *att)
virtual void SetMULS(Int_t par=1)
Int_t CurrentEvent() const
Bool_t GetShape(const TString &volumePath, TString &shapeType, TArrayD &par)
virtual void FinishGeometry()
virtual void SetKINE(Int_t kine, Float_t xk1=0, Float_t xk2=0, Float_t xk3=0, Float_t xk4=0, Float_t xk5=0, Float_t xk6=0, Float_t xk7=0, Float_t xk8=0, Float_t xk9=0, Float_t xk10=0)
virtual void SetMaterialProperty(Int_t itmed, const char *propertyName, Int_t np, Double_t *pp, Double_t *values)
virtual void Gspart(Int_t ipart, const char *name, Int_t itrtyp, Double_t amass, Double_t charge, Double_t tlife)
Bool_t IsNewTrack() const
void GetSecondary(Int_t isec, Int_t &ipart, TLorentzVector &x, TLorentzVector &p)
virtual void Gdxyz(Int_t it)
TMCProcess G3toVMC(Int_t iproc) const
virtual void SetSTRA(Int_t par=0)
Int_t VolId(const Text_t *name) const
virtual void SetECut(Float_t gcalpha)
virtual void Gfang(Float_t *p, Float_t &costh, Float_t &sinth, Float_t &cosph, Float_t &sinph, Int_t &rotate)
virtual void Medium(Int_t &kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Float_t *ubuf=0, Int_t nbuf=0)
virtual void DefaultRange()
type_of_call void gtonlyg3(Int_t &)
GCJUMP common structure.
constexpr std::enable_if_t< are_cv_compatible< TO, FROM >::value, std::add_pointer_t< std::remove_pointer_t< TO > > > addr(FROM &from)
virtual Gclink_t * Gclink() const
virtual void SetAUTO(Int_t par=1)
virtual void Gstpar(Int_t itmed, const char *param, Double_t parval)
Gconst_t * fGconst
GCCHAN common structure.
Float_t erplo[MXPRED *3 *4]
#define PASSCHARD(string)
const char * CurrentVolOffName(Int_t off) const
virtual void Gdman(Double_t u0, Double_t v0, const char *type="MAN")
Gctrak_t * fGctrak
GCKIN3 common structure.
virtual void Matrix(Int_t &krot, Double_t thex, Double_t phix, Double_t they, Double_t phiy, Double_t thez, Double_t phiz)
virtual void Gdrawc(const char *name, Int_t axis=1, Float_t cut=0, Float_t u0=10, Float_t v0=10, Float_t ul=0.01, Float_t vl=0.01)
Gcsets_t * fGcsets
GCNUM common structure.
TString ParticleClass(TMCParticleType particleType) const
h
training ###############################
Bool_t GetMaterial(const TString &volumeName, TString &name, Int_t &imat, Double_t &a, Double_t &z, Double_t &den, Double_t &radl, Double_t &inter, TArrayD &par)
virtual Int_t * Iq() const
virtual void Gdtom(Float_t *xd, Float_t *xm, Int_t iflag)
virtual void Gsposp(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly, Float_t *upar, Int_t np)
virtual void Gsord(const char *name, Int_t iax)
virtual void Trspsc(Float_t *ps, Float_t *rs, Float_t *pc, Float_t *rc, Float_t *h, Float_t *ch, Int_t *ierr, Float_t *spx)