Geant4 Cross Reference |
>> 1 $Id: README,v 1.21 2005-06-03 13:22:25 flongo Exp $ 1 ---------------------------------------------- 2 ------------------------------------------------------------------- 2 3 3 ========================================= 4 ========================================================= 4 Geant4 - an Object-Oriented Toolkit for S 5 Geant4 - an Object-Oriented Toolkit for Simulation in HEP 5 ========================================= 6 ========================================================= 6 7 7 gammaray_telescope 8 gammaray_telescope 8 ------------------ 9 ------------------ 9 F. Longo, R. Giannitrapan << 10 F.Longo, R.Giannitrapani & G.Santin 10 June 2003 11 June 2003 11 12 12 ---------------------------------------------- << 13 -------------------------------------------------------------- 13 Acknowledgments to GEANT4 people, in particula << 14 Acknowledgments to GEANT4 people, in particular to R.Nartallo, 14 A. Pfeiffer, M. G. Pia and G. Cosmo << 15 A.Pfeiffer, M.G.Pia and G.Cosmo 15 ---------------------------------------------- << 16 -------------------------------------------------------------- 16 17 17 GammaRayTel is an example of application of Ge 18 GammaRayTel is an example of application of Geant4 in a space 18 environment. It simulates a typical telescope << 19 envinronment. It simulates a typical telescope for gamma ray analysis; 19 the detector setup is composed by a tracker ma 20 the detector setup is composed by a tracker made with silicon planes, 20 subdivided in ladders and strips, a CsI calori 21 subdivided in ladders and strips, a CsI calorimeter and an 21 anticoincidence system. In this version, the t 22 anticoincidence system. In this version, the three detectors are made 22 sensitive but only the hits on the tracker str << 23 sensitive but only the hits on the tracker strips are registered and relevant 23 information (energy deposition, position etc.) << 24 information (energy deposition, position etc) are dumped to an external 24 ASCII file for subsequent analysis. << 25 ASCII file for subsequent analysis. If the user has set up the 25 << 26 AIDA (version 3.0 or compatible) environment or Anaphe/Lizard is available, 26 Relevant information from the simulation is pr << 27 then some histograms with relevant hits information are displayed 27 class and saved, through the G4AnalysisManager << 28 and saved as PostScript files, and histograms and ntuples with 28 Tuples. << 29 relevant information are stored on a HBOOK file. 29 30 30 a) Macros for the visualization of geometry << 31 The main features of this example are 31 OpenGL, VRML and DAWN drivers << 32 32 33 b) Implementation of messengers to change so << 33 a) Macros for the visualization of geometry and tracks with 34 the detector geometry, the particle gener << 34 OpenGL, VRML and DAWN drivers >> 35 >> 36 b) Implementation of messengers to change some parameters of >> 37 the detector geometry, the particle generator and the analysis 35 manager (if present) runtime 38 manager (if present) runtime 36 39 37 c) Readout geometry mechanism to describe an << 40 c) Readout geometry mechanism to describe an high number of 38 subdivisions of the planes of the tracker 41 subdivisions of the planes of the tracker (strips) without 39 affecting in a relevant way the simulatio 42 affecting in a relevant way the simulation performances 40 43 41 d) Histogramming facilities are presently pr << 44 d) Histograming facilities are presently provided for the Linux >> 45 environment either by using the AIDA interfaces, or through >> 46 the Anaphe/Lizard system. 42 47 43 e) User interfaces via Xmotif or normal term 48 e) User interfaces via Xmotif or normal terminal provided 44 49 45 << 50 46 1. Setting up the environment variables 51 1. Setting up the environment variables 47 --------------------------------------- 52 --------------------------------------- 48 53 49 - Setup for storing ASCII data << 54 - Setup for storing ASCII data 50 55 51 If you want to store the output data in an A 56 If you want to store the output data in an ASCII file 'Tracks_x.dat' 52 where x stays for the run number. You should << 57 where x stays for the run number. You should specify the environment 53 variable: 58 variable: 54 59 55 setenv G4STORE_DATA 1 60 setenv G4STORE_DATA 1 56 61 57 - Setup for Visualization << 62 - Setup for Visualization 58 63 59 IMPORTANT: be sure that your Geant4 installa << 64 IMPORTANT: be sure that your Geant4 installation has been done 60 with the proper visualization drivers; for d << 65 with the proper visualization drivers; for details please see the 61 file geant4/source/visualization/README. << 66 file geant4/source/visualization/README. 62 << 67 63 To use the visualization drivers set the fol << 68 To use the visualization drivers set the following variables in 64 your local environment: << 69 your local environment: 65 << 70 66 setenv G4VIS_USE_OPENGLX 1 # OpenGL visuali << 71 setenv G4VIS_USE_OPENGLX 1 # OpenGL visualization 67 setenv G4VIS_USE_DAWNFILE 1 # DAWN file << 72 setenv G4VIS_USE_DAWNFILE 1 # DAWN file 68 setenv G4VIS_USE_VRMLFILE 1 # VRML file << 73 setenv G4VIS_USE_VRMLFILE 1 # VRML file 69 setenv G4VRMLFILE_VIEWER vrmlview # If inst << 74 setenv G4VRMLFILE_VIEWER vrmlview # If installed 70 75 71 - Setup for Xmotif user interface 76 - Setup for Xmotif user interface >> 77 >> 78 setenv G4UI_USE_XM 1 72 79 73 setenv G4UI_USE_XM 1 << 80 - Set up for analysis using AIDA3.2.1 and PI1.3.3 74 81 75 - Set up for analysis << 82 To compile the GammaRayTel example with the analysis tools activated, >> 83 set the following variables 76 84 77 To compile the GammaRayTel example with the << 85 setenv G4ANALYSIS_USE 1 # Use the analysis tools 78 set the following variables << 79 86 80 setenv G4ANALYSIS_USE 1 # Use the analysis t << 87 Users can download the analysis tools from: >> 88 > http://aida.freehep.org/ >> 89 > http://www.cern.ch/PI 81 90 82 2. Sample run 91 2. Sample run 83 ------------- 92 ------------- 84 93 85 To run a sample simulation with gamma tracks << 94 To run a sample simulation with gamma tracks interacting with 86 the detector in its standard configuration an 95 the detector in its standard configuration and without any 87 visualization, execute the following command << 96 visualization, execute the following command in the example main 88 directory: 97 directory: 89 98 90 $G4WORKDIR/bin/$G4SYSTEM/GammaRayTel << 99 $G4WORKDIR/bin/$G4SYSTEM/GammaRayTel 91 100 92 It is possible also to run three different co << 101 It is possible also to run three different configuration defined in 93 macro1.mac, macro2.mac and macro3.mac for vis << 102 macro1.mac, macro2.mac and macro3.mac for visualization (OpenGL, VRML 94 and DAWN respectively) with the following com 103 and DAWN respectively) with the following command 95 104 96 $G4WORKDIR/bin/$G4SYSTEM/GammaRayTel macroX.m 105 $G4WORKDIR/bin/$G4SYSTEM/GammaRayTel macroX.mac 97 106 98 where X can be 1, 2 or 3. Be sure to have the 107 where X can be 1, 2 or 3. Be sure to have the right environment (see 99 the preceding section) and the proper visuali 108 the preceding section) and the proper visualization driver enabled in 100 your local G4 installation (see geant4/source 109 your local G4 installation (see geant4/source/visualization/README for 101 more information). 110 more information). 102 111 103 << 112 104 3. Detector description 113 3. Detector description 105 ----------------------- 114 ----------------------- 106 115 107 The detector is defined in GammaRayTelDetecto 116 The detector is defined in GammaRayTelDetectorConstruction.cc 108 It is composed of a Payload with three main d 117 It is composed of a Payload with three main detectors, a Tracker (TKR), a 109 Calorimeter (CAL) and an Anticoincidence syst << 118 Calorimeter (CAL) and an Anticoincidence system (ACD). 110 119 111 The standard configuration is made of a TKR o 120 The standard configuration is made of a TKR of 15 Layers of 2 views made of 112 4 * 4 Si single sided silicon detectors with << 121 4*4 Si single sided silicon detectors with Lead converter, and a CAL of 113 5 layers of CsI, each made of 2 views of 12 C 122 5 layers of CsI, each made of 2 views of 12 CsI bars orthogonally posed. 114 4 lateral panels and a top layer of plastic s << 123 4 lateral panels and a top layer of plastic scintillator (ACL and ACT) 115 complete the configuration. 124 complete the configuration. 116 The Si detectors are composed of two silicon 125 The Si detectors are composed of two silicon planes subdivided in strips 117 aligned along the X axis in one plane and alo 126 aligned along the X axis in one plane and along the Y axis for the other. 118 127 119 The following baseline configuration is adopt 128 The following baseline configuration is adopted: >> 129 >> 130 GEOMETRICAL PARAMETER VALUE 120 131 121 GEOMETRICAL PARAMETER VALUE << 132 Converter thickness 300 microns 122 << 133 Silicon Thickness 400 microns 123 Converter Thickness 300 micron << 134 Silicon Tile Size XY 9 cm 124 Silicon Thickness 400 micron << 135 Silicon Pitch 200.micrometer 125 Silicon Tile Size XY 9 cm << 136 Views Distance 1. mm 126 Silicon Pitch 200. micrometer << 137 CAL Bar Thickness 1.5 cm 127 Views Distance 1. mm << 138 ACD Thickness 1. cm 128 CAL Bar Thickness 1.5 cm << 139 129 ACD Thickness 1. cm << 140 It is possible to modify in some way this configuration using the 130 << 141 commands defined in GammaRayTelDetectorMessenger. 131 It is possible to modify in some way this con << 142 This feature is available in the UI throught the commands subtree 132 commands defined in GammaRayTelDetectorMessen << 133 This feature is available in the UI through t << 134 "/payload/" (see the help command in the UI f 143 "/payload/" (see the help command in the UI for more information). 135 144 136 4. Physics processes 145 4. Physics processes 137 -------------------- 146 -------------------- 138 147 139 This example uses a modular physics list, wit << 148 This example uses a modular physics list, with a sample of Hadronic processes 140 (see the web page http://cmsdoc.cern.ch/~hpw/ 149 (see the web page http://cmsdoc.cern.ch/~hpw/GHAD/HomePage/ for more adeguate 141 physics lists), the Standard or the LowEnergy 150 physics lists), the Standard or the LowEnergy Electromagnetic processes. 142 151 143 5. Particle Generator 152 5. Particle Generator 144 --------------------- 153 --------------------- 145 154 146 The GammaRayTelParticleGenerationAction and i 155 The GammaRayTelParticleGenerationAction and its Messenger let the user define 147 the incident flux of particles, from a specif << 156 the incident flux of particles, from a specific direction or from an 148 isotropic background. In the first case parti << 157 isotropic background. In the first case particles are generated on a spherical 149 surface which diameter is perpendicular to th 158 surface which diameter is perpendicular to the arrival direction. In the second 150 case the arrival directions are isotropic. 159 case the arrival directions are isotropic. 151 160 152 The user can define also between two spectral 161 The user can define also between two spectral options: 153 monochromatic or with a power-law dependence. 162 monochromatic or with a power-law dependence. The particle 154 generator parameters are accessible through t << 163 generator parameters are accessible throught the UI tree "/gun/" (use the 155 UI help for more information). We are plannin 164 UI help for more information). We are planning to include, in the next 156 releases of this example, the General Particl 165 releases of this example, the General Particle Source module of G4. >> 166 >> 167 6. ReadOutGeometry >> 168 ------------------ 157 169 158 6. Hit << 170 The tracker is made of Silicon Microstrips detectors. The ReadOut geometry >> 171 provides the description of the strips. >> 172 >> 173 7. Hit 159 ------ 174 ------ 160 175 161 In this version the hits from the TKR the CAL << 176 In this version the hits from the TKR the CAL and the ACD are generated. 162 Only the hit from the TRK are saved. Each TKR << 177 Only the hit from the TRK are saved. Each TKR hit contains the following 163 information 178 information 164 179 165 a) ID of the event (this is important for mu 180 a) ID of the event (this is important for multiple events run) 166 b) Energy deposition of the particle in the 181 b) Energy deposition of the particle in the strip (keV) 167 c) Number of the strip << 182 c) Number of the strip 168 d) Number of the plane 183 d) Number of the plane 169 e) Type of the plane (1=X 0=Y) 184 e) Type of the plane (1=X 0=Y) 170 f) Position of the hit (x, y, z) in the refe << 185 f) Position of the hit (x,y,z) in the reference frame of the payload 171 << 172 The hit information are saved on an ASCII fil << 173 N is the progressive ID number associated to << 174 186 175 7. Analysis << 187 The hit information are saved on an ASCII file named Tracks_N.dat, where 176 ----------- << 188 N is the progressive ID number associated to the run. 177 189 178 Relevant information from the simulation is pr << 190 8. Analysis 179 class and saved, through the G4AnalysisManager << 191 ---------------- 180 Tuples. The output file is written in ROOT for << 181 XML (or Hbook) by changing the appropriate #in << 182 No external software is required (apart from t << 183 must be installed and a FORTRAN compiler must << 184 192 >> 193 The analysis part of GammaRayTel is based on the AIDA interfaces and their >> 194 implementation in Anaphe; please look at their documentation for more details. 185 Keep in mind that the actual implementation o 195 Keep in mind that the actual implementation of the analysis tools in GammaRayTel 186 is of a pedagogical nature, so we kept it as << 196 is of a pedagogical nature, so we kept it as simple as possible. 187 197 188 The actual analysis produces some histograms << 198 The actual analysis produces some histograms (see next section) and an ntuple. 189 Both the histograms and the ntuple are saved << 199 Both the histograms and the ntuple are saved at the end of the run in the file 190 "gammaraytel.root". Please note that in a mul << 200 "gammaraytel.hbook". You can than analyze offline the contents of such a file; 191 the last run always override the root file. << 201 the GammaRayTel contains also a very simple python script that can be used with >> 202 Lizard to plot the histograms See the Lizard documentation on how to access >> 203 the ntuple. >> 204 Please note that in a multiple run session, the last run always override the >> 205 hbook file. 192 206 193 8. Histogramming << 207 9. Histogramming 194 ---------------- 208 ---------------- 195 209 196 The 1D histograms contain the energy depositi << 210 Some hits information can be visualized runtime using the Anaphe Plotter 197 the TKR and the hits distribution along the X << 211 (if it is available on the user platform); two 1D histograms can be 198 (note again that these histograms have been c << 212 visualized during the simulation run. >> 213 >> 214 The 1D histograms contain the energy deposition in the last X plane of >> 215 the TKR and the hits distribution along the X planes of the TKR >> 216 (note again that these histograms have been chosen more for pedagogical 199 motivation than for physical one). 217 motivation than for physical one). 200 218 201 These histograms are filled and updated at ev << 219 These histograms are filled and updated at every event and are initialized 202 with each new run; the scale of the histogram << 220 with each new run; the scale of the histograms is automatically derived from 203 the detector geometry. << 221 the detector geometry. 204 << 222 205 Through a messenger it is possible to set som << 223 Throught a messenger it is possible to set some options with 206 the UI subtree "/analysis/" (use the UI help << 224 the UI subtree "/analysis/" (use the UI help for more info); >> 225 If you feel that the simulation is too slow with the >> 226 histograms updated every event, you can disable the drawing and retain >> 227 the saving. Please note that the updating of the histograms is triggered >> 228 only when there is some hit in an event. 207 229 208 In this example we only show the use of very << 230 In this example we only show the use of very basic feature of this new 209 simulation/analysis framework. 231 simulation/analysis framework. 210 232 211 9. Digi << 233 10. Digi 212 ------- << 234 -------- 213 235 214 For the TKR also the digits corresponding to << 236 For the TKR also the digits corresponding to the Hits are generated. 215 A digi is generated when the hit energy depos << 237 A digi is generated when the hit energy deposit is greater than a threshold 216 (in this example setted at 120 keV). << 238 (in this example setted at 120 keV). 217 The TKR digi information are stored on the sa 239 The TKR digi information are stored on the same file Tracks_N.dat and contain: 218 240 219 a) ID of the event (this is important for mu 241 a) ID of the event (this is important for multiple events run) 220 b) Number of the strip << 242 b) Number of the strip 221 c) Number of the plane 243 c) Number of the plane 222 d) Type of the plane (1=X 0=Y) 244 d) Type of the plane (1=X 0=Y) 223 245 224 10. Classes Overview << 246 11. Classes Overview 225 -------------------- << 247 ------------------- 226 248 227 This is the overview of the classes defined i 249 This is the overview of the classes defined in this example 228 << 250 229 GammaRayTelPrimaryGeneratorAction << 251 GammaRayTelPrimaryGeneratorAction 230 User action for primaries generator << 252 User action for primaries generator 231 253 232 GammaRayTelPrimaryGeneratorMessenger 254 GammaRayTelPrimaryGeneratorMessenger 233 Messenger for interactive particle generat << 255 Messenger for interactive particle generator 234 parameters modification via the User Inter << 256 parameters modification via the User Interface 235 << 257 236 GammaRayTelPhysicsList 258 GammaRayTelPhysicsList 237 Determination of modular physics classes << 259 Determination of modular physics classes 238 260 239 GammaRayTelDetectorConstruction << 261 GammaRayTelGeneralPhysics 240 Geometry and material definitions for the << 262 Decay processes 241 263 242 GammaRayTelDetectorMessenger << 264 GammaRayTelEMPhysics 243 Messenger for interactive geometry paramet << 265 Std and LowE physics processes (for gamma & e-/e+) 244 modification via the User Interface << 266 >> 267 GammaRayTelMuonPhysics >> 268 Muon & its processes >> 269 >> 270 GammaRayTelIonPhysics >> 271 Ions and their processes 245 272 >> 273 GammaRayTelHadronPhysics >> 274 Sample of hadronic processes >> 275 >> 276 GammaRayTelTelVisManager >> 277 Visualization manager class >> 278 >> 279 GammaRayTelDetectorConstruction >> 280 Geometry and material definitions for the detector >> 281 >> 282 GammaRayTelDetectorMessenger >> 283 Messenger for interactive geometry parameters >> 284 modification via the User Interface >> 285 246 GammaRayTelAnalysis 286 GammaRayTelAnalysis 247 Analysis manager class (experimental) << 287 Analysis manager class with Lizard tool (experimental) 248 288 249 GammaRayTelAnalysisMessenger 289 GammaRayTelAnalysisMessenger 250 Messenger for interactive analysis options << 290 Messenger for interactive analysis options modification 251 via the User Interface << 291 via the User Interface 252 292 253 GammaRayTelRunAction 293 GammaRayTelRunAction 254 User run action class << 294 User run action class 255 295 256 GammaRayTelEventAction 296 GammaRayTelEventAction 257 User event action class << 297 User event action class 258 298 259 GammaRayTelTrackerHit 299 GammaRayTelTrackerHit 260 Description of the hits on the tracker << 300 Description of the hits on the tracker 261 301 262 GammaRayTelDigi 302 GammaRayTelDigi 263 Description of the digi on the tracker << 303 Description of the digi on the tracker 264 304 265 GammaRayTelDigitizer 305 GammaRayTelDigitizer 266 Description of the digitizer for the track << 306 Description of the digitizer for the tracker >> 307 >> 308 GammaRayTelTrackerROGeometry >> 309 Description of the readout geometry for strips subdivision 267 310 268 GammaRayTelTrackerSD 311 GammaRayTelTrackerSD 269 Description of the TKR sensitive detector << 312 Description of the TKR sensitive detector 270 313 271 GammaRayTelAnticoincidenceHit 314 GammaRayTelAnticoincidenceHit 272 Description of the hits on the anticoincid << 315 Description of the hits on the anticoincidence 273 316 274 GammaRayTelAnticoincidenceSD 317 GammaRayTelAnticoincidenceSD 275 Description of the ACD sensitive detector << 318 Description of the ACD sensitive detector 276 319 277 GammaRayTelCalorimeterHit 320 GammaRayTelCalorimeterHit 278 Description of the hits on the calorimeter << 321 Description of the hits on the calorimeter 279 322 280 GammaRayTelCalorimeterSD 323 GammaRayTelCalorimeterSD 281 Description of the CAL sensitive detector << 324 Description of the CAL sensitive detector >> 325 >> 326 >> 327 >> 328 >> 329 >> 330 >> 331 >> 332 >> 333 >> 334