1 geant4@parisgeant4@paris 08/06/2007 // this : a geant4-based therapeutic

96
1 Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/ ThIS : a Geant4-based Therapeutic Irradiation Simulator Laurent Guigues CREATIS, UMR CNRS 5220, INSERM U 630 Villeurbanne, France

Upload: barnaby-thomas-poole

Post on 12-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

1

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

ThIS : a Geant4-basedTherapeutic Irradiation Simulator

Laurent Guigues

CREATIS, UMR CNRS 5220, INSERM U 630Villeurbanne, France

Page 2: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

2

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Outline

Introduction Goal Architecture

ThIS modules Physics Geometry Sensors Beam

Conclusion

Page 3: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

3

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Goal of the project Rationale :

Several radiotherapy studies involve MC simulations

Multidisciplinary research (physics, medicine, computer science...)

Computer science difficulties (C++) Share development

Goal : Monte-Carlo simulation platform for radiation

therapy studies Photon, Proton, Carbon Cooperative work Accuracy, speed, ease of use, flexibility,

openness ...

Page 4: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

4

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Some technical choices

Geant4 Extensive and extensible physics C++

Associated with an image library : ThISiS (ThIS image suite) Managing 3D volumes :

CT images 3D dose maps

ITK-based http://www.itk.org(Insight Segmentation and Registration Toolkit) Command line only (no display)

Documentation wiki, CVS development (cooperative)

Page 5: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

5

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

ThIS is easy ! High-level macro language (“à la

GATE”) : [Jan et al. 2004] “GATE: a simulation toolkit for

PET and SPECT” Phys. Med. Biol. 49 (2004) 4543-4561.

GATE : Geant4 Application for Tomographic Emission Focused on PET, SPECT simulations

ThIS : Therapeutic Irradiation Simulator Focused on radiation therapy simulations

Page 6: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

6

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

ThIS is easy !

Running a simulation :

ThIS MyBeautifulSimu.mac “/run/beamOn 100”

Page 7: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

7

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

/this/physics/Gamma/SetCutInRegion world 10.0 mm/this/physics/Electron/SetCutInRegion waterBox 3.6 mm/this/physics/Positron/SetCutInRegion PMMACone 4.0 cm# A linac/this/scene/addVolume AcceleratorHead linac/this/scene/linac/parent world/this/scene/linac/position 0 0 100 cm/this/scene/linac/Target/Diameter 5.4 mm/this/scene/linac/Target/Thickness 1 mm/this/scene/linac/Target/Material Tungsten/this/scene/linac/PrimaryCollimator/Diameter 200 mm/this/scene/linac/PrimaryCollimator/Height 101 mm/this/scene/linac/PrimaryCollimator/BaseDiameter 62.9 mm

/this/scene/addSensor HitsAccumulatorsSensor mySensor/this/scene/mySensor/hitType post/this/scene/mySensor/attach waterBox/this/scene/mySensor/halfsize 7 15.0 7 cm/this/scene/mySensor/resolution 70 150 70/this/scene/mySensor/position 0.0 -15.0 0.0 cm/this/scene/mySensor/saveEveryNEvents 200/this/scene/mySensor/baseFilename output.hdr

/this/scene/mySensor/Edep/enable 1/this/scene/mySensor/Edep/uncertainty 1/this/scene/mySensor/Edep/squared 1

ThIS is easy !

Running a simulation :

ThIS MyBeautifulSimu.mac “/run/beamOn 100”

File of macrosFile of macros

Page 8: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

8

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

/this/physics/Gamma/SetCutInRegion world 10.0 mm/this/physics/Electron/SetCutInRegion waterBox 3.6 mm/this/physics/Positron/SetCutInRegion PMMACone 4.0 cm# A linac/this/scene/addVolume AcceleratorHead linac/this/scene/linac/parent world/this/scene/linac/position 0 0 100 cm/this/scene/linac/Target/Diameter 5.4 mm/this/scene/linac/Target/Thickness 1 mm/this/scene/linac/Target/Material Tungsten/this/scene/linac/PrimaryCollimator/Diameter 200 mm/this/scene/linac/PrimaryCollimator/Height 101 mm/this/scene/linac/PrimaryCollimator/BaseDiameter 62.9 mm

/this/scene/addSensor HitsAccumulatorsSensor mySensor/this/scene/mySensor/hitType post/this/scene/mySensor/attach waterBox/this/scene/mySensor/halfsize 7 15.0 7 cm/this/scene/mySensor/resolution 70 150 70/this/scene/mySensor/position 0.0 -15.0 0.0 cm/this/scene/mySensor/saveEveryNEvents 200/this/scene/mySensor/baseFilename output.hdr

/this/scene/mySensor/Edep/enable 1/this/scene/mySensor/Edep/uncertainty 1/this/scene/mySensor/Edep/squared 1

ThIS is easy !

Running a simulation :

ThIS MyBeautifulSimu.mac “/run/beamOn 100”

File of macrosFile of macros

No C++ No compilation

No C++ No compilation

Page 9: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

9

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Documentation

User's GuideUser's Guide

Page 10: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

10

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Using cutsUsing cuts

Page 11: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

11

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

ThIS' Architecture

Based on Geant4 classes

Extend functionality with ThIS classesintermediate level between Geant4 and the user

Provide user macros interaction

Geant4

Core

Classes

ThIS Core Classes

ThIS Macros

Developer

End User

script

Page 12: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

12

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

ThIS' Architecture

ThIS is made up of 5 modules :

Simulation Manager : verbosity, display... Physics : particles, processes and models declaration Scene : description of the content of the world : volumes, materials (patient, beam line...) Beam : description of the particle beam : type of particles, energy spectrum, shape of the beam... Sensors : information that you wish to gather during the simulation(e.g. #of neutrons created in a given volume, spectrum of the gammas produced, energy deposited in some region...). Sensors are activated by Triggers.(similar to G4 Scorers and Filters) Volume 1 Sensor 1

TriggerPhysicsworld

Volume n Sensor m

……Beam

Page 13: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

13

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Main modules

Main modules Physics Geometry (scene) Sensors & Triggers Beam

Run-time vs Compile-time

Page 14: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

14

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList :

Manage 2 main lists : List of groups of particles List of physical processes

Associate at run-time one group of particles with a process according to user's choices

Page 15: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

15

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList :

Manage 2 main lists : List of groups of particles

Groups defined with a predicate

Can have n particules (including 1) List of physical processes

particle->GetParticleName() == “e-”

particle->GetPDGCharge() != 0.0

Page 16: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

16

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList :

Manage 2 main lists : List of groups of particles List of physical processes

A “process” is composed of a name some “models” some parameters

Example : Compton

Standard = G4ComptonScattering LowEn = G4LowEnergyCompton Penelope = G4PenelopeCompton

Page 17: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

17

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList :

Manage 2 main lists : List of groups of particles List of physical processes/this/physics/Gamma/PhotoElectric/lowE/this/physics/Gamma/Compton/lowE/this/physics/Gamma/GammaConversion/lowE/this/physics/Gamma/Rayleigh/lowE

/this/physics/Electron/MultipleScattering/standard/this/physics/Electron/eIonisation/lowE/this/physics/Electron/eBremsstrahlung/lowE

/this/physics/Positron/MultipleScattering/standard/this/physics/Positron/eIonisation/standard/this/physics/Positron/eBremsstrahlung/standard/this/physics/Positron/eplusAnnihilation/standard

Page 18: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

18

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList :

Manage 2 main lists : List of groups of particles List of physical processes/this/physics/Gamma/PhotoElectric/lowE/this/physics/Gamma/Compton/penelope/this/physics/Gamma/GammaConversion/lowE/this/physics/Gamma/Rayleigh/lowE

/this/physics/Electron/MultipleScattering/standard/this/physics/Electron/eIonisation/lowE/this/physics/Electron/eBremsstrahlung/lowE

/this/physics/Positron/MultipleScattering/standard/this/physics/Positron/eIonisation/standard/this/physics/Positron/eBremsstrahlung/standard/this/physics/Positron/eplusAnnihilation/standard

Page 19: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

19

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList : Some hadronic processes (elastic/inelastic) Not all G4 hadronic processes included (yet)

/this/physics/Proton/hadronElastic/standard/LElastic/this/physics/Proton/protonInelastic/standard/BinaryCascade/SetMinEnergy 170 MeV/this/physics/Proton/protonInelastic/standard/BinaryCascade/SetMaxEnergy 500 MeV/this/physics/Proton/protonInelastic/standard/PreCompoundModel/SetMinEnergy 0 MeV/this/physics/Proton/protonInelastic/standard/PreCompoundModel/SetMaxEnergy 170 MeV

/this/physics/GenericIon/genericIonInelastic/standard/BinaryLightIonReaction

/this/physics/Deuteron/hadronElastic/standard/LElastic/this/physics/Deuteron/hadronFission/standard/LFission

/this/physics/Deuteron/deuteronInelastic/standard/BinaryLightIonReaction/SetMinEnergy 80 MeV/this/physics/Deuteron/deuteronInelastic/standard/BinaryLightIonReaction/SetMaxEnergy 20 GeV/this/physics/Deuteron/deuteronInelastic/standard/LEDeuteronInelastic/SetMinEnergy 0 MeV/this/physics/Deuteron/deuteronInelastic/standard/LEDeuteronInelastic/SetMaxEnergy 1000 MeV

Page 20: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

20

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList : Some hadronic processes (elastic/Inelastic) Not all G4 hadronic processes included (yet)

Simple mechanism to add processes from G4 (compile-time) to ThIS (run-time)

Page 21: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

21

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList : Some hadronic processes (elastic/Inelastic) Not all G4 hadronic processes included (yet)

Simple mechanism to add processes from G4 (compile-time) to ThIS (run-time)

// C++ MacrosADD_DISCRETE_PROCESS(ThIS_PhotoElectricEffect_std_PB, PhotoElectric, standard, G4PhotoElectricEffect, ThISPhotonParticlesGroupBuilder);

Page 22: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

22

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList : Some hadronic processes (elastic/Inelastic) Not all G4 hadronic processes included (yet)

Simple mechanism to add processes from G4 (compile-time) to ThIS (run-time)

// C++ MacrosADD_DISCRETE_PROCESS(ThIS_PhotoElectricEffect_std_PB, PhotoElectric, standard, G4PhotoElectricEffect, ThISPhotonParticlesGroupBuilder);

User macro nameUser macro nameGroup of particleGroup of particleStandard G4 process nameStandard G4 process name

Page 23: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

23

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList : Some hadronic processes (elastic/Inelastic) Not all G4 hadronic processes included (yet)

Simple mechanism to add processes from G4 (compile-time) to ThIS (run-time)

// C++ MacrosADD_DISCRETE_PROCESS(ThIS_PhotoElectricEffect_std_PB, PhotoElectric, standard, G4PhotoElectricEffect, ThISPhotonParticlesGroupBuilder);

User macro nameUser macro nameGroup of particleGroup of particle

Page 24: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

24

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList : Some hadronic processes (elastic/Inelastic) Not all G4 hadronic processes included (yet)

Simple mechanism to add processes from G4 (compile-time) to ThIS (run-time)

// C++ MacrosADD_DISCRETE_PROCESS(ThIS_PhotoElectricEffect_std_PB, PhotoElectric, standard, G4PhotoElectricEffect, ThISPhotonParticlesGroupBuilder);

User macro nameUser macro name

Page 25: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

25

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList : Output user selected physics

/this/physics/particleGroupOutput particles-groups.txt/this/physics/particleOutput particles-list.txt/this/physics/processGroupOutput process-groups.txt/this/physics/processOutput process-list.txt/this/physics/particleProcessOutput particle-process.txt

Output available

particles/processes at compile-time

Output available

particles/processes at compile-time

Page 26: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

26

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList : Output user selected physics

/this/physics/particleGroupOutput particles-groups.txt/this/physics/particleOutput particles-list.txt/this/physics/processGroupOutput process-groups.txt/this/physics/processOutput process-list.txt/this/physics/particleProcessOutput particle-process.txt

Output user enabled

particles/processes at run-time

Output user enabled

particles/processes at run-time

Page 27: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

27

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

Gamma (1) : gamma Electron (1) : e- Positron (1) : e+ Neutron (1) : neutron GenericIon (1) : GenericIon Proton (1) : proton Ions (4) : He3 alpha deuteron triton Baryons (32) : anti_lambda anti_lambda_c+ anti_neutron ...Mesons (24) : B+ B- B0 Bs0 D+ D- D0 Ds+ Ds- J/psi anti_B0...Leptons (12) : anti_nu_e anti_nu_mu anti_nu_tau e+ e- mu+ ...Deuteron (1) : deuteron Triton (1) : triton Alpha (1) : alpha He3 (1) : He3 HadronElasticApplicable (28) : alpha anti_lambda anti_neutron...IonIonisationApplicable (5) : GenericIon He3 alpha deuteron ...ChargedAndNotShortLived (39) : B+ B- D+ D- Ds+ Ds- GenericIon ......

Example of some available

groups of particles

Example of some available

groups of particles

Page 28: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

28

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

PhotoElectric-standard : gamma PhotoElectric-lowE : gamma PhotoElectric-penelope : gamma Compton-std : gamma Compton-lowE : gamma Compton-penelope : gammaRayleigh-lowE : gamma Rayleigh-penelope : gamma MultipleScattering-standard : B+ B- D+ D- Ds+ Ds- GenericIon He3 alpha ...eIonisation-standard : e+ e- eIonisation-lowE : e- eIonisation-penelope : e+ e- eBremsstrahlung-standard : e+ e- eBremsstrahlung-lowE : e- eBremsstrahlung-penelope : e+ e- eplusAnnihilation-standard : e+ eplusAnnihilation-penelope : e+ ionIonisation-standard : GenericIon He3 alpha deuteron triton hadronIonisation-standard : B+ B- D+ D- Ds+ Ds- GenericIon He3 alpha ...genericIonInelastic-standard : GenericIon neutronInelastic-standard : neutron deuteronInelastic-standard : deuteron tritonInelastic-standard : triton alphaInelastic-standard : alpha He3Inelastic-standard : He3 protonInelastic-standard : proton

Example of some available

processes

Example of some available

processes

Page 29: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

29

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

GenericIon : MultipleScattering-standard ionIonisation-standard genericIonInelastic-standard(BinaryLightIonReaction[min=def,max=def])

deuteron : MultipleScattering-standard ionIonisation-standard hadronElastic-standard(LElastic[min=def,max=def]) hadronFission-standard(LFission[min=def,max=def]) deuteronInelastic-standard(BinaryLightIonReaction[min=80,max=20000]LEDeuteronInelastic[min=0,max=1000])

e+ : MultipleScattering-standard eIonisation-standard eBremsstrahlung-standard eplusAnnihilation-standard

e- : MultipleScattering-standard eIonisation-lowE eBremsstrahlung-lowE

gamma : PhotoElectric-lowE Compton-lowE GammaConversion-lowE Rayleigh-lowE

neutron : hadronElastic-standard(LEpp[min=def,max=def]) hadronNeutronCapture-standard(LCapture[min=def,max=def]) hadronFission-standard(LFission[min=def,max=def]NeutronHPFission[min=def,max=def])

proton : MultipleScattering-standard hadronIonisation-ziegler2000 hadronElastic-standard(LElastic[min=def,max=def]) protonInelastic-standard(BinaryCascade[min=170,max=500]PreCompoundModel[min=0,max=170])

Example of some user

selected processes

Example of some user

selected processes

Page 30: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

30

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Physics module

ThISPhysicsList : Still several G4 processes to be added But the main mechanisms exist Collaborative work based on user interest

principle : If you need it : add it So : everyone can use it

Drawback : No checking of the physics list validity (except

IsApplicable from G4)

Page 31: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

31

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Cuts

Setting cuts in ThIS Production cuts MaxStepLimiter “cuts” Killing cuts

/this/physics/Gamma/SetCutInRegion world 10.0 mm/this/physics/Electron/SetCutInRegion waterBox 3.6 mm/this/physics/Positron/SetCutInRegion PMMACone 4.0 cm

Page 32: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

32

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Cuts

Setting cuts in ThIS Production cuts MaxStepLimiter “cuts” Killing cuts

/this/physics/Gamma/SetCutInRegion world 10.0 mm/this/physics/Electron/SetCutInRegion waterBox 3.6 mm/this/physics/Positron/SetCutInRegion PMMACone 4.0 cm

Previously user

defined volumes

Previously user

defined volumes

Page 33: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

33

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Cuts

Setting cuts in ThIS Production cuts MaxStepLimiter “cuts” Killing cuts

/this/physics/UserLimits/SetMaxAllowedStep world 2 mm/this/physics/UserLimits/SetMaxAllowedStep waterBox 1 mm/this/physics/Electron/StepLimiter/standard/this/physics/Gamma/StepLimiter/standard

Page 34: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

34

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Cuts

Setting cuts in ThIS Production cuts MaxStepLimiter “cuts” Killing cuts

/this/physics/UserLimits/SetMaxAllowedStep world 2 mm/this/physics/UserLimits/SetMaxAllowedStep waterBox 1 mm/this/physics/Electron/StepLimiter/standard/this/physics/Gamma/StepLimiter/standard

MaxStep limiter for each

region, for each particle

MaxStep limiter for each

region, for each particle

Page 35: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

35

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Cuts

Setting cuts in ThIS Production cuts MaxStepLimiter “cuts” Killing cuts

/this/physics/UserLimits/SetUserMinRange waterBox 0.1 mm/this/physics/UserLimits/SetUserMinRange world 1 mm/this/physics/UserLimits/SetUserMinEkine waterBox 10 keV/this/physics/UserLimits/SetUserMinEkine world 100 keV/this/physics/Electron/UserSpecialCuts/standard

Page 36: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

36

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Cuts

Setting cuts in ThIS Production cuts MaxStepLimiter “cuts” Killing cuts

/this/physics/UserLimits/SetUserMinRange waterBox 0.1 mm/this/physics/UserLimits/SetUserMinRange world 1 mm/this/physics/UserLimits/SetUserMinEkine waterBox 10 keV/this/physics/UserLimits/SetUserMinEkine world 100 keV/this/physics/Electron/UserSpecialCuts/standard

“Kill” particle according to

range/energy threshold

“Kill” particle according to

range/energy threshold

Page 37: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

37

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Main modules

Main modules Physics Geometry (scene) Sensors & Triggers Beam

Run-time vs Compile-time

Page 38: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

38

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Main modules

Main modules Physics Geometry (scene) Sensors & Triggers Beam

Run-time vs Compile-time

Page 39: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

39

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

#=================================================# World volume/this/scene/addVolume Box world/this/scene/world/halfsize 2 2 2 m/this/scene/world/material_name Air

#=================================================# A water box/this/scene/addVolume Box waterBox/this/scene/waterBox/parent world/this/scene/waterBox/position 0.0 0.0 0.0 cm/this/scene/waterBox/halfsize 15.0 15.0 15.0 cm/this/scene/waterBox/material_name Water

Scene module

ThISDetectorConstructor : Dynamic (run-time) scene description Add volumes Set properties (position, material ...)

Volume typeVolume type

Volume nameVolume name

Page 40: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

40

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

ThISDetectorConstructor : Some G4 simple shapes (Box, Cone ...)

#=================================================# A PMMA cone/this/scene/addVolume Cone PMMACone/this/scene/PMMACone/parent world/this/scene/PMMACone/position 5.0 -3.0 40.0 cm/this/scene/PMMACone/rmin1 0 cm/this/scene/PMMACone/rmax1 3.7 cm/this/scene/PMMACone/rmin2 0 cm/this/scene/PMMACone/rmax2 0 cm/this/scene/PMMACone/dz 78 mm/this/scene/PMMACone/sphi 0 deg/this/scene/PMMACone/dphi 22 deg/this/scene/PMMACone/material_name PMMA

Volume typeVolume type

Volume nameVolume name

Page 41: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

41

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

ThISDetectorConstructor : Some G4 simple shapes (Box, Cone ...) Complex user defined shapes (in progress)

#=================================================# An linac/this/scene/addVolume AcceleratorHead linac/this/scene/linac/parent world/this/scene/linac/position 0 0 100 cm/this/scene/linac/Target/Diameter 5.4 mm/this/scene/linac/Target/Thickness 1 mm/this/scene/linac/Target/Material Tungsten/this/scene/linac/PrimaryCollimator/Diameter 200 mm/this/scene/linac/PrimaryCollimator/Height 101 mm/this/scene/linac/PrimaryCollimator/BaseDiameter 62.9 mm/this/scene/linac/FlatteningFilter/ConeDiameter 54.4 mm...

Volume typeVolume type Volume nameVolume name

Page 42: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

42

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Page 43: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

43

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

ThISDetectorConstructor : Some G4 simple shapes (Box, Cone ...) Complex user defined shapes (in progress)

#=================================================# An linac/this/scene/addVolume AcceleratorHead linac/this/scene/linac/parent world/this/scene/linac/position 0 0 100 cm/this/scene/linac/Target/Diameter 5.4 mm/this/scene/linac/Target/Thickness 1 mm/this/scene/linac/Target/Material Tungsten/this/scene/linac/PrimaryCollimator/Diameter 200 mm/this/scene/linac/PrimaryCollimator/Height 101 mm/this/scene/linac/PrimaryCollimator/BaseDiameter 62.9 mm/this/scene/linac/FlatteningFilter/ConeDiameter 54.4 mm...

Volume typeVolume type Volume nameVolume name

Page 44: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

44

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

ThISDetectorConstructor : Some G4 simple shapes (Box, Cone ...) Complex user defined shapes (in progress)

#=================================================# An linac/this/scene/addVolume AcceleratorHead linac/this/scene/linac/parent world/this/scene/linac/position 0 0 100 cm/this/scene/linac/Target/Diameter 5.4 mm/this/scene/linac/Target/Thickness 1 mm/this/scene/linac/Target/Material Tungsten/this/scene/linac/PrimaryCollimator/Diameter 200 mm/this/scene/linac/PrimaryCollimator/Height 101 mm/this/scene/linac/PrimaryCollimator/BaseDiameter 62.9 mm/this/scene/linac/FlatteningFilter/ConeDiameter 54.4 mm...

Volume typeVolume type Volume nameVolume name

Page 45: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

45

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

ThISDetectorConstructor : Some G4 simple shapes (Box, Cone ...) Complex user defined shapes (in progress)

#=================================================# An linac/this/scene/addVolume AcceleratorHead linac/this/scene/linac/parent world/this/scene/linac/position 0 0 100 cm/this/scene/linac/Target/Diameter 5.4 mm/this/scene/linac/Target/Thickness 1 mm/this/scene/linac/Target/Material Tungsten/this/scene/linac/PrimaryCollimator/Diameter 200 mm/this/scene/linac/PrimaryCollimator/Height 101 mm/this/scene/linac/PrimaryCollimator/BaseDiameter 62.9 mm/this/scene/linac/FlatteningFilter/ConeDiameter 54.4 mm...

Volume typeVolume type Volume nameVolume name

Page 46: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

46

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

ThISDetectorConstructor : Some G4 simple shapes (Box, Cone ...) Complex user defined shapes (in progress) Simple mechanism to add volumes from G4

(compile-time) to ThIS (run-time) Collaborative work based on user’s interest

principle : If you need it : add it So : everyone can use it

Page 47: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

47

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

/this/scene/object/this/scene/object/parent

/this/scene/addVolume/this/scene/object/material

/this/scene/object/position/this/scene/object/rotation

/this/scene/object/halfsize

Page 48: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

48

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

class ThISBoxVolume : public ThISVolume{

public:ThISBoxVolume(ThISDetectorConstruction* dc, G4String path, G4String name);~ThISBoxVolume();

THISMACRO_INIT_VOLUME_CREATOR(ThISBoxVolume);

virtual G4String GetTypeName() { return "Box";}virtual void ConstructSolid();

void SetHalfSize(G4ThreeVector v) { mHalfSize = v; }G4ThreeVector GetHalfSize() const { return mHalfSize; }

void PrintInfo();protected:

ThISBoxVolumeMessenger * pMessenger;G4ThreeVector mHalfSize;

ThISBoxVolume(); };

Page 49: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

49

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

//============================================================ThISBoxVolume::ThISBoxVolume ( ThISDetectorConstruction* dc, G4String path, G4String name )

: ThISVolume(dc,path,name) {

mHalfSize = G4ThreeVector(0.5*m, 0.5*m, 0.5*m);pMessenger = new ThISBoxVolumeMessenger(this);

}//============================================================ThISBoxVolume::ThISBoxVolume()

: pMessenger(0){}//============================================================ThISBoxVolume::~ThISBoxVolume() {

if (pMessenger) delete pMessenger;}//============================================================void ThISBoxVolume::ConstructSolid(){

G4String solidName = GetInstanceName()+"_solid";SetSolid ( new G4Box (solidName, mHalfSize.x(), mHalfSize.y(), mHalfSize.z()) );

}//============================================================void ThISBoxVolume::PrintInfo(){

ThISVolume::PrintInfo();std::cout << "\t HalfSize = " << G4BestUnit(GetHalfSize(),"Length") << std::endl;

}//============================================================

From ThISNamedObjectFrom ThISNamedObject

From ThISVolumeFrom ThISVolume

Page 50: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

50

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

class ThISBoxVolumeMessenger: public ThISVolumeMessenger{

public:ThISBoxVolumeMessenger ( ThISBoxVolume* box );~ThISBoxVolumeMessenger();void SetNewValue ( G4UIcommand*, G4String );

protected:ThISBoxVolume * boxVolume;G4UIcmdWith3VectorAndUnit * halfsizeCmd;

};//===============================================================ThISBoxVolumeMessenger::ThISBoxVolumeMessenger ( ThISBoxVolume* box )

: ThISVolumeMessenger(box), boxVolume(box){

G4String name = boxVolume->GetInstanceName();G4String path = boxVolume->GetPath();

G4String n = path+"/halfsize";halfsizeCmd = new G4UIcmdWith3VectorAndUnit(n, this); halfsizeCmd->SetGuidance(G4String("Set "+name+"’s size"));halfsizeCmd->SetDefaultUnit("cm");

}//===============================================================void ThISBoxVolumeMessenger::SetNewValue ( G4UIcommand* command, G4String newValue ){

if ( command == halfsizeCmd )boxVolume->SetHalfSize(halfsizeCmd->GetNew3VectorValue(newValue));

else ThISVolumeMessenger::SetNewValue(command,newValue);

}

Page 51: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

51

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

ThISDetectorConstructor : Some G4 simple shapes (Box, Cone ...) Complex user defined shapes (in progress) Simple mechanism to add volumes from G4

(compile-time) to ThIS (run-time) Collaborative work based on user’s interest

principle : If you need it : add it So : everyone can use it

Materials : Re-use the Material Database mechanism from

Gate (enhanced to allow multiple Dbs)

/this/scene/materialDatabase StandardMaterials.db/this/scene/materialDatabase PhantomMaterials.db

Page 52: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

52

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

ThISDetectorConstructor : Easy to add elements/materials

[Elements]

Hydrogen: S= H ; Z= 1. ; A= 1.01 g/moleHelium: S= He ; Z= 2. ; A= 4.003 g/moleCarbon: S= C ; Z= 6. ; A= 12.01 g/moleNitrogen: S= N ; Z= 7. ; A= 14.01 g/mole

[Materials]

PMMA: d=1.195 g/cm3; n=3 ; state=Solid +el: name=Hydrogen ; f=0.080541 +el: name=Carbon ; f=0.599846 +el: name=Sulfur; f=0.319613

Gadox: d=7.23 g/cm3; n=4 ; state=Solid +el: name=Gadolinium ; f=0.736 +el: name=Sulfur ; f=0.149 +el: name=Oxygen; f=0.112

+el: name=Terbium; f=0.003

GateMaterials.dbGateMaterials.db

Page 53: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

53

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

ThISDetectorConstructor : Insert CT image in simulation

CT slices

Geant4 /

ThIS

Geant4 /

ThIS

Page 54: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

54

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation

1. Transform CT image into composition image

1. Calibrate Scanner using phantom [schneider et al. 2000]

2. Transform CT image : => image of labels + label to material table

=> Provided in ThISiS

1. Insert label image in G4 simulation

Page 55: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

55

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation

1 G4Box per voxel !! High memory cost : not feasible in real-world cases

ParametrisedVolume / NestedParametrisedVolume

Low memory cost, G4 state-of-the-art, Time consuming

Two ways to reduce time1) Reduce image complexity2) Change G4 navigation algorithm

Page 56: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

56

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation1) Reduce image complexity2) Change G4 navigation algorithm

Page 57: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

57

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation1) Reduce image complexity

Voxels

Page 58: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

58

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation1) Reduce image complexity

Merge adjacent voxels having similar materials :Image Segmentation problem

Voxels

Page 59: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

59

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation1) Reduce image complexity

Merge adjacent voxels having similar materials :Image Segmentation problem

a) Isothetic Volume : Segment image in parallelepipeds (G4Box) Special case : Octree segmentation [Hubert-

Tremblay et al. 2006]

Isothetic OctreeVoxels

Page 60: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

60

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation1) Reduce image complexity

Merge adjacent voxels having similar materials :Image Segmentation problem

a) Isothetic Volume : Segment image in parallelepipeds (G4Box) Special case : Octree segmentation [Hubert-

Tremblay et al. 2006]b) Regionalised Volume : arbitrary shape

[Sarrut and Guigues subm.]

Isothetic OctreeVoxels Regions

Page 61: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

61

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation1) Reduce image complexity

Merge adjacent voxels having similar materials :Image Segmentation problem

Segmentation methods available in ThISiS

Isothetic OctreeVoxels Regions

Page 62: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

62

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation1) Reduce image complexity

Available image representations in ThIS :- ImageBoxes (multiple G4Box)- ImageParameterised (G4VParameterisedVolume) - ImageNestedParameterised

(G4VNestedParam...Volume)- ImageIsothetic- ImageRegionalised

Isothetic OctreeVoxels Regions

Page 63: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

63

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation Image volumes

Label image (Analyze, raw formats ...) Label to material information

/this/scene/addVolume ImageBoxes patient/this/scene/patient/parent world/this/scene/patient/image lung.hdr/this/scene/patient/materials lung.lab2mat

Page 64: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

64

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation Image volumes

Label image (Analyze, raw formats ...) Label to material information

/this/scene/addVolume ImageBoxes patient/this/scene/patient/parent world/this/scene/patient/image lung.hdr/this/scene/patient/materials lung.lab2mat

Volume typeVolume type

Volume nameVolume name

Page 65: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

65

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation Image volumes

Label image (Analyze, raw formats ...) Label to material information

/this/scene/addVolume ImageBoxes patient/this/scene/patient/parent world/this/scene/patient/image lung.hdr/this/scene/patient/materials lung.lab2mat

Volume typeVolume type

Volume nameVolume name

Page 66: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

66

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation Image volumes

Label image (Analyze, raw formats ...) Label to material information

/this/scene/addVolume ImageBoxes patient/this/scene/patient/parent world/this/scene/patient/image lung.hdr/this/scene/patient/materials lung.lab2mat

Volume typeVolume type

Volume nameVolume name

0 Air1 Lung2 SoftTissue...8 ConnectiveTissue9 Bone_110 Bone_2...

Page 67: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

67

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Results

Octree

Arbitrary regions

Page 68: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

68

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Results

Page 69: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

69

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Results

Speed up

(time NPV

/ time RV)

Dose difference RV-NPV (%)

Page 70: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

70

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation1) Reduce image complexity2) Change G4 navigation algorithm

Page 71: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

71

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Insert images in simulation1) Reduce image complexity2) Change G4 navigation algorithm

[Jiang & Paganetti 2004] : in progress

Page 72: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

72

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module

Image volumes : Tradeoff :

Accuracy / Speed Large number of regions :

small compression, slow simulation good accuracy

Small number of regions : good compression, fast simulation low accuracy

Still a lot to of work to be done

Page 73: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

73

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Scene module ThISDetectorConstructor :

Done : main mechanism simple base shapes / complex volumes

To do : Boolean operations Add other shapes

Image volumes Associated image preparation tools (ThISiS)

Calibration Segmentation

Optimized volumes ImageIsothetic (octree segmented images) ImageRegionalised (segmented images)

Optimized navigator : in progress

Page 74: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

74

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Main modules

Main modules Physics Geometry (scene) Sensors & Triggers Beam

Run-time vs Compile-time

Page 75: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

75

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Main modules

Main modules Physics Geometry (scene) Sensors & Triggers Beam

Run-time vs Compile-time

Page 76: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

76

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensor module

ThISSensor

ThIS DOES NOT use the G4SensitiveDetector mechanism

Sensor = measure/display Something : dose deposit (uncertainty),

number of B+ emitters ... Somewhere : globally, in a volume, surface ... Sometimes : at the end of the simulation, at

each track, at each steps, every n events ...

Page 77: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

77

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

Triggers All sensors can be associated with a trigger :

Including, excluding particle from a measurement Sorting on energy ...

/this/scene/addTrigger ParticleName T2/this/scene/T2/include all/this/scene/T2/exclude e-/this/scene/T2/exclude gamma/this/scene/T2/exclude proton

/this/scene/addTrigger ParticleEnergy T3/this/scene/T3/energyMin 100 keV/this/scene/T3/energyMax 10 TeV

/this/scene/addTrigger And T4/this/scene/T4/add T2/this/scene/T4/add T3

/this/scene/ANYSENSOR/trigger T4

Page 78: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

78

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

Triggers All sensors can be associated with a trigger :

Including, excluding particle from a measurement Sorting on energy ...

/this/scene/addTrigger ParticleName T2/this/scene/T2/include all/this/scene/T2/exclude e-/this/scene/T2/exclude gamma/this/scene/T2/exclude proton

/this/scene/addTrigger ParticleEnergy T3/this/scene/T3/energyMin 100 keV/this/scene/T3/energyMax 10 TeV

/this/scene/addTrigger And T4/this/scene/T4/add T2/this/scene/T4/add T3

/this/scene/ANYSENSOR/trigger T4

All particles

except e-,

gamma, proton

All particles

except e-,

gamma, proton

Page 79: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

79

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

Triggers All sensors can be associated with a trigger :

Including, excluding particle from a measurement Sorting on energy ...

/this/scene/addTrigger ParticleName T2/this/scene/T2/include all/this/scene/T2/exclude e-/this/scene/T2/exclude gamma/this/scene/T2/exclude proton

/this/scene/addTrigger ParticleEnergy T3/this/scene/T3/energyMin 100 keV/this/scene/T3/energyMax 10 TeV

/this/scene/addTrigger And T4/this/scene/T4/add T2/this/scene/T4/add T3

/this/scene/ANYSENSOR/trigger T4

With energy

in this range

With energy

in this range

Page 80: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

80

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

ThISSensor

Two examples of sensors :

Particles counter Dose sensor (energy deposited + uncertainty)

Page 81: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

81

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

ThISParticleCounter

/this/scene/addSensor ParticleCounter MyCounter/this/scene/MyCounter/track pre/this/scene/MyCounter/attach waterBox/this/scene/MyCounter/verbose/event 1

Sensor typeSensor type

Sensor nameSensor name

Page 82: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

82

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

> ThIS MySimu.mac “/run/beamOn 5”R1 ****************** Begin of run 1 ********************B1 ======= Generating particle 1=======B2 _ (1) C12[0.0] pos.=(-1.19545,201.124,0) energy=2640 dir.=(0,-1,0)T0 C12 1 0 2.64 GeV 0 fmT0 C12 1 0 0 eV 15.1 cmT0 e- 1022 1 87.9 keV 0 fm ionIoniT0 e- 1021 1 0 eV 390.6 mum ionIoniT0 e- 1020 1 93.3 keV 0 fm ionIoniT0 e- 1020 1 0 eV 393.3 mum ionIoniT0 e- 1019 1 96.3 keV 0 fm ionIoniT0 e+ 921 919 11.3 MeV 0 fm LowEnConversionT0 e+ 921 919 0 eV 4.4 cm LowEnConversionT0 e- 1016 1 0 eV 2.2 mm ionIoniT0 e- 768 1 0 eV 949.4 mum ionIoniT0 gamma 1023 768 3.2 keV 0 fm LowEnBremT0 gamma 1023 768 0 eV 9.2 mum LowEnBremT0 e- 1024 1023 2.6 keV 0 fm LowEnPhotoElecT0 e- 1024 1023 0 eV 1.4 mm LowEnPhotoElecT0 e- 767 1 136.3keV 0 fm ionIoni

Output Kinetic energyKinetic energy

Page 83: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

83

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

> ThIS MySimu.mac “/run/beamOn 5”R1 ****************** Begin of run 1 ********************B1 ======= Generating particle 1=======B2 _ (1) C12[0.0] pos.=(-1.19545,201.124,0) energy=2640 dir.=(0,-1,0)T0 C12 1 0 2.64 GeV 0 fmT0 C12 1 0 0 eV 15.1 cmT0 e- 1022 1 87.9 keV 0 fm ionIoniT0 e- 1021 1 0 eV 390.6 mum ionIoniT0 e- 1020 1 93.3 keV 0 fm ionIoniT0 e- 1020 1 0 eV 393.3 mum ionIoniT0 e- 1019 1 96.3 keV 0 fm ionIoniT0 e+ 921 919 11.3 MeV 0 fm LowEnConversionT0 e+ 921 919 0 eV 4.4 cm LowEnConversionT0 e- 1016 1 0 eV 2.2 mm ionIoniT0 e- 768 1 0 eV 949.4 mum ionIoniT0 gamma 1023 768 3.2 keV 0 fm LowEnBremT0 gamma 1023 768 0 eV 9.2 mum LowEnBremT0 e- 1024 1023 2.6 keV 0 fm LowEnPhotoElecT0 e- 1024 1023 0 eV 1.4 mm LowEnPhotoElecT0 e- 767 1 136.3keV 0 fm ionIoni

Output Track lengthTrack length

Page 84: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

84

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

> ThIS MySimu.mac “/run/beamOn 5”R1 ****************** Begin of run 1 ********************B1 ======= Generating particle 1=======B2 _ (1) C12[0.0] pos.=(-1.19545,201.124,0) energy=2640 dir.=(0,-1,0)T0 C12 1 0 2.64 GeV 0 fmT0 C12 1 0 0 eV 15.1 cmT0 e- 1022 1 87.9 keV 0 fm ionIoniT0 e- 1021 1 0 eV 390.6 mum ionIoniT0 e- 1020 1 93.3 keV 0 fm ionIoniT0 e- 1020 1 0 eV 393.3 mum ionIoniT0 e- 1019 1 96.3 keV 0 fm ionIoniT0 e+ 921 919 11.3 MeV 0 fm LowEnConversionT0 e+ 921 919 0 eV 4.4 cm LowEnConversionT0 e- 1016 1 0 eV 2.2 mm ionIoniT0 e- 768 1 0 eV 949.4 mum ionIoniT0 gamma 1023 768 3.2 keV 0 fm LowEnBremT0 gamma 1023 768 0 eV 9.2 mum LowEnBremT0 e- 1024 1023 2.6 keV 0 fm LowEnPhotoElecT0 e- 1024 1023 0 eV 1.4 mm LowEnPhotoElecT0 e- 767 1 136.3keV 0 fm ionIoni

Output Creator processCreator process

Page 85: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

85

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

ExampleB10 220

B11 647

B12 8

B13 15

B14 1

B15 1

B5 1

B9 28

C10 112

C11 780

C12 11663

C13 444

C14 296

C15 8

C16 5

C6 1

C9 5

N11 3

N12 3

N13 71

N14 407

N15 782

N16 37

N17 1

proton 205703

neutron 53128

H2 5

H3 2

H4 9

deuteron 1320

triton 265

He2 5

He3 291

He4 2

He5 17

He6 24

He8 3

alpha 5810

Li3 1

Li4 16

Li5 34

Li6 66

Li7 137

Li9 6

Be10 152

Be11 1

Be12 2

Be4 1

Be5 1

Be6 24

Be7 108

Be8 1195

Be9 65

O13 12

O14 111

O15 523

O16 3218

O17 141

O18 11

F15 9

F16 17

F17 7

F19 1

Ne16 1

Ne18 3

Ne20 9

Ne21 1

Ne22 1

e- 935202

gamma 63306

e+ 1321

anti_nu_e 24

pi0 1

Production for 10 000 C12

(220 MeV/u), in water

(Nuclear reaction : 39 %)

Production for 10 000 C12

(220 MeV/u), in water

(Nuclear reaction : 39 %)

Page 86: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

86

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

Dose / Edep measurement sensor Define a 3D matrix Store information (edep, dose ...) and

associated uncertainty Allow to dump in files every n events Several accumulation types

Page 87: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

87

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

Dose / Edep measurement

/this/scene/addSensor HitsAccumulatorsSensor mySensor/this/scene/mySensor/hitType post/this/scene/mySensor/attach waterBox/this/scene/mySensor/halfsize 7 15.0 7 cm/this/scene/mySensor/resolution 70 150 70/this/scene/mySensor/position 0.0 -15.0 0.0 cm/this/scene/mySensor/saveEveryNEvents 200/this/scene/mySensor/baseFilename output.hdr

/this/scene/mySensor/Edep/enable 1/this/scene/mySensor/Edep/uncertainty 1/this/scene/mySensor/Edep/squared 1

Type / NameType / Name

Page 88: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

88

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

Dose / Edep measurement

/this/scene/addSensor HitsAccumulatorsSensor mySensor/this/scene/mySensor/hitType post/this/scene/mySensor/attach waterBox/this/scene/mySensor/halfsize 7 15.0 7 cm/this/scene/mySensor/resolution 70 150 70/this/scene/mySensor/position 0.0 -15.0 0.0 cm/this/scene/mySensor/saveEveryNEvents 200/this/scene/mySensor/baseFilename output.hdr

/this/scene/mySensor/Edep/enable 1/this/scene/mySensor/Edep/uncertainty 1/this/scene/mySensor/Edep/squared 1

Accumulation typeAccumulation type

Page 89: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

89

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

Dose / Edep measurement

/this/scene/addSensor HitsAccumulatorsSensor mySensor/this/scene/mySensor/hitType post/this/scene/mySensor/attach waterBox/this/scene/mySensor/halfsize 7 15.0 7 cm/this/scene/mySensor/resolution 70 150 70/this/scene/mySensor/position 0.0 -15.0 0.0 cm/this/scene/mySensor/saveEveryNEvents 200/this/scene/mySensor/baseFilename output.hdr

/this/scene/mySensor/Edep/enable 1/this/scene/mySensor/Edep/uncertainty 1/this/scene/mySensor/Edep/squared 1

Size, resolution, positionSize, resolution, position

Page 90: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

90

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Carbon depth dose (Bragg peak)

Example

Page 91: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

91

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Sensors module

Like for the physics and geometry modules, new Sensors and Triggers are very easily created

Page 92: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

92

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Conclusion

ThIS is a Geant4-based Therapeutic Irradiation Simulator :

Make G4 features available at run-time Designed to be easily extensible Easy to use : no C++, easy scripting Ideal for prototyping, testing, running large

numbers of simulations with different parameters...

Optimised for image-based simulations

Page 93: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

93

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Conclusion

ANR grant funding : “SimCa2 : Simulation for Cancer therapy by

Carbon beams” Full time computer science engineer for ThIS

Collaborations Geant4 France group (Sébastien Incerti) OpenGate collaboration (Irène Buvat, ...)

Share common developments

Page 94: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

94

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Future Work

Intensive validation ! Optimized navigation in images Cluster / grid version : in progress Repository of beam lines ...

Page 95: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

95

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Openness

ThIS is an Open Source project Cooperative spirit :

CVS repository Wiki documentation Repository of Beam Lines ? Share experiences ?

Try It !If you are interested, contact us

Page 96: 1 Geant4@ParisGeant4@Paris 08/06/2007 // ThIS : a Geant4-based Therapeutic

96

Geant4@Paris 08/06/2007 http://www.creatis.insa-lyon.fr/rio/ThIS/

Thank you for your attention

Any question ?