[1337] | 1 | $Id: README,v 1.28 2010/06/06 04:25:24 perl Exp $ |
---|
[807] | 2 | ------------------------------------------------------------------- |
---|
| 3 | |
---|
| 4 | ========================================================= |
---|
| 5 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP |
---|
| 6 | ========================================================= |
---|
| 7 | |
---|
| 8 | TestEm1 |
---|
| 9 | ------- |
---|
| 10 | How to count processes. |
---|
| 11 | How to activate/inactivate processes. |
---|
| 12 | How to survey the tracking, in perticular the range of charged particles. |
---|
| 13 | How to define a maximum step size. |
---|
| 14 | |
---|
| 15 | 1 - GEOMETRY DEFINITION |
---|
| 16 | |
---|
| 17 | It is a simple box which represente an 'semi infinite' homogeneous medium. |
---|
| 18 | |
---|
| 19 | Two parameters define the geometry : |
---|
| 20 | - the material of the box, |
---|
| 21 | - the full size of the box. |
---|
| 22 | |
---|
| 23 | In addition a transverse uniform magnetic field can be applied. |
---|
| 24 | |
---|
| 25 | The default geometry is constructed in DetectorConstruction class, but all of |
---|
| 26 | the above parameters can be changed interactively via the commands defined in |
---|
| 27 | the DetectorMessenger class. |
---|
| 28 | |
---|
| 29 | 2 - PHYSICS LIST |
---|
| 30 | |
---|
[1337] | 31 | Physics lists can be local (eg. in this example) or from G4 kernel |
---|
| 32 | physics_lists subdirectory. |
---|
| 33 | |
---|
| 34 | Local physics list: |
---|
| 35 | - "local" standard EM physics with current 'best' options setting. |
---|
| 36 | these options are explicited in PhysListEmStandard |
---|
| 37 | |
---|
| 38 | From geant4/source/physics_lists/builders: |
---|
| 39 | - "emstandard_opt0" recommended standard EM physics for LHC |
---|
| 40 | - "emstandard_opt1" best CPU performance standard physics for LHC |
---|
| 41 | - "emstandard_opt2" |
---|
| 42 | - "emstandard_opt3" best current advanced EM options. |
---|
| 43 | analog to "local" above |
---|
| 44 | |
---|
| 45 | Physics lists and options can be (re)set with UI commands |
---|
| 46 | |
---|
| 47 | Please, notice that options set through G4EmProcessOPtions are global, eg |
---|
| 48 | for all particle types. In G4 builders (geant4/source/physics_lists/builders) |
---|
| 49 | it is shown how to set options per particle type. |
---|
[807] | 50 | |
---|
| 51 | Few commands have been added to PhysicsList, in order to set the production |
---|
| 52 | threshold for secondaries for gamma and e-/e+. |
---|
| 53 | |
---|
| 54 | 3 - AN EVENT : THE PRIMARY GENERATOR |
---|
| 55 | |
---|
| 56 | The primary kinematic consists of a single particle starting at the left face |
---|
| 57 | of the box. The type of the particle and its energy are set in the |
---|
| 58 | PrimaryGeneratorAction class, and can be changed via the G4 build-in commands |
---|
| 59 | of ParticleGun class (see the macros provided with this example). |
---|
| 60 | |
---|
| 61 | In addition one can choose randomly the impact point of the incident particle. |
---|
| 62 | The corresponding interactive command is built in PrimaryGeneratorMessenger. |
---|
| 63 | |
---|
| 64 | 4 - VISUALIZATION |
---|
| 65 | |
---|
| 66 | The Visualization Manager is set in the main(). |
---|
| 67 | The initialisation of the drawing is done via the commands /vis/... in the |
---|
| 68 | macro vis.mac. To get visualisation: |
---|
| 69 | > /control/execute vis.mac |
---|
| 70 | |
---|
| 71 | The detector has a default view which is a longitudinal view of the box. |
---|
| 72 | |
---|
| 73 | The tracks are drawn at the end of event, and erased at the end of run. |
---|
| 74 | |
---|
| 75 | 5 - PHYSICS SURVEY |
---|
| 76 | |
---|
| 77 | The particle's type and the physic processes which will be available in this |
---|
| 78 | example are set in PhysicsList class. |
---|
| 79 | |
---|
| 80 | A set of macros defining various run conditions are provided. The processes |
---|
| 81 | are actived/inactived together with differents cuts, in order to survey the |
---|
| 82 | processes one by one. |
---|
| 83 | |
---|
| 84 | The number of produced secondaries are counted, the number of steps, and the |
---|
| 85 | number of process calls responsible of the step. |
---|
| 86 | |
---|
| 87 | 6 - HOW TO START ? |
---|
| 88 | |
---|
| 89 | - compile and link to generate an executable |
---|
| 90 | % cd geant4/examples/extended/electromagnetic/TestEm1 |
---|
| 91 | % gmake |
---|
| 92 | |
---|
| 93 | - execute TestEm1 in 'batch' mode from macro files |
---|
| 94 | % TestEm1 run10.mac |
---|
| 95 | |
---|
| 96 | - execute TestEm1 in 'interactive mode' with visualization |
---|
| 97 | % TestEm1 |
---|
| 98 | .... |
---|
| 99 | Idle> type your commands |
---|
| 100 | .... |
---|
| 101 | Idle> exit |
---|
| 102 | |
---|
| 103 | 7 - TRACKING : StepMax |
---|
| 104 | |
---|
| 105 | In order to control the accuracy of the deposition, the user can limit |
---|
| 106 | 'by hand' the maximum step size of charged particles. |
---|
| 107 | As an example, this limitation is implemented as a 'full' process : |
---|
| 108 | see StepMax class and its Messenger. The 'StepMax process' is registered |
---|
| 109 | in the Physics List. |
---|
| 110 | |
---|
| 111 | 8 - HISTOGRAMS |
---|
| 112 | |
---|
[1337] | 113 | Testem1 produces several histo which are saved as testem1.root by default. |
---|
[807] | 114 | Content of these histo: |
---|
| 115 | 1 : track length of primary particle |
---|
| 116 | 2 : number of steps primary particle |
---|
| 117 | 3 : step size of primary particle |
---|
| 118 | |
---|
| 119 | The histograms are managed by the HistoManager class and its Messenger. |
---|
| 120 | The histos can be individually activated with the command : |
---|
| 121 | /testem/histo/setHisto id nbBins valMin valMax unit |
---|
| 122 | where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..) |
---|
| 123 | |
---|
| 124 | One can control the name of the histograms file with the command: |
---|
| 125 | /testem/histo/setFileName name (default testem1) |
---|
| 126 | |
---|
| 127 | It is possible to choose the format of the histogram file (hbook, root, XML) |
---|
[1337] | 128 | with the command /testem/histo/setFileType (root by default) |
---|
[807] | 129 | |
---|
| 130 | It is also possible to print selected histograms on an ascii file: |
---|
| 131 | /testem/histo/printHisto id |
---|
| 132 | All selected histos will be written on a file name.ascii (default testem1) |
---|
| 133 | |
---|
| 134 | Note that, by default, histograms are disabled. To activate them, uncomment |
---|
| 135 | the flag G4ANALYSIS_USE in GNUmakefile. |
---|
| 136 | |
---|
| 137 | Before compilation of the example it is optimal to clean up old files: |
---|
| 138 | gmake histclean |
---|
| 139 | gmake |
---|
| 140 | |
---|
| 141 | 9 - USING HISTOGRAMS |
---|
| 142 | |
---|
| 143 | To use histograms, at least one of the AIDA implementations should be |
---|
[1337] | 144 | available. See the file InstallAida.txt |
---|
[807] | 145 | |
---|