[807] | 1 | $Id: README,v 1.9 2005/06/01 18:10:15 duns Exp $ |
---|
| 2 | |
---|
| 3 | ========================================================= |
---|
| 4 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP |
---|
| 5 | ========================================================= |
---|
| 6 | |
---|
| 7 | Extended Example A01 |
---|
| 8 | -------------------- |
---|
| 9 | |
---|
| 10 | Example A01 implements a double-arm spectrometer with wire chambers, |
---|
| 11 | hodoscopes and calorimeters. Event simulation and collection are |
---|
| 12 | enabled, as well as event display and analysis. This example is |
---|
| 13 | extensively documented on the Geant4 Workshop Tutorial CD available at: |
---|
| 14 | http://geant4.slac.stanford.edu/g4cd/Welcome.html |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | 1. GEOMETRY |
---|
| 18 | |
---|
| 19 | The spectrometer consists of two detector arms. One arm provides |
---|
| 20 | position and timing information of the incident particle while the |
---|
| 21 | other collects position, timing and energy information of the particle |
---|
| 22 | after it has been deflected by a magnetic field centered at the |
---|
| 23 | spectrometer pivot point. |
---|
| 24 | |
---|
| 25 | - First arm: box filled with air, also containing: |
---|
| 26 | |
---|
| 27 | 1 hodoscope (15 vertical strips of plastic scintillator) |
---|
| 28 | 1 drift chamber (5 horizontal argon gas layers with a |
---|
| 29 | "virtual wire" at the center of each layer) |
---|
| 30 | |
---|
| 31 | - Magnetic field region: air-filled cylinder which contains |
---|
| 32 | the field |
---|
| 33 | |
---|
| 34 | - Second arm: box filled with air, also containing: |
---|
| 35 | |
---|
| 36 | 1 hodoscope (25 vertical strips of plastic scintillator) |
---|
| 37 | 1 drift chamber (5 horizontal argon gas layers with a |
---|
| 38 | "virtual wire" at the center of each layer) |
---|
| 39 | 1 electromagnetic calorimeter: |
---|
| 40 | a box sub-divided along x,y and z |
---|
| 41 | axes into cells of CsI |
---|
| 42 | 1 hadronic calorimeter: |
---|
| 43 | a box sub-divided along x,y, and z axes |
---|
| 44 | into cells of lead, with a layer of |
---|
| 45 | plastic scintillator placed at the center |
---|
| 46 | of each cell |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | 2. PHYSICS |
---|
| 50 | |
---|
| 51 | This example uses the following physics processes: |
---|
| 52 | |
---|
| 53 | - electromagnetic: |
---|
| 54 | photo-electric effect |
---|
| 55 | Compton scattering |
---|
| 56 | pair production |
---|
| 57 | bremsstrahlung |
---|
| 58 | ionization |
---|
| 59 | multiple scattering |
---|
| 60 | annihilation |
---|
| 61 | |
---|
| 62 | - decay |
---|
| 63 | |
---|
| 64 | - transportation in a field |
---|
| 65 | |
---|
| 66 | and defines the following particles: |
---|
| 67 | geantino, charged geantino, gamma, all leptons, |
---|
| 68 | pions, charged kaons |
---|
| 69 | |
---|
| 70 | Note that even though hadrons are defined, no hadronic processes |
---|
| 71 | are invoked in this example. |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | 3. EVENT: |
---|
| 77 | |
---|
| 78 | An event consists of the generation of a single particle which is |
---|
| 79 | transported through the first spectrometer arm. Here, a scintillator |
---|
| 80 | hodoscope records the reference time of the particle before it passes |
---|
| 81 | through a drift chamber where the particle position is measured. |
---|
| 82 | Momentum analysis is performed as the particle passes through a magnetic |
---|
| 83 | field at the spectrometer pivot and then into the second spectrometer |
---|
| 84 | arm. In the second arm, the particle passes through another hodoscope |
---|
| 85 | and drift chamber before interacting in the electromagnetic calorimeter. |
---|
| 86 | Here it is likely that particles will induce electromagnetic showers. |
---|
| 87 | The shower energy is recorded in a three-dimensional array of CsI |
---|
| 88 | crystals. Secondary particles from the shower, as well as primary |
---|
| 89 | particles which do not interact in the CsI crystals, pass into the |
---|
| 90 | hadronic calorimeter. Here, the remaining energy is collected in a |
---|
| 91 | three-dimensional array of scintillator-lead sandwiches. |
---|
| 92 | |
---|
| 93 | Several aspects of the event may be changed interactively by the user: |
---|
| 94 | |
---|
| 95 | - initial particle type |
---|
| 96 | - initial momentum and angle |
---|
| 97 | - momentum and angle spreads |
---|
| 98 | - type of initial particle may be randomized |
---|
| 99 | - strength of magnetic field |
---|
| 100 | - angle of the second spectrometer arm |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | 4. DETECTOR RESPONSE: |
---|
| 104 | |
---|
| 105 | All the information required to simulate and analyze an event is |
---|
| 106 | recorded in HITS. This information is recorded in the following |
---|
| 107 | sensitive detectors: |
---|
| 108 | |
---|
| 109 | - hodoscope: |
---|
| 110 | particle time |
---|
| 111 | particle position |
---|
| 112 | strip ID |
---|
| 113 | |
---|
| 114 | - drift chamber: |
---|
| 115 | particle time |
---|
| 116 | particle position |
---|
| 117 | layer ID |
---|
| 118 | |
---|
| 119 | - electromagnetic calorimeter: |
---|
| 120 | particle position |
---|
| 121 | energy deposited in cell |
---|
| 122 | cell ID |
---|
| 123 | |
---|
| 124 | - hadronic calorimeter: |
---|
| 125 | particle position |
---|
| 126 | energy deposited in cell |
---|
| 127 | cell ID |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | 5. VISUALIZATION: |
---|
| 131 | |
---|
| 132 | Simulated events can be displayed on top of a representation of |
---|
| 133 | the spectrometer. |
---|
| 134 | |
---|
| 135 | vis.mac outputs HepRep version 1 files suitable for viewing in WIRED. |
---|
| 136 | Change the /vis/open line from HepRepFile to DAWNFILE to instead |
---|
| 137 | make .prim files suitable for viewing in DAWN. |
---|
| 138 | |
---|
| 139 | heprep2-000-gz.mac outputs a series of gzipped HepRep version 2 files |
---|
| 140 | each containing a single event, suitable for viewing in WIRED (there |
---|
| 141 | is no need to ungzip them since WIRED can do this itself). |
---|
| 142 | |
---|
| 143 | heprep2zip.mac outputs a single zip file that unzips to a series of |
---|
| 144 | HepRep version 2 files, each each containing a single event (unzip |
---|
| 145 | the single file by hand, then view the resulting individial HepRep |
---|
| 146 | files in WIRED 3). |
---|
| 147 | |
---|
| 148 | heprep2-000-zip.mac outputs a series of zipped HepRep version 2 files |
---|
| 149 | each containing a single event (not yet viewable in WIRED unless you |
---|
| 150 | explicitly unzip them before viewing). |
---|
| 151 | |
---|
| 152 | heprep2.mac outputs a HepRep version 2 file with multiple events |
---|
| 153 | appended to a single file in an experimental manner (not yet viewable |
---|
| 154 | in WIRED). |
---|
| 155 | |
---|
| 156 | heprep2gz.mac outputs a HepRep version 2 file with multiple events |
---|
| 157 | appended to a single file in an experimental manner (not yet viewable |
---|
| 158 | in WIRED). |
---|
| 159 | |
---|
| 160 | Any of the heprep mac files above with the name bheprep (for instance |
---|
| 161 | bheprep2zip.mac) will write a Binary HepRep version 2 file, readable |
---|
| 162 | by WIRED 4. |
---|
| 163 | |
---|
| 164 | WIRED 4 can read Binary HepRep and XML HepRep version 2 files without |
---|
| 165 | the need for manual unzipping. |
---|
| 166 | |
---|
| 167 | For more information on visualization with this A01 example, |
---|
| 168 | see the visualization tutorials on the Geant4 Workshop Tutorial CD |
---|
| 169 | available at: |
---|
| 170 | http://geant4.slac.stanford.edu/g4cd/Welcome.html |
---|
| 171 | |
---|
| 172 | 6. ANALYSIS: |
---|
| 173 | |
---|
| 174 | This example implements an AIDA-compliant analysis system which |
---|
| 175 | creates histograms, ntuples and plotters. At the completion of a |
---|
| 176 | simulation run a file A01.aida is produced which contains these |
---|
| 177 | data structures. This file can be used as an input to the Java |
---|
| 178 | Analysis Studio (JAS) which allows the histograms and ntuples to |
---|
| 179 | examined, manipulated, saved and printed. For further details, |
---|
| 180 | see README.JAIDA. |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | 7. GETTING STARTED: |
---|
| 184 | |
---|
| 185 | Build the A01 executable: |
---|
| 186 | |
---|
| 187 | cd to A01 |
---|
| 188 | gmake clean |
---|
| 189 | gmake |
---|
| 190 | |
---|
| 191 | gmake will create tmp and bin directories in your work directory. |
---|
| 192 | The executable, named A01app, will be in /bin/$G4SYSTEM/ |
---|
| 193 | |
---|
| 194 | While in directory A01, run the executable: |
---|
| 195 | |
---|
| 196 | ../bin/$G4SYSTEM/A01app |
---|
| 197 | |
---|
| 198 | which will bring up the interactive prompt: |
---|
| 199 | |
---|
| 200 | Idle> |
---|
| 201 | |
---|
| 202 | To run 10 events you can now enter: |
---|
| 203 | |
---|
| 204 | /run/beamOn 10 |
---|
| 205 | |
---|
| 206 | If all goes well, a JAS window will appear containing two histograms |
---|
| 207 | and three scatterplots. |
---|
| 208 | |
---|
| 209 | To terminate the job, at the prompt enter: |
---|
| 210 | |
---|
| 211 | exit |
---|
| 212 | |
---|
| 213 | Currently you must also close the JAS-AIDA window to get the job to stop. |
---|
| 214 | |
---|
| 215 | |
---|
| 216 | In the A01 directory will be a file A01.aida which contains the plots. |
---|
| 217 | To examine them |
---|
| 218 | |
---|
| 219 | /usr/local.bin/jas3 & or jas3 & |
---|