00001 00002 # 00003 # Program : uab_actions_root.cc 00004 # Task : UAB base test example + *Action classes 00005 # Location : $G4MYSIMU (See https://sbgtrac.in2p3.fr/projects/ramses/wiki/G4_MyTuto for the list of environment variables used) 00006 # Compilation : 'cd $G4MYSIMU && make -j $NPROC' or 'rm -rf $G4TMPDIR/$G4MYSIMU_DIR $G4BINDIR/$G4MYSIMU_EXE && cd $G4MYSIMU && make -j $NPROC' # export NPROC=$(cat /proc/cpuinfo | grep "processor.*:" | wc -l) 00007 # Execution : 'cd $G4BINDIR ; [ ! -a $G4MYSIMU_MAC ] && ln -s $G4MYSIMU/$G4MYSIMU_MAC ; ./$G4MYSIMU_EXE $G4MYSIMU_MAC' 00008 # Output : $G4BINDIR/uab_actions_root.heprep.zip 00009 # Documentation : See $G4MYSIMU/doc.html 00010 # Convention : Root coding convention: TMyClass for classes, fMyVariable for class data members, kMyVariable for constants, gMyVariable for global variables 00011 # Help : http://www.lcsim.org/software/geant4/doxygen/html/classes.html 00012 # Author : Mathieu Trocme (mathieu.trocme@ires.in2p3.fr) 00013 # Date : 31 Octobre 2007 00014 # Framework : PhD thesis, CNRS/IPHC/DRS/RAMSES, Strasbourg, France 00015 # 00016 00017 00018 #################################################### 00019 # VISUALISATION 00020 #################################################### 00021 00022 ## Comment these lines to inhibit visualization 00023 00024 #/vis/open HepRepXML 00025 #/vis/scene/create uab_actions_root.heprep.zip 00026 #/vis/scene/add/volume 00027 #/vis/scene/add/trajectories 00028 #/vis/scene/add/hits 00029 #/vis/sceneHandler/attach 00030 #/vis/viewer/flush 00031 #/tracking/storeTrajectory 1 00032 #/vis/scene/endOfEventAction accumulate 00033 00034 00035 #################################################### 00036 # PHYSICS 00037 #################################################### 00038 00039 #/process/inactivate phot 00040 #/process/inactivate compt 00041 #/process/inactivate conv 00042 00043 #/process/inactivate msc e- 00044 #/process/inactivate eIoni e- 00045 #/process/inactivate eBrem e- 00046 00047 #/process/inactivate msc e+ 00048 #/process/inactivate eIoni e+ 00049 #/process/inactivate eBrem e+ 00050 #/process/inactivate annihil e+ 00051 00052 #/process/inactivate msc proton 00053 #/process/inactivate hIoni proton 00054 00055 #/process/inactivate msc alpha 00056 #/process/inactivate ionIoni alpha 00057 00058 #/process/inactivate msc GenericIon 00059 #/process/inactivate ionIoni GenericIon 00060 00061 00062 #################################################### 00063 # SOURCE 00064 #################################################### 00065 00066 ## See http://reat.space.qinetiq.com/gps/new_gps_sum_files/gps_sum.htm 00067 00068 /gps/particle alpha 00069 /gps/energy 5.5 MeV 00070 00071 #/gps/pos/type Point 00072 00073 /gps/pos/type Plane 00074 /gps/pos/shape Circle 00075 /gps/pos/radius 1. mm 00076 /gps/pos/centre 0. 0. -4. mm 00077 00078 #/gps/direction 1. 0. 0. 00079 00080 /gps/ang/type iso 00081 /gps/ang/mintheta 0. deg 00082 /gps/ang/maxtheta 45. deg 00083 /gps/ang/rot1 -1. 0. 0. 00084 00085 00086 #################################################### 00087 # RUN 00088 #################################################### 00089 00090 /run/beamOn 100 00091 00092 00093 #################################################### 00094 # ANALYSIS 00095 #################################################### 00096 00097 # Open Root and in the Root prompt, type 00098 # [ROOT]> TFile *fin = new TFile("test.root") ; tree->Draw("Ekin_MeV","Ekin_MeV>0.") ;