| [807] | 1 | $Id: README,v 1.21 2007/11/28 12:37:56 maire Exp $
|
|---|
| 2 | -----------------------------------------------------
|
|---|
| 3 |
|
|---|
| 4 | =========================================================
|
|---|
| 5 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
|---|
| 6 | =========================================================
|
|---|
| 7 |
|
|---|
| 8 | TestEm5
|
|---|
| 9 | -------
|
|---|
| 10 | How to study the transmission, absorption and reflexion of particles through
|
|---|
| 11 | a single, thin or thick, layer of material.
|
|---|
| 12 | In perticular, the effects of the multiple scattering can be ploted.
|
|---|
| 13 |
|
|---|
| 14 | 1- GEOMETRY DEFINITION
|
|---|
| 15 |
|
|---|
| 16 | The "absorber" is a box made of a given material.
|
|---|
| 17 |
|
|---|
| 18 | Three parameters define the absorber :
|
|---|
| 19 | - the material of the absorber,
|
|---|
| 20 | - the thickness of an absorber,
|
|---|
| 21 | - the transverse size of the absorber (the input face is a square).
|
|---|
| 22 |
|
|---|
| 23 | A volume "World" contains the "absorber".
|
|---|
| 24 |
|
|---|
| 25 | In addition a transverse uniform magnetic field can be applied.
|
|---|
| 26 |
|
|---|
| 27 | The default geometry is constructed in DetectorConstruction class, but all the
|
|---|
| 28 | parameters can be changed via commands defined in the DetectorMessenger class.
|
|---|
| 29 | The parameters of the "World" can be changed, too.
|
|---|
| 30 |
|
|---|
| 31 | 2- PHYSICS LIST
|
|---|
| 32 |
|
|---|
| 33 | The following EM physics lists are available in this example:
|
|---|
| 34 | - "standard" standard EM physics (default)
|
|---|
| 35 | - "livermore" low-energy EM physics using Livermore data
|
|---|
| 36 | - "penelope" low-energy EM physics implementing Penelope models
|
|---|
| 37 | - "standardSS" standard EM physics with single Coulomb scattering
|
|---|
| 38 | instead of multiple scattering
|
|---|
| 39 |
|
|---|
| 40 | Alternatively, the user may use predefined Geant4 builders:
|
|---|
| 41 | - "emstandard" G4EmStandardPhysics builder
|
|---|
| 42 | - "emstandard_opt1" G4EmStandardPhysics_option1 builder
|
|---|
| 43 | - "emstandard_opt2" G4EmStandardPhysics_option2 builder
|
|---|
| 44 | See geant4/source/physics_lists/History for details
|
|---|
| 45 |
|
|---|
| 46 | 3- AN EVENT : THE PRIMARY GENERATOR
|
|---|
| 47 |
|
|---|
| 48 | The primary kinematic consists of a single particle which hits the absorber
|
|---|
| 49 | perpendicular to the input face. The type of the particle and its energy are
|
|---|
| 50 | set in the PrimaryGeneratorAction class, and can be changed via the G4 build-in
|
|---|
| 51 | commands of ParticleGun class (see the macros provided with this example).
|
|---|
| 52 |
|
|---|
| 53 | In addition one can choose randomly the impact point of the incident particle.
|
|---|
| 54 | The interactive command is built in PrimaryGeneratorMessenger class.
|
|---|
| 55 |
|
|---|
| 56 | 4- VISUALIZATION
|
|---|
| 57 |
|
|---|
| 58 | The Visualization Manager is set in the main().
|
|---|
| 59 | The initialisation of the drawing is done via the commands in vis.mac
|
|---|
| 60 | In interactive session:
|
|---|
| 61 | PreInit or Idle > /control/execute vis.mac
|
|---|
| 62 |
|
|---|
| 63 | The example has a default view which is a longitudinal view of the detector.
|
|---|
| 64 |
|
|---|
| 65 | The tracks are drawn at the end of event, and erased at the end of run.
|
|---|
| 66 | Optionaly one can choose to draw all particles, only the charged, or none.
|
|---|
| 67 | This command is defined in EventActionMessenger class.
|
|---|
| 68 |
|
|---|
| 69 | 5- TRACKING
|
|---|
| 70 |
|
|---|
| 71 | During the tracking, one can keep or not the secondaries : see StackingAction
|
|---|
| 72 | class and its Messenger.
|
|---|
| 73 | One can also limit 'by hand' the step lenght of the particle. As an example,
|
|---|
| 74 | this limitation is implemented as a 'full' process : see StepMax class and its
|
|---|
| 75 | Messenger. The 'StepMax process' is registered in the Physics List.
|
|---|
| 76 |
|
|---|
| 77 | 6- DETECTOR RESPONSE
|
|---|
| 78 |
|
|---|
| 79 | At the end of a run, from the histogram(s), one can study different
|
|---|
| 80 | physics quantities such as :
|
|---|
| 81 | - energy deposit in the absorber,
|
|---|
| 82 | - energy spectrum of secondaries at creation,
|
|---|
| 83 | - energy spectrum and angle distribution of particles at exit,
|
|---|
| 84 | - transmission and backscattering coefficients,
|
|---|
| 85 | - ...
|
|---|
| 86 |
|
|---|
| 87 | 7- List of the built-in histograms
|
|---|
| 88 | ----------------------------------
|
|---|
| 89 |
|
|---|
| 90 | The test contains more than 20 built-in 1D histograms, which are managed by the
|
|---|
| 91 | HistoManager class and its Messenger. The histos can be individually activated
|
|---|
| 92 | with the command :
|
|---|
| 93 | /testem/histo/setHisto id nbBins valMin valMax unit
|
|---|
| 94 | where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
|
|---|
| 95 | (see the macros xxxx.mac).
|
|---|
| 96 |
|
|---|
| 97 | 1 "energy deposit in absorber"
|
|---|
| 98 | 2 "energy of charged secondaries at creation"
|
|---|
| 99 | 3 "energy of gammas at creation (log10(Ekin/MeV))"
|
|---|
| 100 | 4 "x_vertex of charged secondaries (all)"
|
|---|
| 101 | 5 "x_vertex of charged secondaries (not absorbed)"
|
|---|
| 102 | 10 "(transmit, charged) : kinetic energy at exit"
|
|---|
| 103 | 11 "(transmit, charged) : ener fluence: dE(MeV)/dOmega"
|
|---|
| 104 | 12 "(transmit, charged) : space angle dN/dOmega"
|
|---|
| 105 | 13 "(transmit, charged) : projected angle at exit"
|
|---|
| 106 | 14 "(transmit, charged) : projected position at exit"
|
|---|
| 107 | 15 "(transmit, charged) : radius at exit"
|
|---|
| 108 | 20 "(transmit, neutral) : kinetic energy at exit"
|
|---|
| 109 | 21 "(transmit, neutral) : ener fluence: dE(MeV)/dOmega"
|
|---|
| 110 | 22 "(transmit, neutral) : space angle dN/dOmega"
|
|---|
| 111 | 23 "(transmit, neutral) : projected angle at exit"
|
|---|
| 112 | 30 "(reflect , charged) : kinetic energy at exit"
|
|---|
| 113 | 31 "(reflect , charged) : ener fluence: dE(MeV)/dOmega"
|
|---|
| 114 | 32 "(reflect , charged) : space angle dN/dOmega"
|
|---|
| 115 | 33 "(reflect , charged) : projected angle at exit"
|
|---|
| 116 | 40 "(reflect , neutral) : kinetic energy at exit"
|
|---|
| 117 | 41 "(reflect , neutral) : ener fluence: dE(MeV)/dOmega"
|
|---|
| 118 | 42 "(reflect , neutral) : space angle dN/dOmega"
|
|---|
| 119 | 43 "(reflect , neutral) : projected angle at exit"
|
|---|
| 120 |
|
|---|
| 121 | The histograms can be viewed using PAW. See below the note on ANAPHE+AIDA.
|
|---|
| 122 |
|
|---|
| 123 | One can control the name of the histograms file with the command:
|
|---|
| 124 | /testem/histo/setFileName name (default testem5.hbook)
|
|---|
| 125 |
|
|---|
| 126 | It is also possible to print selected histograms on an ascii file:
|
|---|
| 127 | /testem/histo/printHisto id
|
|---|
| 128 | All selected histos will be written on a file name.ascii (default testem5)
|
|---|
| 129 |
|
|---|
| 130 | Note that, by default, histograms are disabled. To activate them, uncomment
|
|---|
| 131 | the flag G4ANALYSIS_USE in GNUmakefile.
|
|---|
| 132 |
|
|---|
| 133 | 8- GEANT4/GEANT3/DATA COMPARISON
|
|---|
| 134 |
|
|---|
| 135 | A Geant4/Geant3/exp. data comparison is given here for a few cases.
|
|---|
| 136 | These cases can be classified as follow:
|
|---|
| 137 | - e-/e+ incident particles versus protons and others.
|
|---|
| 138 | - 3 energy regimes: low: < 1MeV; medium: 1MeV -> few 10MeV; high: > 100MeV
|
|---|
| 139 |
|
|---|
| 140 | We indicate here the corresponding macros.
|
|---|
| 141 |
|
|---|
| 142 | | low energy | medium energy | high energy
|
|---|
| 143 | --------------------------------------------------------
|
|---|
| 144 | | acosta.mac | |
|
|---|
| 145 | e-+ | berger.mac | hanson.mac |
|
|---|
| 146 | | hunger.mac | kulchi.mac |
|
|---|
| 147 | | tavola.mac | |
|
|---|
| 148 | --------------------------------------------------------
|
|---|
| 149 | others| bichsel.mac | vincour.mac | shen1.mac shen2.mac
|
|---|
| 150 | | | gottsch.mac | tramu.mac
|
|---|
| 151 | --------------------------------------------------------
|
|---|
| 152 |
|
|---|
| 153 | The relevant part of the GEANT3 code is in the subdirectory geant3 together
|
|---|
| 154 | with the xxxx.dat input files.
|
|---|
| 155 |
|
|---|
| 156 | 9- HOW TO START ?
|
|---|
| 157 |
|
|---|
| 158 | - compile and link to generate an executable
|
|---|
| 159 | % cd TestEm5
|
|---|
| 160 | % gmake
|
|---|
| 161 |
|
|---|
| 162 | - execute TestEm5 in 'batch' mode from macro files e.g.
|
|---|
| 163 | % $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5 myMacro.mac
|
|---|
| 164 |
|
|---|
| 165 | - execute TestEm5 in 'interactive' mode with visualization e.g.
|
|---|
| 166 | % $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5
|
|---|
| 167 | Then type your commands, for instance :
|
|---|
| 168 | Idle> control/execute vis.mac
|
|---|
| 169 | Idle> run/beamOn 5
|
|---|
| 170 | ....
|
|---|
| 171 |
|
|---|
| 172 | 10- USING HISTOGRAMS
|
|---|
| 173 |
|
|---|
| 174 | Note that, by default, histograms are disabled. To activate them, uncomment
|
|---|
| 175 | the flag G4ANALYSIS_USE in GNUmakefile.
|
|---|
| 176 |
|
|---|
| 177 | Before compilation of the example it is optimal to clean up old files:
|
|---|
| 178 | gmake histclean
|
|---|
| 179 | gmake
|
|---|
| 180 | To use histograms, at least one of the AIDA implementations should be
|
|---|
| 181 | available (see http://aida.freehep.org).
|
|---|
| 182 |
|
|---|
| 183 | 8a - PI
|
|---|
| 184 |
|
|---|
| 185 | A package including AIDA and extended interfaces also using Python is PI,
|
|---|
| 186 | available from: http://cern.ch/pi
|
|---|
| 187 |
|
|---|
| 188 | Once installed PI or PI-Lite in a specified local area $MYPY, it is required
|
|---|
| 189 | to add the installation path to $PATH, i.e. for example, for release 1.2.1 of
|
|---|
| 190 | PI:
|
|---|
| 191 | setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin
|
|---|
| 192 |
|
|---|
| 193 | CERN users can use the PATH to the LCG area on AFS.
|
|---|
| 194 | Before running the example the command should be issued:
|
|---|
| 195 | eval `aida-config --runtime csh`
|
|---|
| 196 |
|
|---|
| 197 | 8b - OpenScientist
|
|---|
| 198 |
|
|---|
| 199 | OpenScientist is available at http://OpenScientist.lal.in2p3.fr.
|
|---|
| 200 |
|
|---|
| 201 | You have to "setup" the OpenScientist AIDA implementation before compiling
|
|---|
| 202 | (then with G4ANALYSIS_USE set) and running your Geant4 application.
|
|---|
| 203 |
|
|---|
| 204 | On UNIX you setup, with a csh flavoured shell :
|
|---|
| 205 | csh> source <<OpenScientist install path>/aida-setup.csh
|
|---|
| 206 | or with a sh flavoured shell :
|
|---|
| 207 | sh> . <<OpenScientist install path>/aida-setup.sh
|
|---|
| 208 | On Windows :
|
|---|
| 209 | DOS> call <<OpenScientist install path>/aida-setup.bat
|
|---|
| 210 |
|
|---|
| 211 | You can use various file formats for writing (AIDA-XML, hbook, root).
|
|---|
| 212 | These formats are readable by the Lab onx interactive program
|
|---|
| 213 | or the OpenPAW application. See the web pages.
|
|---|
| 214 |
|
|---|
| 215 |
|
|---|
| 216 | With OpenPAW, on a run.hbook file, one can view the histograms
|
|---|
| 217 | with something like :
|
|---|
| 218 | OS> opaw
|
|---|
| 219 | opaw> h/file 1 run.hbook ( or opaw> h/file 1 run.aida or run.root)
|
|---|
| 220 | opaw> zone 2 2
|
|---|
| 221 | opaw> h/plot 1
|
|---|
| 222 | opaw> h/plot 2
|
|---|