GAMOS User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
GAMOS User’s Guide Release 6.1.0 GAMOS Collaboration Mar 18, 2020 CONTENTS 1 Introduction1 1.1 About this document.................................1 1.2 Introduction to GAMOS...............................1 1.3 Structure of GAMOS.................................2 1.4 The plug-in concept.................................2 2 Getting started5 2.1 Getting the code and installing it...........................5 2.1.1 Installing in Linux and Mac OS......................5 2.1.2 Installing in Windows............................8 2.2 Running an example in Linux or Mac OS......................9 2.3 Running an example in Windows.......................... 10 2.3.1 GAMOS Graphical User Interface..................... 10 2.4 Compiling GAMOS................................. 11 2.4.1 Compiling your new code.......................... 11 3 Geometry 15 3.1 Building your geometry with a text file....................... 15 3.1.1 Description of geometry text file format.................. 15 3.1.2 Dumping your Geant4 geometry in text file format............ 43 3.1.3 Adding new tags to your input text file................... 43 3.1.4 Parallel geometries............................. 45 3.2 Building complex geometries in a simple way.................... 46 3.3 Building a simple geometry with one material.................... 46 3.4 Building your geometry with C++ code....................... 47 3.5 Phantom geometries................................. 47 3.5.1 Simple phantom geometries........................ 47 3.5.2 Reading DICOM files............................ 47 3.5.3 Setting off visualization of phantom geometries.............. 48 3.6 Movements...................................... 48 3.7 Geometry utilities.................................. 50 3.8 Magnetic and electric fields............................. 52 i 4 Visualization 55 4.1 3D Geant4 visualization............................... 55 4.2 2D visualization................................... 56 5 Generator 59 5.1 Using GAMOS generator.............................. 59 5.1.1 Introduction................................. 59 5.1.2 Particle sources............................... 60 5.1.3 Distributions of energy, position, direction and time............ 62 5.2 Reading your generator particles from a text file.................. 70 5.3 Reading your generator particles from a binary file................. 71 5.4 Event generator changing energy and material................... 72 5.5 Event generator histograms............................. 73 5.6 Biasing generator distributions............................ 73 5.7 Building your generator with C++.......................... 74 5.8 Using ions...................................... 74 6 Physics 77 6.1 GAMOS electromagnetic physics lists........................ 77 6.1.1 Basic electromagnetic physics list..................... 77 6.1.2 GAMOS extended electromagnetic physics list.............. 80 6.1.3 Geant4 electromagnetic physics list options................ 80 6.1.4 Multiple scattering models......................... 81 6.1.5 Bremsstrahlung angular distributions.................... 81 6.2 GAMOS hadrontherapy physics list......................... 82 6.3 Microdosimetry physics list............................. 82 6.4 Other physics lists.................................. 83 6.5 Optical photons.................................... 84 6.5.1 Using optical photons as primary generator................ 86 6.6 X-ray refraction................................... 87 6.7 Coulomb scattering.................................. 87 6.8 Atomic deexcitation processes............................ 87 6.9 Decay process.................................... 88 6.10 Radioactive decay process.............................. 88 6.11 Cerenkov process................................... 89 6.12 Coulomb scattering.................................. 89 6.13 Nuclear processes of electromagnetic particles................... 89 6.14 Replacing electromagnetic process models..................... 90 6.14.1 Replacing a set of process models..................... 90 6.14.2 Replacing one process model........................ 90 6.15 Removing a process from a physics list....................... 91 6.16 Production thresholds (cuts)............................. 92 6.16.1 Production cuts by region.......................... 92 6.16.2 Energy cuts to range cuts conversion.................... 93 6.16.3 Minimum and maximum production cuts................. 94 ii 6.16.4 Apply cuts for all processes......................... 94 6.17 User limits...................................... 94 6.18 Automatic optimisation of cuts........................... 95 6.18.1 Range rejection............................... 96 6.19 Building your physics list with C++ code...................... 97 7 User Actions 99 7.1 Geant4 and GAMOS user actions.......................... 99 7.2 Adding a filter.................................... 99 7.3 Adding a classifier.................................. 100 7.4 User action name, including filters and classifiers.................. 100 7.5 Creating your GAMOS user action with C++ code................. 100 8 Sensitive Detector and Hits 103 8.1 Sensitive detectors.................................. 103 8.1.1 Attaching a sensitive detector to a volume................. 103 8.1.2 Building your sensitive detector with C++ code.............. 105 8.2 Hits.......................................... 105 8.3 Hits digitization and reconstruction......................... 106 8.3.1 Hits digitization............................... 106 8.3.2 Hits and digits reconstruction........................ 106 8.3.3 Examples of reconstructed hit builders................... 107 8.4 Detector effects.................................... 108 8.4.1 Energy resolution.............................. 108 8.4.2 Time resolution............................... 109 8.4.3 Detector measuring time.......................... 110 8.4.4 Detector dead time............................. 111 8.4.5 Minimum hit energy............................ 112 8.5 Identifying each sensitive detector copy....................... 112 8.6 Storing and retrieving hits.............................. 113 8.6.1 Storing and retrieving simulated hits.................... 113 8.6.2 File format................................. 114 8.6.3 Storing reconstructed hits.......................... 115 8.7 Hits histograms.................................... 115 9 Scoring 119 9.1 Creating a scorer................................... 119 9.2 Scorer classes..................................... 121 9.2.1 Scoring in voxelised phantoms....................... 125 9.3 Compound scorer................................... 126 9.3.1 Linear Energy Transfer (LET) scorer classes................ 126 9.4 Filters......................................... 127 9.5 Classifiers...................................... 127 9.6 Scorer printers.................................... 128 9.7 Multiplying by data................................. 130 iii 9.8 Multiplying by a distribution............................. 130 9.9 Convergence testing................................. 130 9.10 Point detector scorer................................. 132 9.10.1 Theoretical basis.............................. 132 9.10.2 GAMOS implementation.......................... 133 9.10.3 Variance reduction techniques....................... 138 9.10.4 Sum scoring results and plot them..................... 140 10 Variance reduction techniques 141 10.1 Introduction..................................... 141 10.2 Importance sampling................................. 141 10.3 Geometrical biasing................................. 142 10.4 Biasing operations.................................. 142 10.4.1 Cross section biasing............................ 143 10.4.2 Force collision............................... 144 10.4.3 Uniform bremsstrahlung splitting...................... 145 10.4.4 Directional bremsstrahlung splitting.................... 146 10.4.5 Equal weight bremsstrahlung splitting................... 147 11 Histogramming 149 11.1 Histogram formats.................................. 149 11.2 Histograms in CSV format.............................. 150 11.3 Histograms in TXT format.............................. 150 11.4 Normalize histograms................................ 151 11.5 Changing histogram minimum, maximum and number of bins........... 151 11.6 Histograms name separator............................. 152 11.7 Output files name................................... 152 11.8 Analysing your histograms with ROOT....................... 153 11.8.1 Printing the histograms in graphics files.................. 153 11.8.2 Comparing histograms in two files..................... 154 11.9 Creating your own histogram with C++ code.................... 154 12 Analysis of data output 157 12.1 Introduction: GAMOS data............................. 157 12.2 Data users...................................... 159 12.2.1 Behaviour as a function of information object............... 159 12.2.2 Behaviour as a function of output format.................. 160 12.2.3 Selection of data list for a data user..................... 162 12.2.4 Saving GAMOS data in a ROOT TTree.................. 167 12.2.5 Filter from data............................... 167 12.2.6 Classifier by data.............................. 168 12.2.7 Primitive scorer from data......................... 168 12.3 List of available data................................. 169 12.3.1 Position data................................ 169 12.3.2 Direction data................................ 172 iv 12.3.3 Momentum data............................... 174 12.3.4 Energy