S. Guatelli, CPS Innovations, Knoxville, 13 th -21 st January 2004 Brachytherapy exercise.

Slides:



Advertisements
Similar presentations
The Geant4 Kernel: Status and Recent Developments John Apostolakis, Gabriele Cosmo – CERN / PH Makoto Asai – SLAC On behalf the Geant4 collaboration April.
Advertisements

Computer Simulation for Emission Tomography: Geant4 and GATE Xiao Han Aug
JustinMind: Dynamic Panels
1 COMPARISON BETWEEN PLATO ISODOSE DISTRIBUTION OF A 192 IR SOURCE AND THOSE SIMULATED WITH GEANT4 TOOLKIT F. Foppiano 1, S. Agostinelli 1, S. Garelli.
Using Macros and Visual Basic for Applications (VBA) with Excel
Tutorial 12: Enhancing Excel with Visual Basic for Applications
GAMOS tutorial Histogram and Scorers Exercises
A general purpose dosimetric system for brachytherapy
14 User Documents and Examples I SLAC Geant4 Tutorial 3 November 2009 Dennis Wright Geant4 V9.2.p02.
14 Overview of Geant4 Examples 2 nd Finnish Geant4 Workshop 6-7 June 2005 Dennis Wright (SLAC)
S. Guatelli, M.G Pia, INFN Genova S. Guatelli ( CERN, INFN Genova ) CERN, 13 November 2002 Users Workshop Where to put analysis in Geant4 Applications.
14 User Documents and Examples II SLAC Geant4 Tutorial 17 May 2007 Dennis Wright Geant4 V8.3.
Particle Detector Simulation (I) Using Geant4 Ahmed Sayed Hamed (master student)
1 M.G. Pia et al. The application of GEANT4 simulation code for brachytherapy treatment Maria Grazia Pia INFN Genova, Italy and CERN/IT
The brachytherapy advanced example Susanna Guatelli (CERN/INFN)
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Japan.
ROOT An object oriented HEP analysis framework.. Computing in Physics Physics = experimental science =>Experiments (e.g. at CERN) Planning phase Physics.
Tabular Editors for Geant4 Geant4 Geometry Editor and Geant4 Physics Editor CHEP 2000 at Padova Hajime Yoshida Naruto University of Education.
14 Overview of Geant4 Examples Geant4 Tutorial 8-10 March 2004 Dennis Wright (SLAC)
Spreadsheet-Based Decision Support Systems Chapter 22:
Gamma calorimeter for R3B: first simulation results INDEX ● The calGamma Geant4 simulation ( a short introduction ) ● Crystal and geometry selection: –
R 3 B Gamma Calorimeter Agenda. ● Introduction ● Short presentation on the first ● Task definition for R&D period ( )
IE 411/511: Visual Programming for Industrial Applications
M.G. Pia et al. Brachytherapy at IST Results from an atypical Comparison Project Stefano Agostinelli 1,2, Franca Foppiano 1, Stefania Garelli 1, Matteo.
Validation and TestEm series Michel Maire for the Standard EM group LAPP (Annecy) July 2006.
User Documents and Examples I Sébastien Incerti Slides thanks to Dennis Wrigth, SLAC.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial Plug-in’s Exercises Pedro Arce Dubois CIEMAT
GAMOS tutorial X-ray Exercises
User Documents and Examples II Geant4 Tutorial at Marshall Space Flight Center 18 April 2012 Dennis Wright (SLAC) Geant4 V9.5.
A General Purpose Brachytherapy Software Simulation + Analysis (isodose calculation) 2/10/2002 Geant4 Workshop CERN Susanna Guatelli Univ. and INFN Genova.
S. Guatelli, M.G Pia, INFN Genova G. Cosmo, S. Guatelli, M.G Pia Salamanca, July 2002
Medical Accelerator F. Foppiano, M.G. Pia, M. Piergentili
Geant4 Visualization 1 OpenGL DAWN VRML. Visualization Visualization Seeing what one does usually helps One can visualize geometry, hits, trajectories.
6th April 2005Wah-kai Ngai1 First Example in Geant4 3rd HK simulation group meeting.
LAV Software Status Emanuele Leonardi – Tommaso Spadaro Photon Veto WG meeting – 2015/03/24.
Monte Carlo /12/07. What is Geant ? Monte Carlo simulation tool for nuclear and particle physics Set up detectors –Sensitive detector which returns.
7 June 2005 Visualization & GGE Demo J. Perl 1 HepRep/WIRED DAWN OpenGL Geant4 Visualization & GGE Demo Joseph Perl, SLAC.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
C++ / G4MICE Course Session 5 Materials in G4MICE Units in G4MICE Visualisation in G4MICE G4MICE Modelling.
Exercises Alberto Ribon Alberto Ribon CERN PH/SFT CERN PH/SFT Geant4 tutorial, May 2005.
N 0 primary photons generated N d primary photons detected Determination of the photon mass attenuation coefficients Check on ParentID( ) Energy value.
Geant4 examples Sébastien Incerti On behalf of the Geant4 collaboration with special thanks to Luciano Pandola, INFN.
Maria Grazia Pia Hands-on exercises Unit 2 Modelling the experimental set-up.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial RadioTherapy Exercises Pedro Arce Dubois CIEMAT
Geant4 release 5.1 summary Gabriele Cosmo EP/SFT.
Update G4builder issues Talk written almost entirely by Stan Bentvelsen with a few updates from Christopher Lester ATLAS G4 Workshop December 2000 CAMBRIDGE.
Chapter – 8 Software Tools.
Radiation study of the TPC electronics Georgios Tsiledakis, GSI.
1 Giuseppe G. Daquino 26 th January 2005 SoFTware Development for Experiments Group Physics Department, CERN Background radiation studies using Geant4.
1 Exercises 0 Go inside the “hadrontherapy” directory: cd hadrontherapy Copy the Hadrontherapy example to your home folder: cp –r $G4INSTALL/examples/advanced/hadrontherapy.
Flair development for the MC TPS Wioletta Kozłowska CERN / Medical University of Vienna.
Dae-Hyun Kim Dept. of Biomedical Engineering The Catholic University of Korea Department of Biomedical Engineering Research Institute.
Starting with an example PART I Set your environment up and get a Geant4 example.
Workshop Geant4 Presentation September 14 th, 2007 FASTRAD V3.
Unit 4 Retrieving information from the simulation
Unit 3 Selecting the physics configuration in the simulation
Working in the Forms Developer Environment
L. Pandola INFN, Gran Sasso National Laboratories
F. Foppiano3, S. Guatelli2, J. Moscicki1, M.G. Pia2 CERN1 INFN Genova2
GAMOS tutorial PET Exercises
GAMOS tutorial Shielding Exercises
User Documents and Examples I
The Hadrontherapy Geant4 advanced example
GAMOS tutorial Plug-in’s Exercises
Geant4 course - exercices
Advanced Examples Alex Howard, Imperial College, UK
The Geant4 Hadrontherapy Advanced Example
Lab 2: Information Retrieval
Presentation transcript:

S. Guatelli, CPS Innovations, Knoxville, 13 th -21 st January Brachytherapy exercise

Plan of this exercise Learn the basics of how to build a simple user application –Mandatory user classes –Optional user actions Learn the basics of how to use interactive facilities –User Interface –Visualisation –Histogramming How we’ll proceed –Illustrate design and implementation basic features –Propose a simple exercise on the same topic –Show the solution

User requirements (main ones listed only) The user shall be able to define a radioactive source in a phantom The user shall be able to define initial position, direction and energy spectra of primary particles The user shall be able to change the absorber material of the phantom The user shall be able to define electrons, positrons, photons The user shall be able to define the electromagnetic processes involved The user shall be able to calculate the total absorbed energy in the phantom –3D distribution in the volume –2D distribution in the plane containing the source The dose should be collected in 1. mm wide voxels The user shall be able to visualise the geometry involved and the trajectories of the particles The application provides the simulation of dose distribution of brachytherapic sources in a phantom

OOAD

Implementation Exercise Brachy –header files in include/*.hh, source code in src/ *.cc –main in Brachy.cc –macro: VisualisationMacro.mac Classes –BrachyDetectorConstruction –BrachyPrimaryGeneratorAction –BrachyPhysicsList –BrachyRunAction –BrachyEventAction -BrachyVisManager -….

How to run Define necessary environment variables –source setup.csh Define analysis –setenv G4ANALYSIS_USE 1 How to compile and link –gmake How to run –$G4WORKDIR/bin/Linux/Brachy Default macro :VisualisationMacro.mac

Part 1 Use case: model a radioactive source in a phantom 1.Use case: model a 192 Ir brachytherapy seed 2.Use case: model a water phantom 3.Use case: visualise the geometry 4.Exercise: model a soft tissue phantom 5.Exercise: select phantom material from the UI 6.Exercise: model a 125 I brachytherapy seed 7.Use case: model the radioactive source as a primary generator of monochromatic photons 8.Exercise: model the spectrum of a 125 I source

Run Brachy1 1.It will appear: the visualization of the box 2.It will appear: |idle> (interactive mode) 3.type /run/beamOn number of events 4.The simulation is executed 5.Type exit Default visualization driver OGLIX defined in VisualisationMacro.mac About Visualization OGLIX : Immediate visualization No images saved! DAWN : Interactive panel images saved At the |idle> prompt, type help, information about interactive commands

More about visualisation How to change driver: in VisualisationMacro.mac /vis/open OGLIX #/vis/open DAWNFILE #/vis/open OGLIX /vis/open DAWNFILE How to work with OGLIX: At the |idle> prompt Type help Type the number corresponding to /vis/ Information about visualization commands Eg. rotation of the geometry magnification… How to work with DAWN: The interactive panel appears: devices: choose the format of the image camera: choose the geometry parameters (rotation, magnification...)

Model a 192 Ir brachytherapy seed Open BrachyDetectorConstruction in the editor Follow the guided tour by Susanna How the geometry is build: ExpHall: world volume Phantom: Box Capsule of the source Iridium core the mother volume is the containing volume !

Before starting Documentation: click on documentation click on User’s Guide: For Application Developers very useful !

Exercise: model a soft tissue phantom Composition of soft tissue material (from NIST data base) Guidance elements –define necessary elements material –define tissue material –associate the tissue material to the phantom volume elementFractional mass H C N O Na Mg P S Cl K Ca Fe Zn Start: brachyExe1

Exercise: select phantom material from UI Select a water/tissue phantom –The user shall be able to change interactively the material of the phantom Guidance –create a BrachyDetectorMessenger –Create a BrachyDetectorMessenger pointer in BrachyDetectorConstruction –Create the member function SetMaterial in BrachyDetectorConstruction –Help! Novice example N02 Solution : brachyExe2

Titanium capsule tips Titanium tube Iodium core: Inner radius :0 Outer radius: 0.30mm Half length:1.75mm Air: Outer radius:0.35mm half length:1.84mm Titanium tube: Outer radius:0.40mm Half length:1.84mm Titanium capsule tip: Semisphere radius:0.40mm Model a I-125 brachytherapic source in brachyExe2 Model the source geometry Air Iodium core Golden marker Golden marker: Inner radius :0 Outer radius: mm Half length:1.75mm Precise geometry and material model of any type of source Mean gamma energy :28.45keV

Exercise: model a 125 I brachytherapy seed Guidance elements, materials –define necessary elements, materials solids, logical volumes, physical volumes –define solids, logical volumes, physical volumes –suggestion: proceed incrementally (i.e. implement one/few features at a time, compile, verify that it is OK, add a new feature etc…) Solution brachyExe3 Pay attention to overlapping volumes!

Exercise: model a source spectrum Description of the spectrum Guidance –In brachyExe3 –Change in the BrachyPrimaryGeneratorAction Solution brachyExe4 Energy(keV)Probability

Part 2 Use case: calculate the energy deposit in a phantom due to a radioactive source 9.Use case: generate physics interactions in the phantom 10.Exercise: select alternative physics processes 11.Exercise: modify the production thresholds 12.Use case: collect the energy deposit in the phantom 13.Exercise: model the hits as consisting of the energy deposited in each voxel and the coordinates of the voxel centre 14.Use case: produce a 1-D histogram with the energy deposited in the phantom 15.Exercise: produce a 2-D histogram with the dose distribution in the phantom

Exercise: select alternative e.m. processes Replace LowEnergy processes with standard ones –For gamma and e- Change the production thresholds to 0.2 mm for all the particles involved Guidance –Novice Example N02 –User Guide: for Application Developers –Physics ReferenceManual Solution brachyExe5 In brachyExe4…

Collect the energy deposit in a phantom

Exercise: hits consisting of Edep, x,y,z Add Edep –Associate Edep to the voxel coordinates Guidance –In brachyExe5 –In BrachyEventAction –Take inspiration from Solution brachyExe6 i=((*CHC)[h])->GetZID(); k=((*CHC)[h])->GetXID(); …….

Analysis How to store information in 1D histograms, in 2D histograms and ntuples

Exercise: add a 2-D histogram Produce a 2-D histogram with the dose distribution in the phantom Guidance –In brachyExe6 –Complete the method FillHistogramWithEnergy(…) in BrachyAnalysisManager –Similar implementation as in 1-D histogram –Store the information (x, z, Edep) in the 2D histogram in BrachyEventAction –Edep is the weight Solution brachyExe7