Running the GEANT4 simulation code: Difference between revisions

From GRETINA at ANL
Jump to navigation Jump to search
(Created page with "These notes are at the moment more to remind myself how to to things than to document anything Instructions for compiling on SL linux boxes cd ~/geant4 more README to run...")
 
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
These notes are at the moment more to remind myself how to to things than to document anything


Instructions for compiling on SL linux boxes
==intro==


cd ~/geant4
much in these instructions are for locals at the moment
more README


to run the code
==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
  cd /home/tl/geant4/v1.3.0
Line 15: Line 53:
or
or


  cd /home/tl/geant4/v1.3.0
cd /home/tl/geant4/v1.3.0
  . ../geant4.9.6.p01/geant4.9.6-build/geant4make.sh
  . ../geant4.9.6.p01/geant4.9.6-build/geant4make.sh
  ~/geant4_workdir/bin/Linux-g++/UCGretina co60/co60.mac
  ~/geant4_workdir/bin/Linux-g++/UCGretina co60/co60.mac
  ls -lt *.out
  ls -lt *.out
  mv co60.out /media/120621a/user/gtdata/G4Co60_NSCL/g4.dat
  mv co60.out /media/120621a/user/gtdata/G4Co60_NSCL/g4.dat
==Modify the included GRETINA modules==
modify: GretinaGeometry/Greta/G120C4euler.list. Here is the complete list of GRETINA modules:
  0  0    288.00  0.00000    0.000 0 0 0
  1  0      0.00  0.00000    0.000 0 0 0
  2  0    72.00  0.00000    0.000 0 0 0
  3  0    144.00  0.00000    0.000 0 0 0
  4  0    216.00  0.00000    0.000 0 0 0
  5  0    235.58  63.43495    16.420 0 0 0
  6  0    91.58  63.43495    16.420 0 0 0
  7  0    91.58  63.43495    88.420 0 0 0
  8  0    91.58  63.43495  160.420 0 0 0
  9  0    91.58  63.43495  232.420 0 0 0
10  0    -52.42  63.43495  304.420 0 0 0
11  0  -340.42  63.43495  304.420 0 0 0
12  0    -52.42  63.43495    16.420 0 0 0
13  0    19.58  63.43495    16.420 0 0 0
14  0    -52.42  63.43495    88.420 0 0 0
15  0    19.58  63.43495    88.420 0 0 0
16  0    -52.42  63.43495  160.420 0 0 0
17  0    19.58  63.43495  160.420 0 0 0
18  0    -52.42  63.43495  232.420 0 0 0
19  0    19.58  63.43495  232.420 0 0 0
20  0    55.58 116.56505  268.420 0 0 0
21  0    -88.42 116.56505    52.420 0 0 0
22  0    55.58 116.56505    52.420 0 0 0
23  0    55.58 116.56505  124.420 0 0 0
24  0    55.58 116.56505  196.420 0 0 0
25  0    -16.42 116.56505  340.420 0 0 0
26  0    -16.42 116.56505    52.420 0 0 0
27  0    -16.42 116.56505  124.420 0 0 0
28  0    -16.42 116.56505  196.420 0 0 0
29  0    -16.42 116.56505  268.420 0 0 0
Just include the ones you want to have in the array in the G120C4euler.list file
==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
then
  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

Latest revision as of 22:01, June 17, 2013

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 the included GRETINA modules

modify: GretinaGeometry/Greta/G120C4euler.list. Here is the complete list of GRETINA modules:

 0  0    288.00   0.00000     0.000 0 0 0
 1  0      0.00   0.00000     0.000 0 0 0
 2  0     72.00   0.00000     0.000 0 0 0
 3  0    144.00   0.00000     0.000 0 0 0
 4  0    216.00   0.00000     0.000 0 0 0
 5  0    235.58  63.43495    16.420 0 0 0
 6  0     91.58  63.43495    16.420 0 0 0
 7  0     91.58  63.43495    88.420 0 0 0
 8  0     91.58  63.43495   160.420 0 0 0
 9  0     91.58  63.43495   232.420 0 0 0
10  0    -52.42  63.43495   304.420 0 0 0
11  0   -340.42  63.43495   304.420 0 0 0
12  0    -52.42  63.43495    16.420 0 0 0
13  0     19.58  63.43495    16.420 0 0 0
14  0    -52.42  63.43495    88.420 0 0 0
15  0     19.58  63.43495    88.420 0 0 0
16  0    -52.42  63.43495   160.420 0 0 0
17  0     19.58  63.43495   160.420 0 0 0
18  0    -52.42  63.43495   232.420 0 0 0
19  0     19.58  63.43495   232.420 0 0 0
20  0     55.58 116.56505   268.420 0 0 0
21  0    -88.42 116.56505    52.420 0 0 0
22  0     55.58 116.56505    52.420 0 0 0
23  0     55.58 116.56505   124.420 0 0 0
24  0     55.58 116.56505   196.420 0 0 0
25  0    -16.42 116.56505   340.420 0 0 0
26  0    -16.42 116.56505    52.420 0 0 0
27  0    -16.42 116.56505   124.420 0 0 0
28  0    -16.42 116.56505   196.420 0 0 0
29  0    -16.42 116.56505   268.420 0 0 0

Just include the ones you want to have in the array in the G120C4euler.list file

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 then

 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