GAMOS 5.1.0 User's Guide

GAMOS Collaboration

Version: 5.1.0

Table of Contents
Introduction
About this document
Introduction to GAMOS
Structure of GAMOS
The plug-in concept
Getting started
Getting the code and installing it
Installing in Linux and Mac OS
Installing in Windows
Running an example in Linux or Mac OS
Running an example in Windows
Compiling GAMOS
Compiling your new code
Geometry
Building your geometry with a text file
Description of geometry text file format
Dumping your Geant4 geometry in text file format
Adding new tags to your input text file
Parallel geometries
Building simple geometries
Building a simple geometry with one material
Building your geometry with C++ code
Reading DICOM files
Converting DICOM files to simulation files
DICOM file format
Reading a DICOM file in a GAMOS job
Reading DICOM CT structures
Managing RT plan data
Partial phantom geometries
Utilities to check and draw DICOM files
Simple phantom geometries
Setting off visualization of phantom geometries
Movements
Movement description from a file
Geometry utilities
Commands to print geometrical objects
C++ utilities
Magnetic and electric fields
Uniform magnetic and electric fields
Non uniform magnetic fields
Generator
Using GAMOS generator
Introduction
Particle sources
Distributions
Reading your generator particles from a text file
Reading your generator particles from a binary file
Event generator changing energy and material
Event generator histograms
Biasing generator distributions
Building your generator with C++
Using ions
Physics
GAMOS electromagnetic physics lists
Basic electromagnetic physics list
GAMOS electromagnetic extended physics list
Standard electromagnetic physics list options
Multiple scattering models
Bremsstrahlung angular distributions
GAMOS hadrontherapy physics list
Microdosimetry physics list
Other physics lists
Optical photons
Using optical photons as primary generator
X-ray refraction
Coulomb scattering
Atomic deexcitation processes
Decay process
Radioactive decay process
Cerenkov process
Coulomb scattering
Nuclear processes of electromagnetic particles
Replacing process models
Replacing a set process models
Replacing one process model
Removing a process from a physics list
Production cuts
Production cuts by region
Energy cuts to range cuts conversion
Minimum and maximum production cuts
Apply cuts for all processes
User limits
Automatic optimisation of cuts
Range rejection
Building your physics list with C++ code
User Actions
Adding a filter
Adding a classifier
User action name
Creating your GAMOS user action
Sensitive Detector and Hits
Sensitive detectors
Attaching a sensitive detector to a volume
Building your sensitive detector with C++ code
Hits
Hits digitization and reconstruction
Hits digitization
Hits and digits reconstruction
Examples of reconstructed hit builders
Detector effects
Energy resolution
Time resolution
Detector measuring time
Detector dead time
Minimum hit energy
Identifying each sensitive detector copy
Storing and retrieving hits
File format
Storing reconstructed hits
Hits histograms
Scoring
Creating a scorer
Scorer classes
Scoring in voxelised phantoms
Filter classes
Scorer printers
Classifiers
Multiplying by data
Multiplying by distribution
Convergence testing
Point detector scorer
Theoretical basis
GAMOS implementation
Variance reduction techniques
Sum scoring results and plot them
Variance reduction techniques
Introduction
Importance sampling
Geometrical biasing
Biasing operations
Cross section biasing
Force collision
Uniform bremsstrahlung splitting
Directional bremsstrahlung splitting
Equal weight particle splitting
Histogramming
Histogram formats
Histograms in CSV format
Changing histogram minimum, maximum and number of bins
Histograms name separator
Output files name
Analysing your histograms with ROOT
Printing the histograms in graphics files
Comparing histograms in two files
Creating your own histogram
Analysis (extracting data)
Introduction: GAMOS data
Data users
Behaviour as a function of information object
Behaviour as a function of output format
Selection of data list for a data user
Saving GAMOS data in a ROOT TTree
Filter from data
Classifier by data
Primitive scorer from data
List of available data
Position
Direction
Momentum
Energy
Geometrical objects
Material variables
Particle and process
Secondary tracks
Ancestor data
Others
Output file names
Merging results from different jobs
Example of Analysing text output files
Filters
Introduction
Simple filters
Volume filters
Filters of filters
Applying filters to a user action
Checking filters at a user action
Filtering steps in the future
Classifiers
Introduction
Setting indices to classifiers
Classifiying on secondary data
Distributions
Introduction
Creating a distribution
Assigning a GAMOS data
Reading values from a file
Numeric distributions
String distributions
String data distribution
Geometrical biasing distribution
Ratio of distributions
Utility user actions
Counting the number of tracks and events
Counting the processes
Shower shape studies
Killing all tracks
Table of tracks and steps
Material budget studies
Detailed report of where CPU time is spent
Changing the weight using a distribution
Copying the weight to the secondary particles
Stop run after a certain CPU time
Visualising only a set of events
Setting the correlation between the gammas of a radioactive decay chain
Printing electromagnetic parameters
Managing the verbosity
GAMOS verbosity managers
Controlling GAMOS verbosity by event
Using a GAMOS verbosity manager in your code
Creating your own verbosity manager
Controlling the Geant4 verbosity by event and track
Dumping the standard output and error in log files
Detector applications
Identifying Compton interactions
Compton studies histograms
Histograms of data about the interactions and the reconstructed hits
Classification of good and bad identification histograms as a function of variable
Histograms of gammas at sensitive detectors
Automatic determination of production cuts for a detector
Automatic determination of user limits for a detector
PET application
PET geometry
PET event classification
PET histograms: event classification
PET output for reconstruction
List-mode binary file
Projection data file
PET histograms: positrons
Detector histograms: distance between two gammas
SPECT application
SPECT event classification
SPECT histograms: event classification
SPECT output for reconstruction
Compton camera application
Compton camera geometry
Compton camera Event Classification
Compton camera histograms: event classification
Compton camera output for reconstruction
Image reconstruction utilities
List-mode to projection data: lm2pd
Summing projection data files: sumProjdata
Analytic image reconstruction: ssrb_fbp
Visualization tools
Stochastic Image Ensemble method
Introduction
Getting Started
Program Parameters and Flags
Analysis
Radiotherapy application
Geometrical modules
JAWS module
MLC module
Using phase spaces
Writing phase spaces
Phase space text file
Phase space histograms
Reading phase spaces
Adding extra information to a phase space
Reusing a particle at a phase space without filling the phase space file
Optimisation of a linac simulation
Cuts optimisation
Electromagnetic parameters optimisation
Particle splitting
Killing particles at big X/Y
Scoring dose in phantom
Saving scores and scores squared in binary file
Saving scores and score errors in text file
Saving scores in histograms
Analysis utilities
Summing phase space files
Making histograms out of a phase space file
Merging 'sqdose' files
Merging '3ddose' files
Making histograms out of a 'sqdose' file
Automatic determination of production cuts for an accelerator simulation
Automatic determination of production cuts for a dose in a phantom simulation
Automatic determination of user limits for an accelerator simulation
Automatic determination of user limits for a dose in phantom simulation
Shielding application
Studying penetration
Activation studies
Sum activation results and plot them
Print channel by channel cross sections
Counting hadronic cross sections
Make histograms of secondary particles from the neutron_hp or particle_hp databases
Print yields of production of secondary particles from charged particles traversing a thich material
Analysis utilities
Summing scoring results
Summing activation results
Optimising the CPU time of your application
Knowing where the time is spent
Production cuts
Killing particles of small energy
Killing particles
Optimising the particle generation
Limiting the number of user actions
Using variance reduction techniques
Extracting detailed information from a MCNP run
Introduction
A first example
Geometry
Physics
Source (primary generator)
Extracting information
Tallying (scoring)
F1 and F2 tallies
F4 tally
Appendix A
Using parameters
Checking the usage of parameters
Managing the input data files
Random number seeds
Setting the initial random number seeds
Restoring the initial random number seeds
Changing the random engine
Sending several jobs in the same machine
Identifying touchables
Using asterisks to get volume, particle and material names
Using particle names
Appendix B: Extending GAMOS functionality with C++ utilities
Converting a Geant4 example into a GAMOS example
Creating your plug-in
Using a parameter in your C++ code
Event classification by interaction types
Structure of GAMOS
Bibliography