Running the GEANT4 simulation code

From GRETINA at ANL
Revision as of 20:56, June 17, 2013 by Tlauritsen (talk | contribs)
Jump to navigation Jump to search

intro

much in these instructions are for locals at the moment

Instructions for compiling on SL linux boxes

 cd ~/geant4

 #---- to compile clhep
 # --> not necessary anymore!!

 #---- to compile geant4

 rm -rf geant4.9.6.p01
 tar -zxvf tars/geant4.9.6.p01.tar.gz
 cd geant4.9.6.p01
 mkdir data
 cd data
 tar -zxvf ../../tars/G4EMLOW.6.32.tar.gz
 tar -zxvf ../../tars/G4NEUTRONXS.1.2.tar.gz
 tar -zxvf ../../tars/G4PhotonEvaporation.2.3.tar.gz
 tar -zxvf ../../tars/G4PII.1.3.tar.gz
 tar -zxvf ../../tars/G4RadioactiveDecay.3.6.tar.gz
 tar -zxvf ../../tars/G4SAIDDATA.1.1.tar.gz
 tar -zxvf ../../tars/RealSurface.1.0.tar.gz
 cd ..
 mkdir geant4.9.6-build
 cd geant4.9.6-build
 cmake -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_INSTALL_DATA=ON -DCMAKE_INSTALL_PREFIX=$HOME/geant4/geant4.9.6.p01/geant4.9.6-build $HOME/geant4/geant4.9.6.p01 
 . geant4make.sh
 make -j8
 cd ../..

 #---- to compile the LR agata/gretina simulator

rm -rf v1.2.4 or whatevev the latest version name is v1.x
tar -zxvf tars/v1.2.4.tgz
cd v1.3
. ../geant4.9.6.p01/geant4.9.6-build/geant4make.sh
make clean
make
# run an example of mac file for gretina
~/geant4_workdir/bin/Linux-g++/UCGretina eu152/eu152.mac

to run the code

cd /home/tl/geant4/v1.3.0
. ../geant4.9.6.p01/geant4.9.6-build/geant4make.sh
~/geant4_workdir/bin/Linux-g++/UCGretina eu152/eu152.mac
ls -lt *.out

or

cd /home/tl/geant4/v1.3.0
. ../geant4.9.6.p01/geant4.9.6-build/geant4make.sh
~/geant4_workdir/bin/Linux-g++/UCGretina co60/co60.mac
ls -lt *.out
mv co60.out /media/120621a/user/gtdata/G4Co60_NSCL/g4.dat

modify modules included

analyze the G4 mode2 data

To make mode2/mode1 data and analyze with GEBSort, you can do something like this: first download the GEBSort packages see https://wiki.anl.gov/wiki_gretina_at_anl/index.php?title=Tracking/off-line_sort_with_trackMain/GEBSort&oldid=1743 the

 make 
 make G4toMode2_US

that will make the G4toMode2_US program that can read the GEANT4 output files, pack the data and write it in mode2 format.

 rm GTDATA/g4_mode2.out
 ./G4toMode2_US \
    /media/120621a/user/gtdata/G4Co60_NSCL/g4.dat \
    GTDATA/g4_mode2.out \
    G4toMode2.chat > GTDATA/G4toMode2.log
  ls -lh GTDATA/g4_mode2.out

You can look at this mode2 data with GEBSort_nogeb

 rm GTDATA/test.root
 ./GEBSort_nogeb \
   -input disk GTDATA/g4_mode2.out RECREATE \
   -chat GEBSort.chat \
   -rootfile GTDATA/test.root > GTDATA/GEBSort.log

analyze the G4 mode1/mode2 data

you can track the data and look at both the mode1 and mode2 data as

  rm GTDATA/g4_mode2.out
 ./G4toMode2_US \
    /media/120621a/user/gtdata/G4Co60_NSCL/g4.dat \
    GTDATA/g4_mode2.out \
    G4toMode2.chat > GTDATA/G4toMode2.log
  ls -lh GTDATA/g4_mode2.out
  ./trackMain track.chat  GTDATA/g4_mode2.out  GTDATA/g4_mode1.out      > GTDATA/trackMain.log
  rm GTDATA/test.root
 ./GEBSort_nogeb \
   -input disk GTDATA/g4_mode1.out RECREATE \
   -chat GEBSort.chat \
   -rootfile GTDATA/test.root > GTDATA/GEBSort.log