4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 1 Physics processes Software process and OOAD.

Slides:



Advertisements
Similar presentations
Maria Grazia Pia, INFN Genova and CERN1 An OO model for intra-nuclear transport Maria Grazia Pia L. Bellagamba, A. Brunengo, E. Di Salvo for the Geant4.
Advertisements

Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
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.
Introduction to Ionizing Radiation
The MSC Process in Geant4
Modified Moliere’s Screening Parameter and its Impact on Calculation of Radiation Damage 5th High Power Targetry Workshop Fermilab May 21, 2014 Sergei.
Development of an Interface for Using EGS4 Physics Processes in Geant4 K.Murakami (KEK) 27/Mar./
Pedro Arce Point detector scoring 1 Point detector scoring in GEANT4 Pedro Arce, (CIEMAT) Miguel Embid (CIEMAT) Juan Ignacio Lagares (CIEMAT) Geant4 Event.
Electromagnetic Physics I Tatsumi KOI SLAC National Accelerator Laboratory (strongly based on Michel Maire's slides) Geant4 v9.2.p02 Standard EM package.
Hadronic and Electromagnetic Physics: special applications V.Ivanchenko BINP, Novosibirsk, Russia & CERN, Geneve, Switzerland.
Slides prepared by Rose Williams, Binghamton University Chapter 13 Interfaces and Inner Classes.
Electromagnetic Physics I Joseph Perl SLAC National Accelerator Laboratory (strongly based on Michel Maire's slides) Geant4 v9.3.p01 Standard EM package.
Development of an Interface for Using EGS4 Physics Processes in Geant4 K.Murakami (KEK) 27/Mar./
Maria Grazia Pia, INFN Genova CERN, 26 July 2004 Background of the Project.
1 M.G. Pia et al. The application of GEANT4 simulation code for brachytherapy treatment Maria Grazia Pia INFN Genova, Italy and CERN/IT
Maria Grazia Pia, INFN Genova Low Energy Electromagnetic Physics Maria Grazia Pia INFN Genova
Software Development, Programming, Testing & Implementation.
Maria Grazia Pia, INFN Genova and CERN1 Geant4 Hadron Kinetic Model for intra-nuclear transport Maria Grazia Pia CERN/IT and INFN, Sezione di Genova L.Bellagamba.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Stopping Power The linear stopping power S for charged particles in a given absorber is simply defined as the differential energy loss for that particle.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
Maria Grazia Pia, INFN Genova Low Energy Electromagnetic Physics R. Capra, S. Chauvie, G.A.P. Cirrone, G. Cuttone, F. Di Rosa, Z. Francis, S. Guatelli,
Physics data management tools: computational evolutions and benchmarks Mincheol Han 1, Chan-Hyeung Kim 1, Lorenzo Moneta 2, Maria Grazia Pia 3, Hee Seo.
RUP Implementation and Testing
St. Petersburg State University. Department of Physics. Division of Computational Physics. COMPUTER SIMULATION OF CURRENT PRODUCED BY PULSE OF HARD RADIATION.
Dec 2000 GEANT4 Workshop - David Bailey Hadronic Interactions 1 Checking Basic Characteristics of Hadronic Shower Parameterizations in GHEISHA / GEANT4.
Summary of Work Zhang Qiwei INFN - CIAE. Validation of Geant4 EM physics for gamma rays against the SANDIA, EPDL97 and NIST databases.
Cross section for potential scattering
Validation and TestEm series Michel Maire for the Standard EM group LAPP (Annecy) July 2006.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Geant4 Electromagnetic Physics Introduction V.Ivanchenko, M.Maire, M.Verderi  Process interface  Physics categories  Electromagnetic physics  PhysicsList.
© ITEDO Software 2004 S1000D and CGM Dieter Weidenbrueck Paris July 21, 2004.
Maria Grazia Pia, INFN Genova Test & Analysis Project aka “statistical testing” Maria Grazia Pia, INFN Genova on behalf of the T&A team
P Spring 2003 L9Richard Kass Inelastic ep Scattering and Quarks Elastic vs Inelastic electron-proton scattering: In the previous lecture we saw that.
Eurostat Expression language (EL) in Eurostat SDMX - TWG Luxembourg, 5 Jun 2013 Adam Wroński.
Event Data History David Adams BNL Atlas Software Week December 2001.
Assessing the influence on processes when evolving the software architecture By Larsson S, Wall A, Wallin P Parul Patel.
Hadronic schower models in geant4 The frameworks J.P. Wellisch, CERN/EP, CHEP J.P. Wellisch, CERN/EP, CHEP 2000.
Status of particle_hp Pedro Arce Emilio Mendoza Daniel Cano-Ott (CIEMAT, Madrid)
ENDF/B-VI Coupled Photon-Electron Data for Use in Radiation Shielding Applications by Dermott E. Cullen Lawrence Livermore National Laboratory & Robert.
1 dE/dx  Let’s next turn our attention to how charged particles lose energy in matter  To start with we’ll consider only heavy charged particles like.
1 Status and Plans for Geant4 Physics Linear Collider Simulation Workshop III 2-5 June 2004 Dennis Wright (SLAC)
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Introduction What is detector simulation? A detector simulation program must provide the possibility of describing accurately an experimental setup (both.
Gamma ray interaction with matter A) Primary interactions 1) Coherent scattering (Rayleigh scattering) 2) Incoherent scattering (Compton scattering) 3)
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
TPG digitization update Phone conference 18/2 -04 Rikard Sandström Geneva University.
Validation of EM Part of Geant4
Upgrade of G4Penelope models Luciano Pandola INFN – LNGS for the Geant4 EM Working Groups 15 th Geant4 Workshop, ESTEC, October 4 th -8 th, 2010.
Geant4 on GPU prototype Nicholas Henderson (Stanford Univ. / ICME)
Geant4 release 5.1 summary Gabriele Cosmo EP/SFT.
Maria Grazia Pia, INFN Genova and CERN1 Geant4 highlights of relevance for medical physics applications Maria Grazia Pia INFN Genova and CERN.
Neutrons in gases Mary Tsagri CERN PH / SFT Tuesday, 23 February 2010 RD51 mini week.
1 Giuseppe G. Daquino 26 th January 2005 SoFTware Development for Experiments Group Physics Department, CERN Background radiation studies using Geant4.
Vacuum specifications in Linacs J-B. Jeanneret, G. Rumolo, D. Schulte in CLIC Workshop 09, 15 October 2009 Fast Ion Instability in Linacs and the simulation.
1 Multimedia Development Team. 2 To discuss phases of MM production team members Multimedia I.
IPM Sim 2016 workshop Discussion sessions – main points.
New approach of Geant4 Low Energy EM models (from version 9.3) Luciano Pandola INFN, Laboratori del Gran Sasso MaGe Joint Workshop, Munich, January 2010.
Geant4 Simulation for KM3 Georgios Stavropoulos NESTOR Institute WP2 meeting, Paris December 2008.
by students Rozhkov G.V. Khalikov E.V. scientific adviser Iyudin A.F.
Elastic Scattering in Electromagnetism
Hadronic physics validation of Geant4
The Hadrontherapy Geant4 advanced example
Chapter 2: Operating-System Structures
The Geant4 Hadrontherapy Advanced Example
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Chapter 2: Operating-System Structures
PHYS 3446 – Lecture #14 Wednesday,March 7, 2012 Dr. Brandt
PHYS 3446, Spring 2012 Andrew Brandt
Presentation transcript:

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 1 Physics processes Software process and OOAD

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 2 Overview At the end of May, Sebastién, Ziad and me started a working group for the development of low energy processes in the water medium Goal of the working group was the development of step-by-step electromagnetic interactions for Electrons between 7 eV and 10 keV Protons and alpha particles between 1 keV and 10 MeV The processes considered are Elastic scattering (relevant only for electrons) Excitation of liquid water molecules Ionization of liquid water molecules

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 3 Software process The development of this set of processes has adopted a rigorous software process Requirements Vision document User requirement document Both available in the Geant4 documentation CVS repository Analysis and design Design model Available in the Geant4 documentation CVS repository Implementation Developed code is available in Geant4 CVS repository Testing Unit test Validation (will be planned) Traceability (in progress)

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 4 Elastic scattering Step by step model Relevant only for electrons Analytical total cross section between 7.5 eV and 10 keV Two analytical angular distribution models Brenner model between 7.5 and 200 eV Emfietzoglou model between 200 eV and 10 keV Electrons below 7.5 eV must be killed and energy must be deposited (UR) Water molecule tracking after interaction is neglected e - Total cross section e - Angular distribution Energy deposit No models EmfietzoglouBrenner Rutherford + screening factor 0 eV 7.5 eV 200 eV 10 keV e - + H 2 0

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 5 Ionization processes Step by step model Six incoming particles considered e -, p, H, ++, +, He 5 different ionization levels Energy deposit depends on the ionization level Total cross sections (for each ionization level) are tabulated Tables are precalculated and stored in files Angular distribution of the outgoing electron is analytical Each incoming particle has a different model Energy distribution of the outgoing electron is Analytical for protons below 300 keV Based on tables for protons above 300 keV and other particles Tables for outgoing electrons must interpolate on two parameters Energy of the incoming particle Energy of the outgoing electron Ionized water molecule tracking after interaction is neglected p energy distribution e -, H, ++, +, He energy distribution TabulatedAnalytical Tabulated 300 keV p + H 2 0 p + H e - + Energy Deposit

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 6 Electrons exchange Step by step model Three incoming particles considered p, ++, + ++ can strip one or two electrons to the water molecule Total cross sections Analytical for protons Tables for alphas Energy of the outgoing particle and the energy deposit depend on the incoming particle and on the number of electrons stripped Direction changes are neglected Ionized water molecule tracking after interaction is neglected Three incoming particles considered H, +, He can release one or two electrons Tabulated total cross section Energy of the outgoing particle and the energy deposit depend on the incoming particle and on the number of electrons stripped Direction changes are neglected for both particles and electrons Water molecule tracking after interaction is neglected p + H 2 0 H + H Energy Deposit H + H 2 0 p + H e - + Energy Deposit

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 7 Excitation Step by step model Six incoming particles considered e -, p, H, ++, +, He Excited water molecules are not described Excitation energy is deposited 5 different excitation levels Energy deposit depends on the excitation level Total cross sections (for each excitation level) Analytical for protons Tables for other particles Direction changes are neglected Excited water molecule tracking after interaction is neglected p + H 2 0 p + H 2 0 *

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 8 Constraint requirements UR1: The user shall be able to activate different processes in different geometry regions Feature present in Geant4 UR2: To reduce computation time, particles below a chosen cut-off energy could be dumped UR3: The user must be warned if processes are used on other materials than liquid water UR4: Cross section tables must be stored in a file in order to reduce the computation time UR5: Cross section tables must be interpolated Feature present in Geant4 Low Energy package

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 9 The package The design presented in next slides heavily uses policy based classes This class structure was designed by me in the past weeks during the second design iteration of the package The design iteration was necessary, as we discovered some new requirements that needed more flexibility The code implemented on this new design in mainly a rearrangement of what was done togheter with Sebastién and Ziad in May

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 10 Policy based classes Policy Based classes are parametrized classes that implement an algorithm delegating some operations to their class parameters, called policies Policy based classes have something in common with Strategy Design Pattern But with some difference Do not require that policies inherit from specific base classes This means a weaker dependency of the policy and the policy based class from the policy interface. In complex situations this makes a design more flexible and open to extensions They are compile bound In other words there is no need of virtual methods, resulting in faster execution code and classes that allocate less memory VInterpolationAlgorithmConcreteProcess ConcreteLinearInterpolation

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 11 Problems domain decomposition Water processes algorithms (policy based) Total cross section policies Angular distribution policies Analytical models Tables-based models 1-dimensional interpolated datasets (cross sections) 2-dimensional interpolated datasets (energy distributions for ionization) Electrons charged Ions Manager Files tables generation Testable process Data files Different algorithms will be able to use same policies The same algorithm will be able to use different policies

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 12 ✓ Done DNA Processes design G4VLowEnergyTestableDiscreteProcess For unit testing purposes access to the protected GetMeanFreePath method is needed All the classes inheriting from this class could be tested with a common unit test G4VDNAProcessInWater Policy based class Verifies if the medium is water Calculates water atomic density

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 13 G4VDNAProcessInWater G4VDNAProcessInWater inherits from G4VLowEnergyTestableDiscreteProcess TotalCrossSectionPolicy (parameter) G4VDNAProcessInWater uses the total cross section provided by this class in order to evaluate the mean free path in the water medium The class must provide a BuildTotalCrossSection method and the incoming particle definition FinalStatesPolicy (parameter) At this level only generic methods (BuildFinalStatesData, KillIncomingParticle) are requested Further constraints on this policy are set by classes inheriting from G4VDNAProcessInWater ✓ Done

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 14 Elastic scattering process G4DNAElectronElasticScatteringInWater Inherits from G4VDNAProcessInWater Requires an additional constraint to the FinalStatesPolicy That policy must provide a RandomizeCosTheta method to obtain the cos() variable distributed according to the considered model Implements the PostStepDoIt We want stress the following features Generic implementation Only one electron as outgoing particle Uniform distribution along No energy deposit The model-dependent details are left to the policies Total cross section distribution ✓ Done

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 15 ✓ Done Elastic scattering policies To crate concrete elastic scattering processes, policy classes must be provided G4DNARutherfordTotalCrossSectionPolicy Provides the Rutherford formula corrected with a screening factor T his class is parametrized with the energy limit of the process G4DNABrennerAngularDistributionPolicy Implements the angular distribution of the Brenner model G4DNAEmfietzoglou- AngularDistributionPolicy Implements the angular distribution of the Emfietzoglou model

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 16 Unit test I developed the code to test all the processes inheriting from G4VLowEnergyTestableDiscreteProcess that do not generate secondaries Methods tested IsApplicable PostStepDoIt GetMeanFreePath Energy range, number of events, incoming particle, process name and material can be selected by command line It can be easily generalized to processes with secondaries Other non-DNA discrete processes will profit of this unit test In particular this unit test code has been used for the polarized Rayleigh testing ✓ Done

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 17 Unit test results Total cross section Angular distribution Phys. Med. Biol. 45 (2000) Solid line: our model J. Phys. D: Appl. Phys. 33 (2000) Unit test ● Brenner ● Emfietzoglou 10 eV 100 eV 200 eV 500 eV 1 keV

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 18 Ionization G4DNAIonizationInWater Inherits from G4VDNAProcessInWater There are 5 ionization levels TotalCrossSectionPolicy must have an additional method to decide on which ionization level the interaction happens The process requires additional constraint to the FinalStatesPolicy The energy of the stripped electron The direction of the stripped electron Direction of incoming particle after the interaction will be calculated by conservation law

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 19 Ionization final states policies The energy distribution of the stripped electron is tabulated for several ionization processes But not for low energy protons ionization A common policy for all these processes can be developed It will be parametrized with the energy limits of the dataset

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 20 Charge change (Decrease) G4DNAChargeDecreaseInWater Inherits from G4VDNAProcessInWater ++ can go into + or He TotalCrossSectionPolicy must have an additional method to decide how many electrons are stripped during the interaction The process requires an additional constraint to the FinalStatesPolicy The electrons binding energy balance (E Water - E Particle ) Energy deposit, direction and energy of the outgoing particle are calculated in the PostStepDoIt method

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 21 Charge change (Increase) G4DNAChargeDecreaseInWater Inherits from G4VDNAProcessInWater He can go into + or ++ TotalCrossSectionPolicy must have an additional method to decide how many electrons are released during the interaction The process requires an additional constraint to the FinalStatesPolicy The electrons binding energy Energy deposit, direction and energy of the outgoing particles are calculated in the PostStepDoIt method

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 22 Excitation G4DNAIonizationInWater Inherits from G4VDNAProcessInWater There are 5 excitation levels TotalCrossSectionPolicy must have an additional method to decide on which ionization level the interaction happens The process requires additional constraint to the FinalStatesPolicy The excitation energy of each one of the 5 levels Direction of incoming particle after the interaction will be calculated by conservation law

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 23 G4VEMDataset G4ShellEMDataset Upgraded Upgraded ✓ Done Upgraded Upgraded G4EMDataset G4CompositeEMDataset Upgraded Upgraded EM Data set upgrades DNA processes are based on tables based on theoretical calculations In order to have an acceptable initialization time, tables are calculated separately and stored into files Tables generation must be part of the Geant4 code For this reason I have upgraded EM datasets introducing Save and Set methods (up to now Load and Get methods were enough) I designed and implementated the upgrades on all the affected all EM datasets I tested G4DNACrossSectionDataSet with a specifically developed unit test

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 24 ✓ Done Tabulated total cross sections Total cross section of all the processes is calculated from tables (except protons processes and elastic scattering) G4DNATotalCrossSectionFromFilePolicy provides this capability to all these processes The class is parametrised with the energy limits of the data table and the name of the data table file I have implemented the class, but not tested yet

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 25 Generic ions singleton H, +, He are ions not officially provided by Geant4 Singleton G4DNAGenericIonsManager will provide an unique instance of these ions for all processes (policies) that need them G4DNAGenericIonsManager > Instance() > GetIon(...)

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 26 Design road map Current processes design still miss two problem domains A system of classes to manage bidimensional datasets and bidimensional interpolation algorithms Current low energy design covers data interpolation from ℝ 1 to ℝ n Ionization processes requires to extend it from ℝ 2 to ℝ n Other processes in the Low Energy package require a similar extension (Bremsstrahlung and Ionization) It would be nice to extend current data management scheme in order to manage interpolations from ℝ m to ℝ n The system of classes the generates data tables Data tables are based on theoretical calculations and the code to generate them should be provided within Geant4 according to Geant4 coding standards Currently tables are generated by Sebastién and Ziad with private C code

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 27 Implementation road map Inelastic processes will be developed soon We will profit of this meeting week to continue the development on some of the inelastic processes Inonization processes cannot be implemented until bidiensional dataset classes are not designed After this meeting week Sebastién and Ziad will be mainly in charge for the processes development I will continue covering all the technical aspects Design, bi-dimensional interpolation implementation, generic ions singleton, unit test code upgrade, coding support and review, unit testing support and review, physics validation

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 28 Testing and validation overview Elastic processes has been tested 1D Data management classes has been tested With small extensions current Unit test can be used for all the processes we plan to develop We should start studying how to validate these processes Should be nice to provide a validation of the processes that will be inserted in the next December release

4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 29 Summary Since May a lot of valuable work has been done Requirements URD and VD are written and published on CVS Design Covers almost all the problem domains we have to face Published on CVS Implementation Liquid water medium testing Needed by all processes Elastic processes Brenner model Emfietzoglou model Data management upgrades G4VEMDataset G4EMDataSet G4CompositeDataSet G4ShellDataset DNA specific data management G4DNACrossSectionDataSet Tabulated total cross sections Policy used by several inelastic processes Testing Elastic processes unit test Highly reusable unit test G4DNACrossSectionDataSet unit test