# $Id: g4.doc,v 1.42 2010/11/21 00:58:24 choutko Exp $ ------- Platform: linux-gcc.4.x ($G4SYSTEM=Linux-g++) linux-icc11.1 64bits ($G4SYSTEM=Linux-icc) CAUTION: Support for Geant4.9.3 is in an experimental stage!!!! ------- Installer: linux-gcc.4.x: source /Offline/vdev/install/amsvar.gcc32 source AMS/install/g4i (v4.9.3, Linux-g++, gcc.4.x) linux-icc11.1 64bits: source /Offline/vdev/install/amsvar.icc64 source AMS/install/g4i (v4.9.3, Linux-icc, icc.11.1) see $G4INSTALL/ReleaseNotes.{VC,CD} for ams specifics setenv AMSWD smth mkdir $AMSWD/bin mkdir $AMSWD/exe gmake -if install/Moptg4 (batch) gmake -if install/Moptg4i (interactive{ batch first} (only Linux-g++)) n.b setenv AMSDEBUG 1 switch on debug mode (compiler's one) unsetenv AMSDEBUG switch it off setenv AMSMEMMONITOR 1 switch on monitoring of memory usage unsetenv AMSMEMMONITOR rm ../bin/linux/ntuple.o or rm ../bin/linuxr/ntuple_r.o gmake -f Mopt if AMSMEMMONITOR == 1 then 5 histograms (ROOT or HBOOK) will be filled every 100 events to monitor memory utilization ../CC/ntuple.C - AMSNtuple::MemMonitor subroutine for more details -------- Physics Lists Default Physics List Used = QGSP Switch Off/On Physics Lists G4FF 5=0/1,2,3... -------- Datacards Switch: MISCFFKEY.G4On=1 -------- Running conditions: need to set limit data 700000 for dec-cxx limit data 512000 for linux-g++ --------- Example AMS/datacards/g4.test.job --------- G4 code Files: CC/geant4.C << wrappers, analogs of include/geant4.h,geantnamespace.h << gukine,guout,gustep etc << detector initalizator CC/g4physics.C <<- physics include,CC/g4util.h,C << utilities (rndm etc) include,CC/g4xray.h,C << transition radiaton (g3 based) ----------- G4 aware files: CC/gbatch.C << Main program <-- choose G4/G3 chain CC/geant.C << G4/G3 initialization in uginit/uglast CC/gvolume.C << G4/G3 Constructor CC/gmat.C << G4/G3 constructors Status (geant4.5.0 ) run time g3g4 comparison AMS/examples/g4.test.job,(g4)g3.test.job : G3 G4 Memory(mb) 100 180 CPU/Event(au) 0.8(ifc) 1(g77) 17 "50 gev Ideal electrons" comparison (/offline/vdev/prod/mc/ideal.job,ideal4.job) G3 G4 CPU/Event(au) 0.78(ifc),1(g77) 25 Problem in g4 total energy distribution detected, E_calorimeter(g4,50 gev, average) = 46 gev apparently ecal hit energy distribution is same as in g3, but number of hits is ~ 10% less Status (geant 9.3) 180 GeV electrons comparison G3 G4 CPU/Event(sec) 4.6 47 Geant4 has no default tracking cuts and also production cuts (in range) belong to particle, not tracking media. Default production cut for all particles except e+- is 1mm, for e+- is 100 mkm (to properly handle tracker) The default energy cuts are now set up automatically according to CUTS datacards values. It is also possible to set up the cuts manually (a-la g3 GSTPAR) via (gmat.h,gmat.C) CUTGAM CUTELE CUTNEU CUTMUO CUTHAD TOFMAX routines. Example: AMSgtmed ptmed= (AMSgtmed*)tmed.add (new AMSgtmed("EC_RADIATOR","LEAD",0,'N',birks,2,20.,10.,1000., -1.,0.001,-1.)); // simplif.tracking in magn.f //GSTPAR(GetLastMedNo(),"CUTGAM",ECMCFFKEY.cutge);// special cuts for EC_RADIATOR //GSTPAR(GetLastMedNo(),"CUTELE",ECMCFFKEY.cutge); // geant4 + geant3 (i.e. also calls GSTPAR) ptmed->CUTGAM(ECMCFFKEY.cutge); ptmed->CUTELE(ECMCFFKEY.cutge); in addition one can also set the range cut (in cm) via ptmed.CUTRANGE()=range; For debug purposes all geant3-like cuts may be switch on/off via G4FF 4=1/0 datacard Random Numbers: seeds thru same RNDM card as for geant3 (ranecu engine); hrndm1 like one must be redone via ::book & ::hrndm1 ones random sequence doesn' work yet on geant4 (geant4 fault) Transition Radiation ---------------------- Based on geant3 transition radiation generator + geant4 low energy photon propagation & absorbtion. Need to be tested Cerenkov Photons --------------------- AMSgtmed::AGSCKOV routine handles cerenkov media parameters, last one is rayleigh "opacity", others as in g3 GSCKOV routine NB: g4 optical processes were modified, standard ones will not work. ---------------------