S. Guatelli, M.G Pia, INFN Genova G. Cosmo, S. Guatelli, M.G Pia Salamanca, 15-19 July 2002

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

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.
GAMOS tutorial Histogram and Scorers Exercises
A general purpose dosimetric system for brachytherapy
Geant4 v9.2p02 Particle Gun Makoto Asai (SLAC) Geant4 Tutorial Course.
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)
Budker Inst. of Physics IHEP Protvino MEPHI Moscow Pittsburg University.
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)
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.
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.
S. Guatelli, CPS Innovations, Knoxville, 13 th -21 st January Brachytherapy exercise.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial Plug-in’s Exercises Pedro Arce Dubois CIEMAT
GAMOS tutorial X-ray Exercises
A General Purpose Brachytherapy Software Simulation + Analysis (isodose calculation) 2/10/2002 Geant4 Workshop CERN Susanna Guatelli Univ. and INFN Genova.
Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
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.
Technological Transfer from HEP to Medical Physics How precise Brachytherapy MonteCarlo simulations can be applied in Clinics Reality Problem: How to achieve.
Monte Carlo /12/07. What is Geant ? Monte Carlo simulation tool for nuclear and particle physics Set up detectors –Sensitive detector which returns.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
7 June 2005 Visualization & GGE Demo J. Perl 1 HepRep/WIRED DAWN OpenGL Geant4 Visualization & GGE Demo Joseph Perl, SLAC.
Evaluation of absorbed fractions for beta- gamma radionuclides in ellipsoidal volumes of soft tissue through Geant4 Ernesto Amato 1, Domenico Lizio 2 and.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Maria Grazia Pia INFN Genova Salamanca, July 2002
C++ / G4MICE Course Session 5 Materials in G4MICE Units in G4MICE Visualisation in G4MICE G4MICE Modelling.
Geant4 Training 2006 Short Course Katsuya Amako (KEK) Gabriele Cosmo (CERN) Susanna Guatelli (INFN Genova) Aatos Heikkinen (Helsinki Institute of Physics)
May 20, 2005Wah-kai Ngai1 Basic Visualization Tutorial Using Geant4.
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.
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.
Geant4 Training 2004 Short Course Katsuya Amako (KEK) Gabriele Cosmo (CERN) Giuseppe Daquino (CERN) Susanna Guatelli (INFN Genova) Aatos Heikkinen (Helsinki.
1 Exercises 0 Go inside the “hadrontherapy” directory: cd hadrontherapy Copy the Hadrontherapy example to your home folder: cp –r $G4INSTALL/examples/advanced/hadrontherapy.
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
Background simulations: update and simulations of absorbed dose
L. Pandola INFN, Gran Sasso National Laboratories
F. Foppiano3, S. Guatelli2, J. Moscicki1, M.G. Pia2 CERN1 INFN Genova2
GAMOS tutorial PET Exercises
Geant4 Geometry Objects Persistency using ROOT
GAMOS tutorial Shielding Exercises
User Documents and Examples I
Basics of a user application
F. Foppiano, S. Guatelli, B. Mascialino, M. G. Pia, M. Piergentili
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Introductory Course PTB, Braunschweig, June 2009
Short Course Siena, 5-6 October 2006
The Hadrontherapy Geant4 advanced example
Introductory Course ORNL, May 2008
Short Course IEEE NSS/MIC 2003 Katsuya Amako (KEK) Makoto Asai (SLAC)
GAMOS tutorial Plug-in’s Exercises
Geant4 course - exercices
The Geant4 Hadrontherapy Advanced Example
Presentation transcript:

S. Guatelli, M.G Pia, INFN Genova G. Cosmo, S. Guatelli, M.G Pia Salamanca, July Brachytherapy exercise

S. Guatelli, M.G Pia, INFN Genova 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

S. Guatelli, M.G Pia, INFN Genova Basics of user classes See lecture on Monday Would you like to refresh an overview of Geant4 user classes?

S. Guatelli, M.G Pia, INFN Genova User requirements (main ones listed only) The user shall be able to change the absorber material of the phantom The user shall be able to change interactively the brachytherapic source The user shall be able to put sources in different positions inside the phantom Low Energy electromagnetic processes should be available 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 1mm voxels The user shall be able to define the isodose curves in the phantom The user shall be able to visualize the geometry involved and the trajectories of the particles The application provides the simulation of dose distribution of brachytherapic sources in a phantom

S. Guatelli, M.G Pia, INFN Genova Part 1 Use case: model a brachytherapy seed and 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 monocromatic photons 8.Exercise: model the spectrum of a 125 I source

S. Guatelli, M.G Pia, INFN Genova OOAD

S. Guatelli, M.G Pia, INFN Genova Implementation Exercise Brachy1 –header files in include/*.hh, source code in src/ *.cc –main in Brachy.cc –macro: initInter.mac Classes –BrachyDetectorConstruction –BrachyPrimaryGeneratorAction –BrachyPhysicsList –BrachyRunAction –BrachyEventAction - BrachyVisManager

S. Guatelli, M.G Pia, INFN Genova How to run Define necessary environment variables –source setup_brachy.csh How to compile and link –gmake How to run –$G4WORKDIR/bin/Linux/Brachy Default macro :initInter.mac

S. Guatelli, M.G Pia, INFN Genova tomorrow today

S. Guatelli, M.G Pia, INFN Genova 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 InitInter.mac About Visualization OGLIX : Immediate visualization No images saved! DAWN : Interactive panel images saved At the |idle> prompt, type help, information about interactive commands

S. Guatelli, M.G Pia, INFN Genova 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 !

S. Guatelli, M.G Pia, INFN Genova

More about visualization How to change driver: in initInter.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...)

S. Guatelli, M.G Pia, INFN Genova Before starting Documentation: click on documentation click on User’s Guide: For Application Developers very useful !

S. Guatelli, M.G Pia, INFN Genova 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 Solution:Brachy2 elementFractional mass H C N O Na Mg P S Cl K Ca Fe Zn

S. Guatelli, M.G Pia, INFN Genova 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 :Brachy3

S. Guatelli, M.G Pia, INFN Genova Iodium core 3 tubs: Iodium core Air Titanium capsule tip (box) 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: Box Side :0.80mm Exercise:Model a simplified I-125 brachytherapic source geometry and materials Change the geometry of the source in BrachyDetector Construction Mean gamma energy :28.45keV

S. Guatelli, M.G Pia, INFN Genova 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 Brachy4 In Brachy4 the initial energy of primary particles is KeV Pay attention to overlapping volumes: the simulation seems to ‘run’ but after few events it stops to work, it seems dead !

S. Guatelli, M.G Pia, INFN Genova Model a monocromatic photon source Open BrachyPrimaryGeneratorAction in the editor Follow the guided tour by Susanna

S. Guatelli, M.G Pia, INFN Genova Exercise: model a source spectrum Description of the spectrum Guidance –Change in the BrachyPrimaryGeneratorAction –Introduce an array (my array) with 3 cells(corr.3probabilities) in the constructor –In the GeneratePrimaries method: Solution Brachy5 Energy(keV)Probability G4double random=G4UniformRand(); G4double sum=0; G4int i=0; while(sum<random) {sum +=myarray[i]; i++;} ……….. Generation of Random numbers G4UniformRand() returns a number between 0 and 1 To be implemented !

S. Guatelli, M.G Pia, INFN Genova What you learned today The design of a basic user application The mandatory user classes The optional user classes How to describe materials How to model a simple geometry –How to implement a DetectorConstruction How to visualise geometry and tracks How to control features from the user interface How to model the primary generator –How to implement a UserPrimaryGeneratorAction

S. Guatelli, M.G Pia, INFN Genova Part 2 Use case: calculate the energy deposit in a phantom from a brachytherapy seed 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

S. Guatelli, M.G Pia, INFN Genova

Generate physics interactions Open BrachyPhysicsList in the editor Follow the guided tour by Susanna

S. Guatelli, M.G Pia, INFN Genova Exercise: select alternative processes Replace LowEnergy processes with standard ones –For gamma and e- Change the production thresholds to 0.1mm for all the particles involved Guidance –User Guide: for Application Developers –Physics ReferenceManual –standard processes in geant4/source/processes/electromagnetic/standard/ Solution Brachy6

S. Guatelli, M.G Pia, INFN Genova Collect energy deposited in the phantom Open BrachyROGeometry, BrachyHit… in the editor Follow the guided tour by Susanna Example :Brachy7This is the Geant4/examples/advanced/brachytherapy

S. Guatelli, M.G Pia, INFN Genova

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

S. Guatelli, M.G Pia, INFN Genova Produce a 1-D histogram Open BrachyAnalysis, Brachy… in the editor Follow the guided tour by Susanna

S. Guatelli, M.G Pia, INFN Genova

Exercise: add a 2-D histogram Produce a 2-D histogram with the dose distribution in the phantom Guidance –x, z, Edep in BrachyEventAction –Edep is the weight –Introduce 2-D histogram in BrachyAnalysisManager –Similar implementation as in 1-D histogram Solution Brachy9

S. Guatelli, M.G Pia, INFN Genova What you learned today How to select particles, physics processes and production thresholds –How to implement a PhysicsList How to model the detector response –read-out geometry, hits How to produce histograms in your simulation applications