Warning, /geant4/examples/extended/medical/dna/phasespace/README.md is written in an unsupported language. File is not indexed.
0001 \page Examplephasespace Example phasespace
0002
0003 \author S. Incerti (a, *)\n
0004 a. LP2i, IN2P3 / CNRS / Bordeaux 1 University, 33175 Gradignan, France \n
0005 * e-mail: incerti@lp2ib.in2p3.fr \n
0006
0007 ## INTRODUCTION.
0008
0009 The phasespace example shows how to simulate particle tracks in a cube of
0010 liquid water containing a scoring sphere, placed in its centre. The
0011 example creates two phase space files
0012 - one with the ROOT (psp.root) format,
0013 - one with the GRAS format (GRAS.csv),
0014 both scoring particles entering the sphere.
0015
0016 ## GEOMETRY SET-UP
0017
0018 The geometry is a 100-micron side cube (World) made of liquid water (G4_WATER
0019 material), containing a sphere of 10-micron radius, placed in its center.
0020
0021 Particles are shot along the Z axis (positive direction), starting at a
0022 Z = -12 microns from the center of the World.
0023
0024 The World and sphere sizes and material can be changed directly
0025 in the phasespace.in macro file.
0026
0027 The shooting is controled using GPS commands in phasespace.in.
0028
0029 The variable density feature of materials is illustrated in
0030 DetectorConstruction. The material density can be changed directly in the
0031 phasespace.in macro file.
0032
0033 ## SET-UP
0034
0035 Make sure $G4LEDATA points to the low energy electromagnetic data files.
0036
0037 ## HOW TO RUN THE EXAMPLE
0038
0039 In interactive mode, run:
0040
0041 ```
0042 ./phasespace
0043 ```
0044
0045 In batch, the macro phasespace.in can be used. It shows how to define dimensions
0046 and shoot different particle types.
0047
0048 ## PHYSICS
0049
0050 The list of available Reference Physics Lists is shown when simulation starts.
0051
0052 All Physics settings are done in the PhysicsList class.
0053 QGSP_BIC_HP is activated by default.
0054
0055 At run time, tracks are killed inside the sphere,
0056 using in phasespace.in the command :
0057
0058 ```
0059 /step/killInsideScorer 1
0060 ```
0061
0062 ## SIMULATION OUTPUT AND RESULT ANALYSIS
0063
0064 The output results consists in a psp.root file, containing a ntuple, named
0065 "scorer".
0066
0067 For each particle entering the sphere, when the PreStepPoint is located at
0068 the geometry boundary, it records :
0069 - the PDG encoding of the particle
0070 - the 3 PreStepPoint coordinates (in microns)
0071 - the 3 PreStepPoint momentum cosine (no unit)
0072 - the kinetic energy at PreStepPoint (in keV)
0073
0074 This information is extracted from the SteppingAction class.
0075
0076 The ROOT file can be easily analyzed using the provided ROOT macro file
0077 plot.C; to do so :
0078 * be sure to have ROOT installed on your machine
0079 * be sure to be in the directory containing the ROOT file created by phasespace
0080 * from there, launch ROOT by typing root
0081 * under your ROOT session, type in : .X plot.C to execute the macro file
0082 * alternatively you can type directly under your session : root plot.C
0083
0084 The ROOT macro also writes a GRAS.csv file, following the format of GRAS (1).
0085 Such a file can for ex. be read with the moleculardna Geant4 advanced example (2).
0086
0087 - (1) https://essr.esa.int/project/gras-geant4-radiation-analysis-for-space
0088 - (2) https://moleculardna.org