1 / 32

G4ConvergenceTester and ExN03Con

G4ConvergenceTester and ExN03Con. KOI, Tatsumi SLAC National Accelerator Laboratory. "G4ConvergenceTester“ and “ExN03Con”. G4ConvergenceTester provides several information assisting user understanding of convergence level of his/her result, like MCNPs.

rad
Download Presentation

G4ConvergenceTester and ExN03Con

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. G4ConvergenceTester andExN03Con KOI, Tatsumi SLAC National Accelerator Laboratory Geant4 Collaboration Workshop 2010-10-6

  2. "G4ConvergenceTester“and “ExN03Con” • G4ConvergenceTester provides several information assisting user understanding of convergence level of his/her result, like MCNPs. • “ExN03Con” is an example of the usage of G4ConvergenceTester. • examples/extended/analysis/N03Con/ • They have been included in Geant4 since v9.0 (2007-Jun) Geant4 Collaboration Workshop 2010-10-6

  3. How to Use #include "G4ConvergenceTester.hh“ void ExN03RunAction::BeginOfRunAction(const G4Run* aRun) { ,,,,,, Eabs_tally = new G4ConvergenceTester(); Egap_tally = new G4ConvergenceTester(); Labs_tally = new G4ConvergenceTester(); Lgap_tally = new G4ConvergenceTester(); } void ExN03RunAction::fillPerEvent(G4double EAbs, G4double EGap, G4double LAbs, G4double LGap) { ,,,,, Eabs_tally->AddScore( EAbs ); Egap_tally->AddScore( EGap ); Labs_tally->AddScore( LAbs ); Lgap_tally->AddScore( LGap ); } void ExN03RunAction::EndOfRunAction(const G4Run* aRun) { ,,,,, Eabs_tally->ShowResult(); Eabs_tally->ShowHistory(); Egap_tally->ShowResult(); Egap_tally->ShowHistory(); Labs_tally->ShowResult(); Labs_tally->ShowHistory(); Lgap_tally->ShowResult(); Lgap_tally->ShowHistory(); } Geant4 Collaboration Workshop 2010-10-6

  4. Output ShowResult()values and logical tests EFFICIENCY = 0.996338 MEAN = 368.83 VAR = 3627.76 SD = 60.2309 R = 0.0025516 SHIFT = -86.9154 VOV = 0.00310814 FOM = 2201.43 THE LARGEST SCORE = 431.408 and it happend at 1425th event Affected Mean = 368.846 and its ratio to orignal is 1.00004 Affected VAR = 3627.83 and its ratio to orignal is 1.00002 Affected R = 0.00255121 and its ratio to orignal is 0.999846 Affected SHIFT = -86.9072 and its ratio to orignal is 0.999905 Affected FOM = 2201.43 and its ratio to orignal is 1 MEAN distribution is not RANDOM r follows 1/std::sqrt(N) r is monotonically decrease 1 r is less than 0.1. r = 0.0025516 VOV follows 1/std::sqrt(N) VOV is monotonically decrease 1 FOM distribution is not RANDOM SLOPE is large enough This result passes 6 / 8 Convergence Test. Geant4 Collaboration Workshop 2010-10-6

  5. Output ShowHistory()trend i/16 till_ith mean varsd r vovfom shift e r2eff r2int 1 255 368.253 3351.08 57.8885 0.00982485 0.0426828 2381.54 -75.4414 1 0 9.61507e-05 2 511 366.976 3686.51 60.7166 0.00731197 0.0196636 2172.34 -76.4552 0.998047 3.82216e-06 4.95383e-05 3 767 366.078 3841.16 61.9771 0.00610909 0.0144748 2075.49 -82.2678 0.996094 5.10621e-06 3.21662e-05 4 1023 366.095 3715.83 60.9576 0.00520336 0.0103351 2133.71 -78.5195 0.99707 2.86943e-06 2.41791e-05 5 1279 367.283 3592.01 59.9334 0.00456103 0.00905412 2216.23 -80.3134 0.996875 2.44906e-06 1.83376e-05 6 1535 365.548 3973.11 63.0326 0.00439972 0.0073182 1990.73 -84.6719 0.996094 2.5531e-06 1.67918e-05 7 1791 365.964 4016.7 63.3774 0.00409098 0.00677035 1969.38 -89.0621 0.99442 3.13151e-06 1.35952e-05 8 2047 366.099 3942.82 62.7919 0.00379001 0.00596075 2005.12 -88.1626 0.994629 2.63677e-06 1.17204e-05 9 2303 366.693 3854.07 62.0812 0.00352709 0.00543865 2053.75 -88.5994 0.995226 2.08212e-06 1.03528e-05 10 2559 367.151 3818.23 61.7918 0.00332634 0.00491706 2075.29 -88.5895 0.995313 1.83968e-06 9.22051e-06 11 2815 367.211 3770.15 61.4015 0.00315099 0.00441452 2105.31 -87.405 0.995739 1.51974e-06 8.40546e-06 12 3071 367.092 3835.82 61.934 0.003044 0.00398929 2069.86 -87.876 0.995768 1.38338e-06 7.87952e-06 13 3327 367.861 3731.13 61.083 0.00287836 0.00377558 2133.28 -87.6999 0.996094 1.17836e-06 7.10409e-06 14 3583 368.469 3692.83 60.7687 0.00275483 0.00360362 2160.84 -88.4698 0.995815 1.17267e-06 6.4143e-06 15 3839 368.856 3610.19 60.0849 0.00262871 0.0033742 2213.45 -87.4147 0.996094 1.02124e-06 5.88707e-06 16 4095 368.83 3627.76 60.2309 0.0025516 0.00310814 2202.06 -86.9154 0.996338 8.97356e-07 5.61173e-06 Geant4 Collaboration Workshop 2010-10-6

  6. Following slides are my presentation at 2005 Geant4 Collaboration workshop Geant4 Collaboration Workshop 2010-10-6

  7. A general assistant tool for the checking results from Monte Carlo simulations Koi, Tatsumi SLAC/SCCS Geant4 Collaboration Workshop 2010-10-6

  8. Contents • Motivation • Precision and Accuracy • Central Limit Theorem • Testing Method • Current Status of Development • Summary Geant4 Collaboration Workshop 2010-10-6

  9. Motivation • After a Monte Carlo simulation, we get an answer. However how to estimate quality of the answer. What we must remember is • Large number of history does not valid result of simulation. • Small Relative Error does not valid result of simulation Geant4 Collaboration Workshop 2010-10-6

  10. Motivation (Cont.) • To provide “statistical information to assist establishing valid confidence intervals for Monte Carlo results” for users, something like MCNPs did. Geant4 Collaboration Workshop 2010-10-6

  11. Subject of this study • Precision of the Monte Carlo simulation • Accuracy of the result is NOT a subject of this study At first we have to define Precision and Accuracy of simulations Geant4 Collaboration Workshop 2010-10-6

  12. Precision and Accuracy • Precision: Uncertainty caused by statistical fluctuation • Accuracy: Difference between expected value and true physical quantity. Accuracy Precision Geant4 Collaboration Workshop 2010-10-6 Mote Carlo Results True Value

  13. Subject of this study (Cont.) • Precision of the Monte Carlo simulation is subject of this study. • To state accuracy of simulations, we should consider details of simulation, i.e., uncertainties of physical data, modeling of physical processes, variance reduction techniques and so on. • To make a generalized tool, we have to limit subjects only for precision. Accuracy is a subject for most of presentations in this workshop. Geant4 Collaboration Workshop 2010-10-6

  14. Principal of this study is Central Limit Theorem Geant4 Collaboration Workshop 2010-10-6

  15. Central Limit Theorem • Every data which are influenced by many small and unrelated random effects has normally distribution. • The estimated mean will appear to be sampled from normal distribution with a KNOWN standard deviation when N approaches infinity. Geant4 Collaboration Workshop 2010-10-6

  16. Central Limit Theorem (Cont.) • Therefore, We have to check that N have approached infinity in the sense of the CLT, or not. • This corresponds to the checking the complete sampling of interested phase space has occurred, or not. Geant4 Collaboration Workshop 2010-10-6

  17. This is not a simple static testbutcheck of results from nature of Monte Carlo simulations Geant4 Collaboration Workshop 2010-10-6

  18. Checking Values • Mean • Variance and Standard Deviation • Relative error • Variance of Variance Geant4 Collaboration Workshop 2010-10-6

  19. Checking Values (Cont.) • Figure of Merit • Scoring Efficiency Rintrinsic and Refficiency • Shift • SLOPE Fit to the Largest history scores Geant4 Collaboration Workshop 2010-10-6

  20. Behavior of MEAN Values of R Time profile of R Values of VOV Time profile of VOV Time profile of FOM Behavior of FOM Value of SLOPE Value of SHIFT Effect of the largest history score occurs on the next history. MEAN R (Rintrinsic and Refficiency) VOV FOM SHIFT What we check? Boolean Answer Numeric Answer Geant4 Collaboration Workshop 2010-10-6

  21. Of cause, Boolean check is carried out mathematically (statistically)valuebehaviortime profile Geant4 Collaboration Workshop 2010-10-6

  22. For behaviors and time profiles check • Derive Pearson’s r from data (results and theoretical values) • r=1(-1), perfect positive (negative) correlation • r=0, uncorrelated • null hypothesis is set to uncorrelated • Then, follows student t distribution of degree of freedom • Checking significance of r with null hypothesis. • Rejection level of null hypothesis is 68.28% (1σ) Geant4 Collaboration Workshop 2010-10-6

  23. Example • Checking value: Observable Energy of Sampling Calorimeter. • Material • Pb (Lead)-Scinitillator • Thickens • Pb: 8.0 mm/layer, Sci: 2.0 mm/layer • Layers • 120 layers • 1 m x 1 m – interaction surface • Beam • Electon 4 GeV • Range Cuts • 1 mm 2mm Pb e- ・・・・・・・・ Geant4 Collaboration Workshop 2010-10-6 8mm Sci.

  24. Example 100 histories MEAN SD R VOV Geant4 Collaboration Workshop 2010-10-6 Does not pass most of Boolean tests

  25. Example 1,000 histories MEAN SD R VOV Geant4 Collaboration Workshop 2010-10-6 Does not pass some of Boolean tests

  26. Example 10,000 histories MEAN SD R VOV Geant4 Collaboration Workshop 2010-10-6 Does not pass one of Boolean tests (SLOPE check)

  27. How to apply Energy Spectrum estimation etc. • Checking each confidence level of P1, P2, P3, P4,,,, • Of course, scoring efficiency becomes low. P1 P2 P3 V/E P4 E Geant4 Collaboration Workshop 2010-10-6

  28. Unfortunately, this tool does not work well with some deterministic variance reduction techniques.This is come from limitation of CLT (means some variance are required for distribution), so that we can not over come. Geant4 Collaboration Workshop 2010-10-6

  29. And some simulations becomes deterministicwithout awaking of users.Please check your simulation carefully. Geant4 Collaboration Workshop 2010-10-6

  30. Current Status of Development • Most part of developments has been done. • Following items are remained under development. • Output of testing result • Class or function for minimization of multi dimensional functions Geant4 Collaboration Workshop 2010-10-6

  31. We want to include this tool in Geant4butwhat category is suite for this tool?Run, SD, Hits and its collections, Tally?? Geant4 Collaboration Workshop 2010-10-6

  32. Summary • We have successfully developed a general assistant tool for the checking the results from Monte Carlo simulations like MCNPs. • Through this tool, users easily know the confidence intervals for Monte Carlo results. Geant4 Collaboration Workshop 2010-10-6

More Related