Geant4 Tutorial European Medical Physics School, Archamps, France - PowerPoint PPT Presentation

geant4 tutorial european medical physics school archamps france n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Geant4 Tutorial European Medical Physics School, Archamps, France PowerPoint Presentation
Download Presentation
Geant4 Tutorial European Medical Physics School, Archamps, France

play fullscreen
1 / 79
Geant4 Tutorial European Medical Physics School, Archamps, France
222 Views
Download Presentation
alice
Download Presentation

Geant4 Tutorial European Medical Physics School, Archamps, France

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Geant4 TutorialEuropean Medical Physics School, Archamps, France

  2. Overview of the contents Software process Geant4 advanced example brachytherapy Integration of the brachytherapy application in a distributed computing environment Run the brachytherapy example

  3. Software Process How to develop a rigorous and reliable software application Documentation:http://www.ge.infn.it/geant4 link: training, software engineering documentation

  4. Software process For example, a process model is the Unified Software Development Process (USDP) Iterative-incremental method Concepts: • User Requirements • Define the software functionality • Design • Project of the software structure • Implementation • Test

  5. Capture User Requirements Define the scope of the software system to be built (“what it should do”)

  6. Study of the experimental set-up: • involved particles, • involved physics, • detectors • What is the scope of the simulation How to collect User Requirements Example of User Requirement UR1. The user shall be able to define electromagnetic processes for gamma Need: Essential Priority: High Source: ESA

  7. Collect User Requirements in proper domains User Requirements

  8. Design Define the structure of the software by a software engineering point of view

  9. OOAD Primary particles Design Physics Run Event Analysis Detector Visualisation

  10. design implementation test Software development UR1 Test phase is crucial and extremely important

  11. Test • Important and crucial issue • Always in respect to experimental data • Comparisons in respect to other MC toolkit are just curiosity • Levels of tests: • Microscopic test Test on components of the application (i.e. Physics models adopted) • Macroscopic test Test on the experimental set-up (physics, geometry, etc. together)

  12. implementation UR1 design test UR3 design implementation test UR2 test implementation design Iterative, incremental method • Gain feedback on the developed software: Examples: - Is the UR satisfied? - Do we need new UR? - How can we improve the software ? • UR1 • UR2 • UR3 …..

  13. Documentation • User Requirement document • Design • Traceability documents • How to use the software application • Comments in the code • Software process and documentation are important for: • Develop a rigorous and reliable software • Develop clear and clean software • Limit the possibility of introducing bugs • Help other people to understand the software application

  14. Geant4 brachytherapy advanced example F. Foppiano3, S.Guatelli2,J.Moscicki1, M.G. Pia2 CERN1 ,INFN Genova2, National Institute for Cancer Research, IST Genova3 www.ge.infn.it/geant4, advanced examples

  15. Endocavitary brachytherapy (lungs, uterus) Brachytherapy • Brachytherapy is a medical therapy used for cancer treatment Radioactive sources are used to deposit therapeutic doses near tumors, while preserving surrounding healthy tissues • Treatment planning: how to set (where?, how long?) • radioactive sources in treatment’s target area Superficial brachytherapy(skin) • Software is used to define patient’s treatment planning • It calculates the dose in the patient Interstitial brachytherapy (prostate)

  16. Commercial software for brachytherapy • Various commercial software products for treatment planning • No commercial software available for superficial brachytherapy with Leipzig applicators Precision • Based on approximated analytical methods, because of speed constraints • Uniform material: water Cost • Each software is specific to one technique • Treatment planning software is expensive (~ hundreds K $/euro)

  17. dosimetric system precise Develop a general purpose Patient’s anatomy modeling with the capability of interface to CT images with a user-friendly interface adequate speed for clinical usage performing at

  18. Requirements Calculation of3-D dose distributionin the treatment area Determination ofisodose curves Based on Monte Carlo methods Accurate description of physics interactions Precision Accurate model of the real experimental set-up Realistic description of geometry and tissue Possibility to interface to CT images Simple user interface + Graphic visualisation Elaboration of dose distributions and isodoses Easy configuration for hospital usage Parallelisation Access to distributed computing resources Speed Transparent Open to extension and new functionality Publicly accessible Other requirements

  19. User Requirements The application provides the simulation of energy deposit of brachytherapic sources in a phantom 1.The user shall be able to visualise the geometry involved and the trajectories of the particles 1.The phantom is a box 2.The user shall be able to change the absorber material of the phantom 3.The user shall be able to model patient anatomy 4.The dose should be collected in 1. mm wide voxels • Geometry 1. Particles: e+,e-, gamma 2. Low Energy electromagnetic processes • Physics • 1. The user shall be able to calculate the total absorbed energy in the phantom: • 3D distribution in the volume • 2D distribution in the plain containing the source • Analysis • Visualisation

  20. Precision Based on Monte Carlo methods Experimental validationof physics involved Microscopic validation of the physics models Comparison with experimental data specific to the brachytherapic practice

  21. Low Energy Package Validity range: 250 eV – 100 GeV 250 eV is a “suggested” lower limit data libraries down to 10 eV 1 < Z < 100 Exploit evaluated data libraries(from LLNL): EADL (Evaluated Atomic Data Library) EEDL (Evaluated Electron Data Library) EPDL97 (Evaluated Photon Data Library) for the calculation of total cross section and generation of the final state Photon transmission, 1mm Al shell effects Photon transmission, 1mm Pb shell effects • Compton scattering • Rayleigh scattering • Photoelectric effect • Pair production • Bremsstrahlung • Ionisation • + atomic relaxation

  22. Photon attenuation coefficient Simulation Nucletron Data Stopping power 2N-L=13.1 – =20 - p=0.87 NIST Geant4-LowE Geant4-Standard 2N-S=23.2 – =15 - p=0.08 NIST Geant4-LowE Geant4-Standard Al Al F. Foppiano et al., IST Genova Distance along Z (mm) Microscopic validation Photons and electron physics processes Dosimetric validation Comparison to protocol data, original experimental data

  23. General purpose system For any brachytherapy technique Object Oriented technology Software system designed in terms of Abstract Interfaces For any source type Abstract Factory design pattern Source spectrum and geometry transparently interchangeable

  24. Flexibility of modeling • Configuration of • any brachytherapy technique • any source type • through an Abstract Factory • to define geometry, primary spectrum Abstract Factory • CT DICOM interface • through Geant4 parameterised volumes • parameterisation function: material • Phantom • various materials • water, soft tissue, bone, muscle etc. General purpose software system for brachytherapy No commercial general software exists!

  25. Realistic model of the experimental set-up Radioactive source Spectrum (192Ir, 125I) Geometry Patient Phantom with realistic material model Possibility to interface the system to CT images

  26. Model the source geometry Model of a I-125 brachytherapic sourcegeometry and materials Precise geometry and material model of any type of source Titanium capsule tips Titanium tube Iodium core Golden marker Air Titanium tube: Outer radius:0.40mm Half length:1.84mm Iodium core: Inner radius :0 Outer radius: 0.30mm Half length:1.75mm Golden marker: Inner radius :0 Outer radius: 0.085 mm Half length:1.75mm Air: Outer radius:0.35mm half length:1.84mm Ir-192 source + applicator for superficial brachytherapy Titanium capsule tip: Semisphere radius:0.40mm Ir-192

  27. Effects of source anisotropy Simulation Plato Simulation Plato Data Distance along X (mm) Distance along Z (mm) Effects of source anisotropy Plato-BPS treatment planning algorithm makes some crude approximation ( dependence, no radial dependence) Rely onsimulation for better accuracy than conventional treatment planning software Transverse axis of the source Comparison with experimental data Longitudinal axis of the source Difficult to make direct measurements

  28. source Modeling the patient Modeling a phantom Modeling geometry and materials from CT data of any material (water, tissue, bone, muscle etc.) thanks to the flexibility of Geant4 materials package

  29. DICOM DigitalImagingandCOmunicationinMedicine Computerized Tomography allows to reproduce the real 3D geometry of the patient 3D patient anatomy Acquisition of CT image file Pixels grey tone proportional to material density DICOM is the universal standard for sharing resources between heterogeneous and multi-vendor equipment

  30. Geant4-DICOM interface • Developed by L. Archambault, L. Beaulieu, V.-H. Tremblay (Univ. Laval and l'Hôtel-Dieu, Québec) • Donated to Geant4 for the common profit of the scientific community • under the condition that further improvements and developments are made publicly available to the community • Released with Geant4 5.2, June 2003 in an extended example • with some software improvement by S. Guatelli and M.G. Pia • First implementation, further improvements foreseen

  31. User-friendly interface to facilitate the usage in hospitals AIDA + Anaphe Dosimetric analysis Store simulation information in histograms and ntuples Graphic visualisation of dose distributions Web interface Application configuration Job submission

  32. Dose distribution Analysis of the energy deposit in the phantom resulting from the simulation Isodose curves Dosimetry Simulation of energy deposit through Geant4 Low Energy Electromagnetic package to obtain accurate dose distribution Production threshold: 100 mm AIDA + Anaphe for analysis

  33. Data Analysis source AIDA Histograms Ntuples Data vectors Fit Visualisation of results Abstract Interfaces for Data Analysis Energy deposit (2D histogram) Primary particles Energy Spectrum (1D histogram) http://aida.freehep.org

  34. 0.16 mGy =100% Isodose curves Dosimetry Interstitial brachytherapy Bebig Isoseed I-125 source Superficial brachytherapy MicroSelectron-HDR source Endocavitary Brachytherapy Leipzig applicator

  35. Application configuration Fully configurable from the web • Run modes: • demo • parallel on a cluster • (under test) • on the GRID • (under development) Type of source Phantom configuration # events

  36. Speed adequate for clinic use Parallelisation Transparent configuration in sequential or parallel mode Access to distributed computing resources Transparent access to the GRID through an intermediate software layer

  37. Performance Endocavitary brachytherapy 1M events 61 minutes Superficial brachytherapy 1M events 65 minutes Interstitial brachytherapy 1M events 67 minutes on an “average” PIII machine, as an “average” hospital may own Monte Carlo simulation is not practically conceivable for clinical application, even if more precise

  38. preliminary: further optimisation in progress prototype for an intermediate layer between applications and the GRID Performance: parallel mode Endocavitary brachytherapy 1M events 4 minutes 34’’ Superficial brachytherapy 1M events 4 minutes 25’’ 1M events 4 minutes 36’’ Interstitial brachytherapy Diane has been developed by J. Moscicki E-mail: jakub.moscicki@cern.ch http://www.cern.ch/diane on up to 50 workers, LSF at CERN, PIII machine, 500-1000 MHz Performance adequate for clinical application, but… it is not realistic to expect any hospital to own and maintain a PC farm

  39. Running on the GRID • Via DIANE • Same application code as running on a sequential machine or on a dedicated cluster • completely transparent to the user Distributed Geant4 application A hospital is not required to own and maintain extensive computing resources to exploit the scientific advantages of Monte Carlo simulation for radiotherapy Any hospital – even small ones, or in less wealthy countries, that cannot afford expensive commercial software systems – may have access to advanced software technologies and tools for radiotherapy

  40. Current #Grid setup (computing elements): 5000 events, 2 workers, 10 tasks (500 events each) - aocegrid.uab.es:2119/jobmanager-pbs-workq - bee001.ific.uv.es:2119/jobmanager-pbs-qgrid - cgnode00.di.uoa.gr:2119/jobmanager-pbs-workq - cms.fuw.edu.pl:2119/jobmanager-pbs-workq - grid01.physics.auth.gr:2119/jobmanager-pbs-workq - xg001.inp.demokritos.gr:2119/jobmanager-pbs-workq - xgrid.icm.edu.pl:2119/jobmanager-pbs-workq - zeus24.cyf-kr.edu.pl:2119/jobmanager-pbs-infinite - zeus24.cyf-kr.edu.pl:2119/jobmanager-pbs-long - zeus24.cyf-kr.edu.pl:2119/jobmanager-pbs-medium - zeus24.cyf-kr.edu.pl:2119/jobmanager-pbs-short - ce01.lip.pt:2119/jobmanager-pbs-qgrid Spain Greece Poland Portugal Traceback from a run on CrossGrid testbed Resource broker running in Portugal matchmaking CrossGrid computing elements

  41. Summary • A precise dosimetric system, based on Geant4 • Accurate physics, geometry and material modeling, CT interface • Full dosimetric analysis • AIDA + Anaphe • Simple interface • configuration from WWW • Fast performance • parallel processing • Access to distributed computing resources • GRID Beware: R&D prototype!

  42. General dosimetric system for radiotherapy • The system was developed for endocavitary brachytherapy • It has been extended to all the brachytherapic techniques • It is possible to generalise the system to other radiotherapic techniques Thanks to Object Oriented technique Plug-in system under development

  43. Run Geant4 brachytherapy advanced example

  44. Structure of the brachytherapy example • Brachytherapy example • header files in include/*.hh, source code in src/ *.cc • main in Brachy.cc • macro: VisualisationMacro.mac • Classes • BrachyAnalysisManager • BrachyDetectorConstruction • BrachyDetectorMessenger • BrachyEventAction • BrachyMaterial • BrachyPhantomHit • BrachyPhantomROGeometry • BrachyPhantomSD • BrachyPrimaryGeneratorAction • BrachyPhysicsList • BrachyRunAction • BrachyEventAction • BrachyVisManager

  45. How to run • Define necessary environment variables • source geant4/env.csh • How to compile and link • gmake • How to run • $G4WORKDIR/bin/Linux-g++/Brachy

  46. Details on the brachytherapy advanced example implementation

  47. Mandatory user classes Primary events Physics Detector

  48. Abstract Factories • Configuration of • any brachytherapy technique • any source type • through an Abstract Factory • to define geometry, primary spectrum

  49. BrachyDetectorConstruction Model of a I-125 brachytherapic sourcegeometry and materials Iodium core Air Golden marker Titanium capsule tips Titanium tube Iodium core: Inner radius :0 Outer radius: 0.30mm Half length:1.75mm Titanium tube: Outer radius:0.40mm Half length:1.84mm Air: Outer radius:0.35mm half length:1.84mm Golden marker: Inner radius :0 Outer radius: 0.085 mm Half length:1.75mm Titanium capsule tip: Semisphere radius:0.40mm

  50. BrachyDetectorConstruction::BrachyDetectorConstruction{} BrachyDetectorConstruction BrachyDetectorConstruction::~BrachyDetectorConstruction{} G4VPhysicalVolume* BrachyDetectorConstruction::Construct() { pMaterial-> DefineMaterials(); ConstructSource(); ConstructPhantom(); ConstructSensitiveDetector(); return WorldPhys; }