Maria Grazia Pia, INFN Genova Design and performance evaluation of generic programming techniques in a R&D prototype of Geant4 physics CHEP 2009 Prague,

Slides:



Advertisements
Similar presentations
Maria Grazia Pia, INFN Genova Conceptual challenges and computational progress in X-ray simulation Maria Grazia Pia INFN Genova, Italy Maria Grazia Pia.
Advertisements

Maria Grazia Pia, INFN Genova New techniques in Monte Carlo simulation: experience with a prototype of generic programming application to Geant4 physics.
Maria Grazia Pia, INFN Genova PhysicsLists in Geant4 Advanced Examples Geant4.
Geant4 for Microdosimetry
Maria Grazia Pia, INFN Genova Atomic Relaxation Models A. Mantero, B. Mascialino, Maria Grazia Pia INFN Genova, Italy P. Nieminen ESA/ESTEC
Hee Seo, Chan-Hyeung Kim, Lorenzo Moneta, Maria Grazia Pia Hanyang Univ. (Korea), INFN Genova (Italy), CERN (Switzerland) 18 October 2010 Design, development.
Maria Grazia Pia, INFN Genova Low Energy Electromagnetic Physics Maria Grazia Pia INFN Genova on behalf of the Low Energy Electromagnetic WG Geant4 Workshop.
Maria Grazia Pia, INFN Genova 1 Part V The lesson learned Summary and conclusions.
Geant4-Genova Group Validation of Susanna Guatelli, Alfonso Mantero, Barbara Mascialino, Maria Grazia Pia, Valentina Zampichelli INFN Genova, Italy IEEE.
Max-Planck-Institut für extraterrestrische Physik and Halbleiterlabor, Germany Space Sciences Lab., UC Berkeley, USA CNES, Toulouse, France INFN Genova.
Maria Grazia Pia, INFN Genova PhysicsLists in Geant4 Advanced Examples M.G.
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
Maria Grazia Pia, INFN Genova – CHEP 2001 ow Energy Electromagnetic Physics ow Energy Electromagnetic Physics S. Chauvie,G. Depaola, F. Longo, V. Ivanchenko,
Validation of the Bremsstrahlung models Susanna Guatelli, Barbara Mascialino, Luciano Pandola, Maria Grazia Pia, Pedro Rodrigues, Andreia Trindade IEEE.
Maria Grazia Pia Systematic validation of Geant4 electromagnetic and hadronic models against proton data Systematic validation of Geant4 electromagnetic.
Budker Inst. of Physics IHEP Protvino MEPHI Moscow Pittsburg University.
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.
Maria Grazia Pia, INFN Genova CHEP May 2012 New York City, NY, USA Maria Grazia Pia M. Batič, M. Begalli, M. Han, S. Hauf, G. Hoff, C. H. Kim,
Geant4-DNA Physics models
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.
Maria Grazia Pia, INFN Genova Software Process: Physics Maria Grazia Pia INFN Genova on behalf of the Geant4 Collaboration Budker Inst. of Physics IHEP.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Maria Grazia Pia, INFN Genova Methods and techniques for Monte Carlo physics validation MC April 2015, Nashville, TN, USA C. Choi, M. C. Han,
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.
P. Saracco, M.G. Pia, INFN Genova An exact framework for Uncertainty Quantification in Monte Carlo simulation CHEP 2013 Amsterdam, October 2013 Paolo.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
OOAD… LowE Electrons From HEP computing to medical research and vice versa Bidirectional From HEP computing to medical research and vice versa Bidirectional.
Geant4 Workshop 2004 Maria Grazia Pia, INFN Genova Physics Book Maria Grazia Pia INFN Genova on behalf of the Physics Book Team
Maria Grazia Pia, INFN Genova Test & Analysis Project aka “statistical testing” Maria Grazia Pia, INFN Genova on behalf of the T&A team
Maria Grazia Pia, INFN Genova 1 Publication patterns in HEP computing M. G. Pia 1, T. Basaglia 2, Z. W. Bell 3, P. V. Dressendorfer 4 1 INFN Genova, Genova,
Riccardo Capra 1, Stéphane Chauvie 2, Ziad Francis 3, Sebastien Incerti 4, Barbara Mascialino 1, Gerard Montarou 3, Philippe Moretto 4, Petteri Nieminen.
IEEE NSS October – 2 November 2013 Seoul, Korea T. Basaglia 1, M. Batic 2, M. C. Han 3, G. Hoff 4, C. H. Kim 3, H. S. Kim 3, M. G. Pia 5, P. Saracco.
Maria Grazia Pia, INFN Genova New Physics Data Libraries for Monte Carlo Transport Maria Grazia Pia 1, Lina Quintieri 2, Mauro Augelli 3, Steffen Hauf.
Susanna Guatelli & Barbara Mascialino G.A.P. Cirrone (INFN LNS), G. Cuttone (INFN LNS), S. Donadio (INFN,Genova), S. Guatelli (INFN Genova), M. Maire (LAPP),
Geant4 Space User Workshop 2004 Maria Grazia Pia, INFN Genova Proposal of a Space Radiation Environment Generator interfaced to Geant4 S. Guatelli 1, P.
Maria Grazia Pia, INFN Genova 1 New models for PIXE simulation with Geant4 CHEP 2009 Prague, March 2009 Maria Grazia Pia INFN Genova G. Weidenspointner,
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Validation of inner shell ionization cross sections for electron transport Sung Hun, Kim Nuclear Engineering, Hanyang University, Seoul, Republic of Korea.
Geant4 in production: status and developments John Apostolakis (CERN) Makoto Asai (SLAC) for the Geant4 collaboration.
Maria Grazia Pia, INFN Genova New rchitectural design for vel experimental domains New architectural design for novel experimental domains R&D on simulation.
Precision Validation of Geant4 Electromagnetic Physics Geant4 DNA Project Meeting 26 July 2004, CERN Michela.
Precision analysis of Geant4 condensed transport effects on energy deposition in detectors M. Batič 1,2, G. Hoff 1,3, M. G. Pia 1 1 INFN Sezione di Genova,
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Max-Planck-Institut für extraterrestrische Physik and Halbleiterlabor, Germany Space Sciences Lab., UC Berkeley, USA CNES, Toulouse, France INFN Genova.
Maria Grazia Pia, INFN Genova Statistics Toolkit Project Maria Grazia Pia, INFN Genova AIDA Workshop.
Physics Data Libraries: Content and Algorithms for Improved Monte Carlo Simulation Physics data libraries play an important role in Monte Carlo simulation:
NANO5 – Geant4 related R&D for new particle transport methods M. Augelli, M. Begalli, T. Evans, E. Gargioni, B. Grosswendt, S. Hauf, C. H. Kim, M. Kuster,
John Apostolakis & Makoto Asai for the Geant4 Collaboration 1(Draft) SNA-MC 2010.
Maria Grazia Pia, INFN Genova 1 Part I The motivations for Geant4.
Susanna Guatelli Geant4 in a Distributed Computing Environment S. Guatelli 1, P. Mendez Lorenzo 2, J. Moscicki 2, M.G. Pia 1 1. INFN Genova, Italy, 2.
Maria Grazia Pia, INFN Genova and CERN1 Geant4 highlights of relevance for medical physics applications Maria Grazia Pia INFN Genova and CERN.
Luciano Pandola, INFN Gran Sasso Luciano Pandola INFN Gran Sasso Genova, July 18 th, 2005 Geant4 and the underground physics community.
Maria Grazia Pia, INFN Genova - G4 WG Coord. Meeting, 13/11/2001 ow Energy Electromagnetic Physics ow Energy Electromagnetic Physics New physics features.
Maria Grazia Pia, INFN Genova Advanced Examples Maria Grazia Pia, INFN Genova on behalf of the LowE/advanced examples WG
Data libraries as a collaborative tool across Monte Carlo codes
Workshop: La radiobiologia dell’INFN Trieste, 7 February 2008
Introductory Course PTB, Braunschweig, June 2009
Short Course Siena, 5-6 October 2006
Collaborative planning for ion physics activities
Radiobiological models implementation in Geant4
Introductory Course ORNL, May 2008
Advanced Examples Alex Howard, Imperial College, UK
Low Energy Electromagnetic Physics Use Cases and PhysicsLists
G. A. P. Cirrone1, G. Cuttone1, F. Di Rosa1, S. Guatelli1, A
Radiation damage at cellular and DNA level
The Geant4 Hadrontherapy Advanced Example
Presentation transcript:

Maria Grazia Pia, INFN Genova Design and performance evaluation of generic programming techniques in a R&D prototype of Geant4 physics CHEP 2009 Prague, March 2009 Maria Grazia Pia (INFN Genova) M. Augelli, M. Begalli, E. Gargioni, B. Grosswendt, C. Hyeong Kim, P. de Queiroz Filho, L. Quintieri, P. Saracco, R. Schulte, D. de Souza Santos, M. Sudhakar, G. Weidenspointner, A. Wroe, A. Zoglauer INFN Sezione di Genova and INFN Laboratori Nazionali di Frascati, Italy Space Sciences Laboratory, UC Berkeley, USA CNES, Toulouse, France University Medical Center Hamburg-Eppendorf, Germany Hanyang University, Seoul, Korea Institute for Radiation Protection and Dosimetry (IRD), Rio de Janeiro, Brazil Loma Linda University Medical Center, USA Max-Planck-Institut für extraterrestrische Physik and Halbleiterlabor, Germany Physikalisch-Technische Bundesanstalt (PTB), Braunschweig, Germany State University of Rio de Janeiro (UERJ), Brazil

Maria Grazia Pia, INFN Genova Acknowledgments The physics models and original implementations of the physics processes mentioned in this talk derive from Geant4 Standard and Low Energy Electromagnetic packages as in Geant Thanks to  Sergio Bertolucci (INFN and CERN)  Tom Evans (ORNL)  Simone Giani (CERN)  Alessandro Montanari (INFN Bologna)  Andreas Pfeiffer (CERN) for helpful discussions and advice The performance results concerning Compton scattering in Geant4 9.1 are published in IEEE NSS 2008 proceedings (F. Longo, L. Pandola and M.G. Pia)

Maria Grazia Pia, INFN Genova Courtesy Borexino Courtesy H. Araujo and A. Howard, IC London ZEPLIN III Courtesy CMS Collaboration Courtesy ATLAS Collaboration Courtesy GATE Collaboration Courtesy R. Nartallo et al.,ESA Widely used also in  Space science and astronomy  Medical physics, nuclear medicine  Radiation protection  Accelerator physics  Humanitarian projects, security  etc. Technology transfer to industry, hospitals… Born from the requirements of large scale HEP experiments Most cited “Nuclear Science and Technology” publication! (> papers) 2 nd most cited CERN/INFN paper “Modern classic” S. Agostinelli et al. GEANT4 - a simulation toolkit NIM A 506 (2003) GEANT4 - a simulation toolkit

Maria Grazia Pia, INFN Genova Background Geant4 R&D phase: RD44  (Geant4 0.0: 15 December 1998) Designed and built Geant4 New software technology GEANT 3 experience + new ideas Foundation of the current Geant4: dates back to the mid ’90s Requirements for core capabilities Software technology Evolution: Consolidation, validation, extension and refinement of existing capabilities Support to the experimental community Proliferation of physics models Same core capabilities and technology as in the mid ’90s 1994 mid of LEP era GEANT 3 successfully used in many experiments Collected from the experimental community Object Oriented methods introduced in HEP The world changes…

Maria Grazia Pia, INFN Genova Two worlds… OR Condensed-random-walk OR “discrete” régime Characterizing choice in a Monte Carlo system Limited exception: Penelope (switch to elastic scattering near boundaries) Subtle consequences e.g. X-ray fluorescence emission (PIXE) by impact ionisation has a dependence on secondary production cut introduced to handle infrared divergence! can affect macroscopic applications: material analysis, precise dosimetry etc. ATLAS effects on componentsLHC + detector environment How does one estimate radiation effects on components exposed to LHC + detector environment? dosimetry radiation biology How does one link dosimetry to radiation biology? What does it mean in practice? And what about nanotechnology-based detectors for HEP? And tracking in a gaseous detector? RADMON And plasma facing material in a fusion reactor?

Maria Grazia Pia, INFN Genova Topics of research R&D study on complementary, co-working transport methods Condensed-random-walk Condensed-random-walk scheme Discrete Discrete scheme Monte Carlo Monte Carlo method Deterministic Deterministic methods Nanotechnology detectors Radiation effects on components Radiobiology Plasma physics Material analysis etc. Nuclear power plants Radiotherapy Homeland security etc. Side topics (instrumental to the main objectives) Physics configurability Concerns (scattered and tangled) Built-in physics V&V-ability

Maria Grazia Pia, INFN Genova R&D on co-working transport schemes in Geant4 Project launched at INFN (2009), international-multidisciplinary team R&D = research study, exploration of novel ideas Distinct from Geant4 production service: no perturbation to running experiments! R&D deliverable(s) = prototypes [to be evaluated for transition into Geant4 releases] Scientific motivation From concrete experimental use cases Objective Seamless transition of simulation régime in Geant4 Capability of simulating complex multi-scale systems Conceptual and software design challenges Physics process adaptation to environment Embedding “mutability” in Monte Carlo physics entities Difficult …not yet present in any simulation system NANO5

Maria Grazia Pia, INFN Genova 1 st cycle: propedeutic exploration R&D on generic programming techniques in EM physics Problem domain analysis Identify entities subject to mutability Added complexity Deterioration of performance? Side requirements Agility of configuration Transparency Easy verification & validation TechnologySupport to requirements Pilot project: mutability in photon physics domain UP: iterative and incremental software process

Maria Grazia Pia, INFN Genova Adopt best practices, build on existing body of knowledge

Maria Grazia Pia, INFN Genova Minimalism… G4VEMProcess G4VEMModel

Maria Grazia Pia, INFN Genova No charged photons

Maria Grazia Pia, INFN Genova No nostalgia! FORTRAN common block… Encapsulation = robustness, transparency G4VEMProcess G4VEMModel

Maria Grazia Pia, INFN Genova src/G4BetheBlochModel.cc: fParticleChange = reinterpret_cast src/G4BetheHeitlerModel.cc: fParticleChange = reinterpret_cast (pParticleChange); src/G4BraggIonModel.cc: reinterpret_cast (pParticleChange); src/G4BraggModel.cc: reinterpret_cast (pParticleChange); src/G4eBremsstrahlungModel.cc: fParticleChange = reinterpret_cast (pParticleChange); src/G4eBremsstrahlungRelModel.cc: fParticleChange = reinterpret_cast (pParticleChange); src/G4eCoulombScatteringModel.cc: reinterpret_cast (pParticleChange); src/G4KleinNishinaCompton.cc: fParticleChange = reinterpret_cast (pParticleChange); src/G4MollerBhabhaModel.cc: fParticleChange = reinterpret_cast src/G4MscModel71.cc: fParticleChange = reinterpret_cast (pParticleChange); src/G4MultipleScattering71.cc: model = dynamic_cast (SelectModel(e)); src/G4PEEffectModel.cc: fParticleChange = reinterpret_cast (pParticleChange); src/G4UrbanMscModel2.cc: fParticleChange = reinterpret_cast (pParticleChange); src/G4UrbanMscModel90.cc: fParticleChange = reinterpret_cast (pParticleChange); src/G4UrbanMscModel.cc: fParticleChange = reinterpret_cast (pParticleChange); Design, design, design…

Maria Grazia Pia, INFN Genova A policy defines a class or class template interface Policy host classes are parameterised classes Advantages Policies are not required to inherit from a base class The code is bound at compile time  No need of virtual methods, resulting in faster execution Syntax-oriented rather than signature-oriented Weak dependency of the policy and the policy based class on the policy interface Highly customizable design Policy-based design First introduced in Geant4 S. Chauvie et al., Geant4 physics processes for microdosimetry simulation: design foundation and implementation of the first set of models IEEE Trans. Nucl. Sci., Vol. 54, no. 6, pp , Dec C++ is capable of a Turing machine at two levels Exploit both Mix and match

Maria Grazia Pia, INFN Genova

A condition of complete simplicity (Costing not less than everything) T.S. Eliot, Four Quartets (Little Gidding) typedef G4PhotonProcess G4ComptonStandard> Interface: only mandatory inherited pure virtual functions

Maria Grazia Pia, INFN Genova Correctness Better control on software correctness Easy to unit test physics ingredients Old Penelope Compton scattering test Unphysical values Disappear in the new design (same test code)

Maria Grazia Pia, INFN Genova Compton cross section % difference  2 test NIST Phys. Ref. Data p-value Library Penelope < excluding 1 keV Standard Library-Penelope Si, Z=14 Different scale! Library-Standard Si, Z=14 Different scale! Penelope-Standard Si, Z=14 Different scale! Example: Compton in Si 1 keV – 100 GeV Agility

Maria Grazia Pia, INFN Genova Metrics Old G4-NIST comparison test 4134 LoC* O(months) CPU+human time Photon cross sections test Test with new design <50 LoC*, O(minutes) K. Amako et al., Comparison of Geant4 electromagnetic physics models against the NIST reference data IEEE Trans. Nucl. Sci., vol. 52, no. 4, pp , Aug. 2005

Maria Grazia Pia, INFN Genova Physics on a diet The design exposes the physics at very fine granularity Cross sections Final state detail Unprecedented opportunity for thorough validation (where data exist) Similarities and differences among various Geant4 models Accuracy Computational performance Some models provide identical functionality Often the result of evolution: initially they were different! Toolkit nature of Geant4: provide alternative models Replicas of the same physics functionality? Pruning keeps trees healthier! Cost of maintenance of a still growing, complex software system Long time scale of LHC operation (various developers will be retired) Strive for simplicity, transparency, sound design, quality of software Hidden treasures e.g. 3 variants of atomic binding energies (1 experimentally validated)

Maria Grazia Pia, INFN Genova Performance improvement (where no improvement is expected) Policy-based designGeant4 9.1Gain C % Si % Cu % W % Move lowenergy-Penelope to Standard package design: ~10% gain, including implementation improvements Source: L. Pandola, Penelope Compton Example: Penelope Compton NO ATTEMPT [yet] TO IMPROVE THE IMPLEMENTATION 40 keV, 10 6 events, Intel Core2 Duo Processor E6420, 2.13 GZ, 4 GB RAM Low Energy – Library: 28% gain with policy-based design Preliminary

Maria Grazia Pia, INFN Genova Doppler broadening in Compton scattering Library Penelope Standard final state Generators Si, 40 keV Cs, 400 keV Yes, physics does make sense. And is transparently exposed. Validation on experimental data by Namito et al. There is only the fight to recover what has been lost And found and lost again and again: and now, under conditions That seem unpropitious. T.S. Eliot, Four Quartets (East Coker)

Maria Grazia Pia, INFN Genova The only wisdom we can hope to acquire Is the wisdom of humility: humility is endless. T.S. Eliot, Four Quartets (East Coker) First considerations The technology looks promising for application to a large, complex, computationally intensive physics simulation domain Enormous gain in Transparency Agility Easy verification and validation Maintenance effort Significant performance improvement At a very early stage of the project, still room for further improvement But there is still a long way to go…

Maria Grazia Pia, INFN Genova Outlook Now the fun begins… Charged particles Path towards introducing mutation “in the guts” Side opportunities for physics improvements, validation, consistency etc. thanks to the transparency of the design Validation of the design “on the field” Collaboration with experimental groups And so each venture Is a new beginning T.S. Eliot, Four Quartets (East Coker) In my end is my beginning T.S. Eliot, Four Quartets (East Coker)

Maria Grazia Pia, INFN Genova Conclusion Much madness is divinest Sense - To a discerning Eye - Much sense - the starkest Madness - 'Tis the Majority In this, as All, prevails - Assent - and you are sane - Demur - you're straightway dangerous - And handled with a Chain. Emily Dickinson Curiosity Methodological rigorousness Software engineering discipline Physics insight Freedom

Maria Grazia Pia, INFN Genova