Paths to Geant4 evolution: Refactoring, Reengineering and Physics State-of-the-Art Simulation of Photon Interactions with Matter Maria Grazia Pia M. Batič, M. Han, S. Hauf, G. Hoff, C. H. Kim, M. Kuster, P. Saracco, H. Seo, G. Weidenspointner, A. Zoglauer INFN Genova, Italy J. Stefan Institute, Ljubljana, Slovenia Hanyang University, Seoul, Korea PUCRS, Porto Alegre, Brazil EU XFEL GmbH, Hamburg, Germany MPI Halbleiterlabor, Munich, Germany Space Sciences Laboratory, UC Berkeley, USA NSS 2012 30 October 2012, Disneyland, USA Maria Grazia Pia, INFN Genova “The code slowly sinks from engineering to hacking”. “Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure.” “When you refactor you are improving the design of the code after it has been written.” Reengineering “seeks to transform a legacy system into the system you would have built if you had the luxury of hindsight and could have known all the new requirements that you know today.” “A legacy is something valuable that you have inherited.” “With rapid development tools and rapid turnover in personnel, software systems can turn into legacies more quickly than you might imagine.” Maria Grazia Pia, INFN Genova Series of pilot projects going on since 2008 Softwar e Physics design V&V UQ Focus on physics and fundamental concepts of particle transport Highlights No time to go into details State-of-the-art, quantified Archival literature Maria Grazia Pia, INFN Genova Produce concrete prototype Quantify current future Geant4 physics capabilities Identify experimental requirements New physics New performance Code Physic s V&V Prune Improve Extend physics Maria Grazia Pia, INFN Genova theory exp. MC Assess the state of the art Refactor (Re)design software Smells If it stinks, change it. Grandma Beck, discussing child-rearing philosophy M. Fowler, K. Beck et al., Refactoring: Improving the Design of Existing Code Lazy Class Duplicated Code Speculative Generality Long Method Temporary Field Large Class Message Chains Long Parameter List Middle Man Divergent Change Inappropriate Intimacy Shotgun Surgery Alternative Classes with Feature Envy Different Interfaces Data Clumps Incomplete Library Class Primitive Obsession Data Class Switch Statements Refused Bequest Parallel Inheritance Hierarchies Maria Grazia Pia, INFN Genova Electromagnetic smells Coupling stot and final state modeling have been decoupled in hadronic physics design since RD44 “model” Total cross section Whether a process occurs Final state generation How a process occurs Dependencies on other parts of the software One needs a geometry (and a full scale application) to test (verify) a cross section Difficult to test no testing often Problem domain analysis Improve domain decomposition Maria Grazia Pia, INFN Genova software design TCrossSection TGenerator G4TRDPhotonProcess Benefits <<bind>> Transparency G4CrossSectionDataLib, G4GeneratorComptonDataLib Ease of maintenance <<typedef>> Simplicity of testing for V&V G4ComptonDataLib G4CrossSectio <<bind>> G4CrossSectionComptonStandard Basic physics V&V can be performed by means of lightweight unit tests <<bind>> G4CrossSectionComptonPenelope,G4GeneratorComptonPenelope Easier exploration of new models Easier quantification of accuracy <<typedef>> G4ComptonPenelope Bare-bone physical functionality Decorations on top Motion of atomic electrons Doppler broadening Binding effects Maria Grazia Pia, INFN Genova scattering functions Doppler profiles Vacancy creation Atomic relaxation Number one in the stink M. Fowler, Prune parade is duplicated code Refactoring physics Objective quantification of smell Efficiency w.r.t. experiment Two Geant4 models, identical underlying physics content (it used to be different) stotal 5000 4000 600 “Livermore” Penelope ds/dW EPDL97 EPDL97 0.38±0.06 0.38±0.06 500 Counts Counts 400 3000 2000 1000 s = 0.008 % mean 7 10-5 % 300 200 100 s = 1% mean 0.07% 0 0 −0.0004 −0.0002 0.0000 0.0002 sPenelope2008 - sEPDL 0.0004 sEPDL Maria Grazia Pia, INFN Genova −0.04 −0.02 0.00 0.02 dsPenelope2008 dsEPDL dsEPDL ( ) dW dW dW 0.04 Code bloat Burden on • Software design • Maintenance • User support Unnecessary complexity Bremsstrahlung, evaporation, proton elastic scattering etc. Trash and redo 1. 2. 3. 4. 5. 6. 7. Number one in the stink parade is duplicated code numbers Bearden & Burr (1967) Carlson EADL Sevier ToI 1978 (Shirley) ToI 1996 (Larkins) Williams Atomic{ binding energies Carlson + Williams Carlson ( Shirley ) EADL Source of epistemic uncertainties? { 3246 IEEE TRANSACTIONS ON NUCLEAR SCIENCE, VOL. 58, NO. 6, DECEMBER 2011 Evaluation of Atomic Electron Binding Energies for Monte Carlo Particle Transport 23 pages Maria Grazia Pia, Hee Seo, Matej Batic, Marcia Begalli, Chan Hyeong Kim, Lina Quintieri, and Paolo Saracco p ionisation cross sections difference w.r.t. experiment electron emission, and precision simulation studies, such as microdosimetry, that involve the description of particle interactions with matter down to energies comparable with the scale of atomic binding energies. Simulation in these domains has been for an extended time the object of specialized Monte Carlo codes; some general purpose Monte Carlo systems have devoted attention to these areas, introducing functionality for the simulation of fluorescence, PIXE (Particle Induced X-ray Emission) and microdosimetry. In this context, emphasis has been placed on the development and validation of the physics models implemented in the simulation systems, while relatively limited effort has been invested into verifying the adequacy of the atomic parameters used by general purpose Monte Carlo codes with regard to the requirements of new application domains. This paper surveys atomic binding energies used by well Index Terms—Geant4, ionization, Monte Carlo, PIXE, simula-6 known Monte Carlo systems, including EGS [1], EGSnrc tion, X-ray fluorescence. [2], Geant4 [3], [4], ITS (Integrated Tiger Series) [5], -8 MCNP/MCNPX [6], [7] and Penelope [8], and by some specialized physics codes. These software systems use a vaI. INTRODUCTION -10 riety of compilations of binding energies, which are derived 0 10 20 30 40 50 60 70 80 90 100 from experimental data or theoretical calculations; this paper investigates their accuracy and their effects on simulations. HE simulation of particle interactions in matter involves KL3 Eg w.r.t. experiment Difference (eV) other 10 Abstract—A survey of atomic binding energies used by general purpose Monte Carlo systems is reported. Various compilations of 8 these parameters have been evaluated; their accuracy is estimated with respect to experimental data. Their effects on physical quan6 are highlighted: tities relevant to Monte Carlo particle transport X-ray fluorescence emission, electron and proton ionization cross sections, and Doppler broadening in Compton 4 scattering. The effects due to different binding energies are quantified with respect to experimental data. Among the examined compilations, EADL is 2 found in general a less suitable option to optimize simulation accuracy; other compilations exhibit distinctive capabilities in specific applications, although in general their effects on simulation 0 accuracy are rather similar. The results of the analysis provide quantitative ground for the selection of binding energies to optimize the accuracy of Monte Carlo simulation-2in experimental use cases. Recommendations on software design dealing with these parameters and on the improvement of data libraries -4 for Monte Carlo simulation are discussed. Carlson Williams EADL Carlson Maria Grazia Pia, INFN Genova T a number of atomic physics parameters, whose values affect physics models applied to particle transport and experimental observables calculated by the simulation. Despite the mixed Atomic number II. COMPILATIONS OF ELECTRON BINDING ENERGIES Algorithms Popular belief Physics model X is intrinsically slow Baroque methods to combine it with “faster” lower precision models and limit its use to cases where one is willing to pay for higher precision This design introduces an additional computational burden due to the effects of inheritance and the combination algorithms themselves Truth Physics model X is intrinsically fast But its computationally fast physics functionality is spoiled by an inefficient sampling algorithm Maria Grazia Pia, INFN Genova No code smell ► Spotted through o in-depth code review in the course of software validation ► Change the sampling algorithm! The fastest algorithm no algorithm at all Shift modeling from algorithms to data Maria Grazia Pia, INFN Genova Merging models Electron impact ionisation cross sections Smoothing data Guidance from experimental data (when available) Data libraries PIXE (sionisation: p) BEB–DM (sionisation: e-) Photon elastic ‒ RTAB (L. Kissel) Example: LOESS local polynomial regression fitting Beware: not optimized! Mathematical support in progress Maria Grazia Pia, INFN Genova experimental SM EPDL 10-8 10 -10 10 SM EPDL …no silver bullet 10-9 100 200 500 1000 2000 5000 10000 100 200 500 Energy (keV) ● ● ●● ● ● ● ● 1 ● ● ● ● -1 ● ● ● ● ds dW (b sr) 10 ● ●●●●● ● ●●●●● ●● ●●●● ●●● ● ●● ●●●● ●●● ●●●● ●●● ● ●●●● ●●● ● -3 ● ● ● ●● ● ● ● ● ● 10 ● ● ●● ●● ●● ● -5 ●● 10 -2 ● ● ● ● ●● ● ● ● Here our understanding of the underlying physics phenomena fails 10 ● -4 ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ●● ●● ● ● 10-6 10-7 ● 10 Z=92 Smoothing models (or data) that exhibit significantly different behaviour is not physically justified ● ● ● ds dW (b sr) 10 5000 Energy (keV) Z=82 ● ● 1000 2000 -9 100 200 ● experimental SM EPDL 500 1000 2000 10 5000 Energy (keV) Photon elastic scattering cross section at 90° Experimental data by Schumacher et al., Starr et al., Jackson et al., Moreh et al. etc., complete list in related publication Maria Grazia Pia, INFN Genova -8 100 experimental SM EPDL Experimental data themselves must be analyzed for inconsistencies and 200 500 1000 2000 possible5000systematics Energy (keV) How to solve this kind of problems? Better theoretical calculations New, dedicated experimental data No easy solution Refactoring data management Today’s technology ‒ …keeping an eye on the new C++ Standard Optimal container Pruning data Splitting files Software design Maria Grazia Pia, INFN Genova Big refactoring Well defined responsibilities and interactions Maria Grazia Pia, INFN Genova Geant4 Radioactive Decay 33Ba photo-peaks 79.61 and 80.99 keV Absolute validation Experiment: Z. W. Bell (ORNL) Statistical Decay Validation Po 218 84 3.1 m in New Figure algorithm 48: The upper part of the plot j i ln( 2 ) ln( 2 ) _________ _________ 2 6 .8 m in 3 .1 yr 0 0 ln( 2 ) ln( 2 ) _________ - _________ 2 0 .0 m in 2 6 .8 m in 0 0 0 0 0 0 0 0 ln( 2 ) _________ 1 .3 m in 0 0 0 ln( 2 ) ln( 2 ) _________ _________ 0 .1 6 se c 2 0 .0 m in 0 0 ln( 2 ) _________ 2 0 .0 m in 0 0 0 ln( 2 ) _________ 0 .1 6 se c 0 0 0 0 - Pb 214 82 2 6 .8 m in Bi Pb 210 82 2 2 . 3 yr ln( 2 ) ln ( 2 ) _________ _________ 2 2 .3 yr 1 .3 m in 0 ln ( 2 ) _________ 2 2 .3 yr Bi 210 83 5 days Figure Performance Tl 210 81 1 .3 m in Po 214 84 0 .1 6 se c shows the measured Ba photo-peaks at 79.61 keV and 80.99 keV (dots). Also shown are the background and peak models fi tted to the data using HYPERMET. The background consist s of a constant linear part (lower dashed line) and a step-function modeling the step of Compton component (upper dashed line). The lower energy peak is shown dotted, while the solid line is the sum of the second peak and the other component s. The low-energy exponential t ail is not dist inguishable for these peaks. The lower part shows the residuals in terms of σ uncertainties (solid area: 1σ , lines: 3σ ). 133 214 83 2 0 . 0 m in Hg 206 80 8.1 m in Figure 34: An illustration of how the Λ-matrix is fi lled using part of the 238 U decay chain as an example. Geant4 refactored for i > j and Λ i i = − ki . (35) In Equation 34 bi j denotes the branching ratio from the jth to the i th component of the decay chain n with i = j+ 1 bi j = 1. An example is shown in Figure 34. In computational practice Λ can be constructed by iterating through the decay chain and taking activation rates into account if necessary. Because Λ is independent of the actual nuclei numbers it must only be constructed once for each set of nuclei and activations characterizing a given chain. Calculations using different nuclei numbers can reuse these initial matrices as needed. Using the above definitions the number of nuclei of each species in the decay chain in then given by Maria Grazia Pia, INFN Genova N( t ) = eΛt N(0) More in N28-6/7 (36) new algorithm 233 to the amplitude A where α is a normalization factor the photo-peak’s center; er f c(u) is the complementa may vary with energy. To account for this the a poly U decay Paths to Geant4 evolution: Refactoring, Reengineering and Physics State-of-the-Art Simulation of Photon Interactions with Matter Maria Grazia Pia M. Batič, M. Han, S. Hauf, G. Hoff, C. H. Kim, M. Kuster, P. Saracco, H. Seo, G. Weidenspointner, A. Zoglauer INFN Genova, Italy J. Stefan Institute, Ljubljana, Slovenia Hanyang University, Seoul, Korea PUCRS, Porto Alegre, Brazil EU XFEL GmbH, Hamburg, Germany MPI Halbleiterlabor, Munich, Germany Space Sciences Laboratory, UC Berkeley, USA NSS 2012 30 October 2012, Disneyland, USA Maria Grazia Pia, INFN Genova Refactoring to improve physics Refactoring M. Fowler, Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure Refactoring/reengineering legacy simulation code is an opportunity • • • • To complement software testing with physics validation To evaluate and compare the accuracy of various modeling options To estimate the trade-off between accuracy and performance To document the state-of-the-art for Monte Carlo transport Electron-photon physics Models and data libraries used by Geant4 and other Monte Carlo codes Maria Grazia Pia, INFN Genova Photon elastic scattering Physics • • • • Rayleigh scattering Thomson nuclear scattering Delbrück scattering Nuclear resonance scattering Form factor approximation “Livermore” EPDL “Penelope 2008” “Penelope 2001” “Standard” EPDL Baro et al. Unknown EPDL: non relativistic form factors Thomson scattering in total cross section only • Non relativistic form factors (Hubbell 1977) FLUKA, Geant4,MCNP, Penelope • Relativistic form factors nd order S-matrix 2 (Hubbell & Øverbø) EGS, ITS, XCOM • Modified form factors • Calculations by L. Kissel (Schaupp et al.) • Not yet exploited in Monte • + anomalous scattering factors Carlo codes Maria Grazia Pia, INFN Genova Z=13 Z=29 0.6 ● 0.4 exp. SM EPDL ● ds dW (b sr) Heavy materials ● exp. SM EPDL ● ds dW (b sr) Forward peaked 8 0.5 0.3 ● 6 4 ● 0.2 ● ● ● 2 ●● ● 0.1 ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● 0.0 5 10 20 ● 50 100 Energy (keV) 500 ● ● ● 0 ● 2000 5 10 20 ● ● ● ● 50 100 Energy (keV) Z=50 ● 500 2000 Z=82 50 150 ● ● ● ● 40 ● ● ● ds dW (b sr) ● exp. SM EPDL ● 30 100 20 exp. SM EPDL ● ● ds dW (b sr) ● ● ● ● ● 50 ● ●● ● 10 ● ● ● ● ● ●●● ●● ● 0 5 Maria Grazia Pia, INFN Genova 10 20 ● ●● ●● ● ● ●● ●● ● ● ●● ● ●●● ● ●● ●● ● ● ● ● 50 100 Energy (keV) ● ● 500 ● ● ● 0 ● ● 2000 5 10 20 ●● ● 50 100 Energy (keV) ● ● 500 ● ● ●● ● 2000 Comparison with experiment > 4000 differential cross section measurements from the literature 5.41 keV ≤ E ≤ 39 MeV 0.5° ≤ θ ≤ 165° 69 target atoms, 3 ≤ Z ≤ 92 MFASF 300 RFASF 250 t-test MF RF Counts 200 NF 150 Penelope2001 Penelope2008 100 EPDL 50 SM smray 0 −15 −10 −5 0 5 10 15 −0.4 −0.2 0.0 0.2 0.4 Number of standard deviations Confidence inter val Statistical analysis of compatibility Maria Grazia Pia, INFN Genova + categorical analysis E=59.5 keV, Z=29 E=59.5 keV, Z=82 10.0 200 ● 5.0 ●● ● ● ● ●● ● ds dW (b sr) ● 1.0 ● 0.5 ● SM Rayleigh ● ● 20 ● ● ● ● ● ● 10 ● ● 5 ● ● ● ● ● ● ● ● ● ● 0.2 ● ● 2 ● ● 0.1 0 100 10 50 ● experimental EPDL SM Rayleigh + NT 10 ● ●● ● 10 ● ● ● ●● ● 10 -3 ● ● ● ● ● ● ● ● 50 100 Angle (degrees) experimental EPDL SM Rayleigh + NT ● ● ● ● ● ● ● ● ● -3 ● ● ● ● ● ● ● ● -4 ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● 10 0 150 ● 10 ● ● ● 10-2 ●● ● ● ● ● ● ● ● ● ● ● SM Rayleigh ● ●● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● -1 ● ● ● ● ● 10 ● ● 10 ● ● ● ● ●● 100 ● ● ● ● ● 1 SM Rayleigh ● ● ● ● ● ● ●● 50 ● ●● E=1.332 MeV, Z=82 ●● -2 0 ds dW (b sr) ds dW (b sr) 150 ●● 10 1 ● ● ● -1 ● ● E=661.6 keV, Z=82 ● ●●● Maria Grazia Pia, INFN Genova ● ● ●● ● Angle (degrees) ● 1 ● ● ● ● ● ● Angle (degrees) ● ●● ●● ●● ● ●● ● ● ● ● ● ● ● 100 ● ● ● ●● ● ● ● ● ● Important to account for it especially at higher energy experimental EPDL SM Rayleigh + NT 50 SM Rayleigh ● 2.0 ● 100 ● ds dW (b sr) Nuclear Thomson scattering experimental EPDL SM Rayleigh + NT ● 150 -5 0 50 100 Angle (degrees) 150 ● Model validation State of the art Identified through quantitative validation w.r.t. experiment Quantification Compatibility with experiment: GoF test (c2 test) Comparison of models’ accuracy: categorical analysis (Fisher’s exact test and c2 test) Differential cross sections Penelope Penelope 2001 2008 EPDL Relativ. Non-Rel. Modified FF FF FF MFF ASF RFF ASF SM NT e 0.27 0.38 0.38 0.25 0.35 0.49 0.52 0.48 0.77 error ±0.05 ±0.06 ±0.06 ±0.05 ±0.06 ±0.06 ±0.06 ±0.06 ±0.05 e = fraction of test cases compatible with experiment 0.01 significance in the c2 test S-matrix Maria Grazia Pia, INFN Genova Modified form factors Z=50 Z=73 ● ● 1 ● ● ●● ● 10 ● ● ● 10-2 ● ● 10-3 ● 10-4 ● 10 ● ● ●● ● ●● ● -6 ds dW (b sr) ds dW (b sr) Other physics to be accounted for at higher energy -1 ● ● 10 -5 10 ● experimental SM EPDL 10-9 -10 100 200 500 1000 2000 5000 10000 100 200 500 Energy (keV) ● ●● ● ● ● 1 ● ● ● ● -1 ● ● ● ● ds dW (b sr) 10 ● ● ● ●●●●● ● ●●●●● ●● ●●●● ●●● ● ●●●● ● ●●● ●●● ●● ●● ●● ●●●● ● -3 ● ● ● ●● ● ● ● ● ● 10 ●●● ● ● ●● ●● ●● ● -5 ●● ● 10-9 100 10 200 1000 2000 Energy (keV) ● ● ●● 10 ● ● -4 ● ● ● ● ● ● ● ● ● ●● ●● ● ● -6 experimental SM EPDL 10-8 5000 ● ● ●● ● ● ●●● ● ● experimental SM EPDL 500 ● -2 ● 10 10-7 Maria Grazia Pia, INFN Genova 5000 Z=92 ● ds dW (b sr) 10 1000 2000 Energy (keV) Z=82 ● ● ● ● ● ●● ● ● ● 10 ● ●● ● 10-7 experimental SM EPDL ● -8 ● ● ● ● 100 200 500 1000 2000 Energy (keV) 5000 Z=47 ● 2 1 300 ● 2 1 400 500 600 4 3 ● ● 2 ● 1 ●● 0 700 300 400 500 600 700 300 400 500 600 700 ● Energy (keV) Energy (keV) Z=53 Z=58 Z=64 10 4 3 2 SM EPDL MFASF XCOM Storm Brennan G4std 6 4 ● Total cross section (b) 5 Total cross section (b) Total cross section (b) Energy (keV) 8 SM EPDL MFASF XCOM Storm Brennan G4std 2 1 SM EPDL MFASF XCOM Storm Brennan G4std 8 6 ● 4 2 ● ● 0 0 300 400 500 600 0 700 300 Energy (keV) 400 500 600 700 300 400 500 Energy (keV) Energy (keV) Z=73 Z=80 Z=69 600 700 15 10 8 ● 6 4 SM EPDL MFASF XCOM Storm Brennan G4std 10 ● Total cross section (b) SM EPDL MFASF XCOM Storm Brennan G4std 12 5 SM EPDL MFASF XCOM Storm Brennan G4std 15 10 ● 5 2 ● ● ● 0 0 300 Maria Grazia Pia, INFN Genova 3 0 Total cross section (b) Scarce experimental data 4 SM EPDL MFASF XCOM Storm Brennan G4std 5● ● 0 Total cross section (b) S-matrix EPDL MFASF XCOM Storm & Israel Brennan & Cowan Geant4 Standard SM EPDL MFASF XCOM Storm Brennan G4std ● 6 Z=50 6 Total cross section (b) 3 Total cross section (b) SM EPDL MFASF XCOM Storm Brennan G4std 4 Total cross section (b) Total elastic cross section Z=48 5 400 500 Energy (keV) 600 700 0 300 400 500 Energy (keV) 600 700 300 400 500 Energy (keV) 600 700 Photoelectric effect Total cross section Shell cross sections Photoelectron angular distribution Total cross section EPDL Kissel (RTAB) Storm & Israel Biggs & Lighthill XCOM Brennan & Cowan McMaster “Livermore” EPDL “Penelope 2008” EPDL “Penelope 2001” EPDL “Standard” Biggs & Lighthill XCOM? EPDL used down to 250 eV Never validated, nor optimized Maria Grazia Pia, INFN Genova E > 1 keV EPDL Biggs Brennan Storm XCOM 15 EPDL 15 10 Counts Counts Total cross section Difference w.r.t. experiment E > 250 eV 5 0 10 5 -0.4 Penelope2008 - EPDL -0.2 0.0 0.2 0 0.4 -0.4 -0.2 0.0 0.2 Relative difference Relative difference 100 eV < E < 250 eV E < 100 eV 0.4 300 40 EPDL 50 250 30 150 40 Counts Counts Counts 200 EPDL 20 30 100 20 50 10 10 0 -0.002 -0.001 0.000 0.001 Relative difference Penelope2008 - EPDL 0.002 0 -0.4 -0.2 0.0 0.2 0.4 0 -0.4 -0.2 0.0 0.2 0.4 Geant4 Relative difference Relative difference “Livermore” and “Penelope”: Maria Graziacross Pia, INFN Genova Inadequate modeling or systematics in the measurements? both EPDL sections Photoelectric effect E = 661.6 keV Total cross section 10 8 exp. p-valueEPDL EPDL RTAB Biggs Brennan Storm XCOM 6 4 30 20 10 0 0 ● 1000 ● 0.6 40 30 40 ● ● 0.4 0.2 800 600 50 60 70 80 40 45 50 55 60 Atomic Number Z Atomic Number Z E = 123.6 keV E = 59.54 keV exp. EPDL RTAB Biggs Brennan Storm XCOM exp. p-valueEPDL EPDL RTAB Biggs Brennan Storm XCOM 3000 Total cross section (b) exp. EPDL RTAB Biggs Brennan Storm XCOM Total cross section (b) Total cross section (b) 0.8 50 2 E = 2.62 MeV E=2.62 MeV ● exp. EPDL RTAB Biggs Brennan Storm XCOM 60 p-valueEPDL = 0.870 E > 50 keV 1.0 <0.001 Total cross section (b) Total cross section (b) 12 E = 279.2 keV 2000 400 65 70 = 0.550 1000 ● ● 200 0.0 50 55 60 65 70 75 Atomic Number Z Maria Grazia Pia, INFN Genova 80 0 40 50 60 70 Atomic Number Z 80 0 20 30 40 50 Atomic Number Z 60 70 Z=2 Z = 10 0.4 0.3 0.2 0.1 0.10 0.15 0.20 0.25 3 1 0.10 0.15 0.20 Z = 18 Z = 36 0.5 0.11 0.12 E (keV) 0.25 3 1 0.09 0.10 0.11 0.12 E (keV) Total cross section (Mb) exp. EPDL RTAB Brennan 30 20 10 0 0.2 0.4 0.6 0.8 E (keV) Maria Grazia Pia, INFN Genova 1.0 Total cross section 100 eV - 1 keV 2 Z = 54 40 0.30 exp. EPDL RTAB Brennan 4 0 0.13 Photoelectric effect 2 E (keV) 1.0 0.10 4 E (keV) exp. EPDL RTAB Brennan 0.09 exp. EPDL RTAB Brennan 5 0 0.30 1.5 0.0 Total cross section (Mb) 0.5 0.0 Total cross section (Mb) exp. EPDL RTAB Brennan 0.6 Total cross section (Mb) Total cross section (Mb) 6 0.13 Small experimental sample Noble gases 500 eV – 1 keV p-valueEPDL = 0.593 250 – 500 eV p-valueEPDL = 0.029 RTAB: similar to EPDL Brennan-Cowan: less accurate Z=1 2 Total cross section (Mb) 0.014 0.018 0.02 0.04 0.06 0.08 5 0 0.10 0.02 0.04 0.06 Z=8 Z = 10 Z = 18 0.06 0.08 600 400 200 0 0.10 exp. EPDL RTAB Brennan 0.02 0.04 0.06 0.08 E (keV) Z = 36 Z = 54 exp. EPDL RTAB Brennan 50 40 30 20 10 0.06 E (keV) 0.08 0.10 80 0.10 exp. EPDL RTAB Brennan 60 40 0.08 0.02 0.04 0.06 0.08 0.10 E (keV) 0.10 exp. EPDL RTAB Brennan 40 30 20 10 0 0.02 0.04 0.06 0.08 0.10 E (keV) Systematics in experiment? Inadequate calculations? 20 0 50 Total cross section (Mb) 800 E (keV) 60 0.04 2 10 E (keV) 5 0.02 4 15 E (keV) 10 0.04 6 0 0.022 exp. EPDL RTAB Brennan 0.02 8 exp. EPDL RTAB Brennan E (keV) 15 0 Maria Grazia Pia, INFN Genova 0.010 20 0 Measured in gases only p-valueRTAB=0.977 exp. EPDL RTAB Brennan 10 Total cross section (Mb) 4 Total cross section (Mb) 6 Total cross section (Mb) 10-100 eV Total cross section (Mb) Total cross section exp. EPDL RTAB Brennan 8 0 Z=7 20 Total cross section (Mb) Total cross section (Mb) Photoelectric effect Z=2 Conclusions A quantitatively validated, state-of-the-art Monte Carlo code Large effort Supported by software design a tremendous challenge an inspiring motivation Refactoring techniques and reengineering patterns contribute to computational performance and facilitate validation Quantitative validation of physics models more about it in the last talk of this session Physics insight is the key Maria Grazia Pia, INFN Genova …a big THANK YOU to the Maria CERN Grazia Pia, Library! INFN Genova