| 1 | =========================================================
|
|---|
| 2 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
|---|
| 3 | =========================================================
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | HADR01
|
|---|
| 7 |
|
|---|
| 8 | A.Bagulya, I.Gudowska, V.Ivanchenko, N.Starkov
|
|---|
| 9 | CERN, Geneva, Switzerland
|
|---|
| 10 | Karolinska Institute & Hospital, Stockholm, Sweden
|
|---|
| 11 | Lebedev Physical Institute, Moscow, Russia
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | This example application is based on the application IION developed for
|
|---|
| 15 | simulation of proton or ion beam interaction with a water target. Different
|
|---|
| 16 | aspects of beam target interaction are demonstrating in the example including
|
|---|
| 17 | longitudinal profile of energy deposition, spectra of secondary particles,
|
|---|
| 18 | spectra of particles leaving the target. The results are presenting in a form
|
|---|
| 19 | of average numbers and histograms.
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 | GEOMETRY
|
|---|
| 23 |
|
|---|
| 24 | The Target volume is a cylinder placed inside Check cylindrical volume. The
|
|---|
| 25 | Check volume is placed inside the World volume. The radius and the length of
|
|---|
| 26 | the Check volume are 1 mm larger than the radius and the length of the Target.
|
|---|
| 27 | The material of the Check volume is the same as the World material. The World
|
|---|
| 28 | volume has the sizes 10 mm larger than that of the Target volume. Any material
|
|---|
| 29 | from the Geant4 database can be defined. The default World material is
|
|---|
| 30 | G4Galactic and the default Target material is aluminum. The Target is
|
|---|
| 31 | subdivided on number of equal slices. Following UI commands are available to
|
|---|
| 32 | modify the geometry:
|
|---|
| 33 |
|
|---|
| 34 | /testhadr/TargetMat G4_Pb
|
|---|
| 35 | /testhadr/WorldMat G4_AIR
|
|---|
| 36 | /testhadr/TargetRadius 10 mm
|
|---|
| 37 | /testhadr/TargetLength 20 cm
|
|---|
| 38 | /testhadr/NumberDivZ 200
|
|---|
| 39 |
|
|---|
| 40 | If geometry was changed between two runs, then the following command need to
|
|---|
| 41 | be executed:
|
|---|
| 42 |
|
|---|
| 43 | /testhadr/Update
|
|---|
| 44 |
|
|---|
| 45 | Beam direction coincides with the target axis and is Z axis in the global
|
|---|
| 46 | coordinate system. The beam starts 5 mm in front of the target. G4ParticleGun
|
|---|
| 47 | is used as a primary generator. The energy and the type of the beam can be
|
|---|
| 48 | defined via standard UI commands
|
|---|
| 49 |
|
|---|
| 50 | /gun/energy 15 GeV
|
|---|
| 51 | /gun/particle proton
|
|---|
| 52 |
|
|---|
| 53 | Default beam position is -(targetHalfLength + 5*mm) and direction along Z axis.
|
|---|
| 54 | Beam position and direction can be changed by gun UI commands:
|
|---|
| 55 |
|
|---|
| 56 | /gun/position 1 10 3 mm
|
|---|
| 57 | /gun/direction 1 0 0
|
|---|
| 58 |
|
|---|
| 59 | however, position command is active only if before it the flag is set
|
|---|
| 60 |
|
|---|
| 61 | /testhadr/DefaultBeamPosition false
|
|---|
| 62 |
|
|---|
| 63 | SCORING
|
|---|
| 64 |
|
|---|
| 65 | The scoring is performed with the help of UserStackingAction class and two
|
|---|
| 66 | sensitive detector classes: one associated with a target slice, another with
|
|---|
| 67 | the Check volume. Each secondary particle is scored by the StackingAction. In
|
|---|
| 68 | the StackingAction it is also possible to kill all or one type of secondary
|
|---|
| 69 | particles
|
|---|
| 70 |
|
|---|
| 71 | /testhadr/Kill neutron
|
|---|
| 72 | /testhadr/KillAllSecondaries
|
|---|
| 73 |
|
|---|
| 74 | To control running the following options are available:
|
|---|
| 75 |
|
|---|
| 76 | /testhadr/PrintModulo 100
|
|---|
| 77 | /testhadr/DebugEvent 977
|
|---|
| 78 |
|
|---|
| 79 | The last command selects an events, for which "/tracking/verbose 2" level
|
|---|
| 80 | of printout is established.
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 | PHYSICS
|
|---|
| 84 |
|
|---|
| 85 | PhysicsList of the application uses components, which are distributed with
|
|---|
| 86 | Geant4 in /geant4/physics_lists subdirectory.
|
|---|
| 87 |
|
|---|
| 88 | There is a possibility directly use one of reference Physics Lists if
|
|---|
| 89 | using the environment variable PHYSLIST. Alternatively the name of the reference
|
|---|
| 90 | Physics List can be given via parameter of the the application as following:
|
|---|
| 91 |
|
|---|
| 92 | $G4BIN/Linux++/hadr01 QGSP_BERT my.macro
|
|---|
| 93 |
|
|---|
| 94 | Finally it is possible to use UI commands (PHYSLIST environment variable is not
|
|---|
| 95 | defined). The choice of the physics is provided by the UI command:
|
|---|
| 96 |
|
|---|
| 97 | /testhadr/Physics QGSP_BIC
|
|---|
| 98 |
|
|---|
| 99 | To see the list of available configurations with UI one can use
|
|---|
| 100 |
|
|---|
| 101 | /testhadr/ListPhysics
|
|---|
| 102 |
|
|---|
| 103 | The cuts for electromagnetic physics can be established via
|
|---|
| 104 |
|
|---|
| 105 | /testhadr/CutsAll 1 mm
|
|---|
| 106 | /testhadr/CutsGamma 0.1 mm
|
|---|
| 107 | /testhadr/CutsEl 0.2 mm
|
|---|
| 108 | /testhadr/CutsPos 0.3 mm
|
|---|
| 109 |
|
|---|
| 110 | Note that testhadr UI commands are not available in the case when PHYSLIST
|
|---|
| 111 | environment variable is defined.
|
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 | VISUALIZATION
|
|---|
| 115 |
|
|---|
| 116 | For interactive mode G4 visualization options and variables should be
|
|---|
| 117 | defined, then the example should be recompiled:
|
|---|
| 118 |
|
|---|
| 119 | gmake visclean
|
|---|
| 120 | gmake
|
|---|
| 121 |
|
|---|
| 122 | The vis.mac file can be used an example of visualization. The following command can
|
|---|
| 123 | be used:
|
|---|
| 124 |
|
|---|
| 125 | /testhadr/DrawTracks charged
|
|---|
| 126 | /testhadr/DrawTracks charged+n
|
|---|
| 127 | /testhadr/DrawTracks neutral
|
|---|
| 128 | /testhadr/DrawTracks all
|
|---|
| 129 |
|
|---|
| 130 |
|
|---|
| 131 | HISTOGRAMS
|
|---|
| 132 |
|
|---|
| 133 | To use histograms any of implementations of AIDA interfaces should
|
|---|
| 134 | be available (see http://aida.freehep.org).
|
|---|
| 135 |
|
|---|
| 136 | A package including AIDA and extended interfaces also using Python
|
|---|
| 137 | is PI, available from: http://cern.ch/pi .
|
|---|
| 138 |
|
|---|
| 139 | Once installed PI or PI-Lite in a specified local area $PI_DIR, it is
|
|---|
| 140 | required to add the installation path to $PATH, i.e. for example,
|
|---|
| 141 | for release 1.2.1 of PI:
|
|---|
| 142 |
|
|---|
| 143 | setenv PATH ${PATH}:$PI_DIR/1.3.12/app/releases/PI/PI_1_3_12/slc3_gcc323/bin
|
|---|
| 144 |
|
|---|
| 145 | CERN users can use the PATH to the LCG area on AFS.
|
|---|
| 146 |
|
|---|
| 147 | Before compilation of the example it is optimal to clean up old
|
|---|
| 148 | files:
|
|---|
| 149 |
|
|---|
| 150 | gmake histclean
|
|---|
| 151 | setenv G4ANALYSIS_USE 1
|
|---|
| 152 | gmake
|
|---|
| 153 |
|
|---|
| 154 | Before running the example the command should be issued:
|
|---|
| 155 |
|
|---|
| 156 | eval `aida-config --runtime csh`
|
|---|
| 157 |
|
|---|
| 158 | It is possible to choose the format of the output file with
|
|---|
| 159 | histograms using UI command:
|
|---|
| 160 |
|
|---|
| 161 | /testhadr/HistoName name
|
|---|
| 162 | /testhadr/HistoType type
|
|---|
| 163 | /testhadr/HistoOption "uncompress"
|
|---|
| 164 |
|
|---|
| 165 | The following types are available: hbook, root, aida. They will be
|
|---|
| 166 | stored in the file "name.hbook", "name.root", or "name.aida".
|
|---|
| 167 | If the environment variable HISTODIR is defined, files are stored in this
|
|---|
| 168 | subdirectory.
|
|---|
| 169 |
|
|---|
| 170 | To show the content of a histogram ID=i the commands may be applied:
|
|---|
| 171 |
|
|---|
| 172 | /testhadr/HistoPrint i
|
|---|
| 173 |
|
|---|
| 174 | All histograms are normalized to the number of events.
|
|---|