Files
geant4/examples/advanced/medical_linac
2016-06-09 10:56:29 +02:00
..
2016-06-09 10:56:29 +02:00
2016-06-09 10:56:29 +02:00
2016-06-09 10:56:29 +02:00
2016-06-09 10:56:29 +02:00
2016-06-09 10:56:29 +02:00
2016-06-09 10:56:29 +02:00
2016-06-09 10:56:29 +02:00
2016-06-09 10:56:29 +02:00
2016-06-09 10:56:29 +02:00
2016-06-09 10:56:29 +02:00

$Id: README,v 1.2 2004/05/21 11:52:32 mpiergen Exp $
-------------------------------------------------------------------


     =========================================================
 		      Geant4 - Medical Linac example
     =========================================================

                             README
                      ---------------------


------------------------------------------------------------------------
----> Introduction.

Medical_Linac is an example of application of Geant4 in a medical physics
envinronment. It simulates energy deposit in a Phantom filled with water 
for a typical linac used for intensity modulated radiation therapy.
The experimental set-up is very similar to one used in clinical practice.

------------------------------------------------------------------------
----> 1.Experimental set-up.

The elements simulated are:

1-The point source of electrons (the distribution of the electron energy 
  and the electron radial intensity was assumed Gaussian in shape)
  (the beam is along the z axis)
2-The primary collimator
3-The target
4-The vacuum window
5-The flattening filter
6-The ion chamber
7-The mirror
8-The secondary movable collimators (jaws)
9-The light field reticle
10-The phantom (filled with water)

The objects (2) and (3) are in a box filled with vacuum.
The world volume is filled with air.
The distance between the upper surface of the target and the upper surface
of the phantom (SSD) is 100 cm.
  
------------------------------------------------------------------------
----> 2.Setting up the environment variables

compiler = gcc-3.2.3

setenv G4SYSTEM Linux-g++

setenv G4INSTALL              points to the installation directory of GEANT4;

setenv G4LIB                  point to the compiled libraries of GEANT4;

setenv G4WORKDIR              points to the work directory;

setenv CLHEP_BASE_DIR         points to the installation directory of CHLEP; 
 
setenv G4LEDATA               points to the low energy electromagnetic libraries - G4EMLOW2.3 

setup for analysis: AIDA 3.2.1, PI 1.2.1                                

Users can download the analysis tools from:  
                                                                        
http://aida.freehep.org/
http://www.cern.ch/PI 
         
#------------------------------------------                                                   

 - Setup for Visualization 

  IMPORTANT: be sure that your Geant4 installation has been done 
  with the proper visualization drivers; for details please see the 
  file geant4/source/visualization/README. 

  To use the visualization drivers set the following variables in 
  your local environment: 

  setenv G4VIS_USE_OPENGLX      1  # OpenGL visualization
  setenv G4VIS_USE_DAWNFILE     1  # DAWN file
  setenv G4VIS_USE_VRMLFILE     1  # VRML file
  setenv G4VRMLFILE_VIEWER  vrmlview  # If installed

------------------------------------------------------------------------
----> 3.How to run the example. 
 
- batch mode:

OpenGL visualization:
  $G4WORDIR/bin/Linux-g++/MedLinac vis.mac

or DAWN file:
  $G4WORDIR/bin/Linux-g++/MedLinac dawnvis.mac

or VRML file:
  $G4WORDIR/bin/Linux-g++/MedLinac vrmlvis.mac 

or without visualization:
  $G4WORDIR/bin/Linux-g++/MedLinac macro.mac 

- Interative mode:                                                      
  3) $G4WORDIR/bin/Linux-g++/MedLinac

-->possible different configurations for interactive mode:  
            
The user can select the position of the secondary collimators (the jaws)
to obtain the desired field at isocenter:
idle>/Jaws/X1/DistanceFromAxis -20. cm
idle>/Jaws/X2/DistanceFromAxis 20. cm
idle>/Jaws/Y1/DistanceFromAxis -20. cm
idle>/Jaws/Y2/DistanceFromAxis 20. cm
idle>/Jaws/update

The user can select the mean energy ad the standard deviation of the electrons:
idle>/energy 6.0 MeV
idle>/sourceType 0.127 MeV
                                                         
idle>/run/beamOn [NumberOfEvents]      ...and then
idle>exit   

-----------------------------------------------------------------------
----> 4. The physics

The electromagnetic physic uses the LowEnergy library,
specifically provided from GEANT4 to treat low energy processes.
The default cut in range value is 0.1 mm, a bigger cut is associated to the first collimator.

------------------------------------------------------------------------
----> 5. Simulation output    
                                          
 The analysis part of Medical_Linac is based on the AIDA interfaces and their
 implementation in Anaphe
 The actual analysis produces some histograms; the histograms are saved at 
 the end of the run in the file "medlinac.hbk".

 It contains:
 1) 2Dhistogram with the distribution of energy in the phantom (plane xz)              
 2) 1Dhistogram with the primary particle energy  
 
 3) 2Dhistogram with the distribution of energy )at a depth in the phantom
     of 15 mm (ZThickness = 1. cm )
 
 4) 1Dhistogram with the distribution of energy along the z axis 
    (Y and X Thickness = 5. mm), from which the user can calculate the PDD
 
 5) 1Dhistogram with the distribution of energy along the x axis 
    (Y and Z Thickness = 5. mm) at a depth in the phantom of 15 mm, 
    from which the user can calculate the flatness
 
 6) 1Dhistogram with the distribution of energy along the x axis 
    (Y and Z Thickness = 5. mm) at a depth in the phantom of 50 mm,
    from which the user can calculate the flatness
 
 7) 1Dhistogram with the distribution of energy along the x axis 
    (Y and Z Thickness = 5. mm) at a depth in the phantom of 100 mm,
    from which the user can calculate the flatness
 
 8) 1Dhistogram with the distribution of energy along the x axis 
    (Y and Z Thickness = 5. mm) at a depth in the phantom of 200 mm,  
    from which the user can calculate the flatness 
                                                                        
 Units:   the energy deposit is in MeV;
         x, y, z in mm for histograms   

 To fill histograms from (4) to (8) I suggest you to select NumberOfEvents>500000

 Please note that in a multiple run session, the last run always override the 
 hbook file.

 To use analisys remember to set G4ANALYSIS_USE. 

------------------------------------------------------------------------
----> 6. Future plans
In next future I will put in this example the multi leaf collimator
------------------------------------------------------------------------

for comments, advices, doubts and questions: Michela.Piergentili@ge.infn.it

last modified: Michela Piergentili 06/05/2004