Geant4 Cross Reference |
1 2 Example of Convergence Tester 3 4 Koi, Tatsumi 5 SLAC National Accelerator Laboratory 6 tkoi@slac.stanford.eedu 7 8 This example shows how to use convergece teste 9 The aim of Convergence Tester 10 After a Monte Carlo simulation, we get an answ 11 The answer is usually given in a form of avera 12 But sometimes the value is strongly affected b 13 In such case, we must concern about quality of 14 What we must remember is 15 Large number of history does not valid resul 16 Small Relative Error does not valid result o 17 Convergence tester provides statistical inform 18 to assist establishing valid confidence interv 19 20 Geometry and Physics are same to exampleB1. Pl 21 Also run1.mac and run2.mac are like in example 22 increased number of events in run1.mac. 23 Note that in this example, the classes with th 24 the purpose of demonstration of the Convergenc 25 B1Con instead of B1 and also the executable an 26 in exampleB1Con and exampleB1Con.in. 27 28 Known problem: 29 Computing time of T cannot be gotten properly 30 FOM (=1/(R^2T) where R is relative error and T 31 32 ********************************************** 33 Output example 34 35 // Part I.A 36 // Basic statistics values 37 38 G4ConvergenceTester Output Result of DOSE_TALL 39 EFFICIENCY = 0.601 40 MEAN = 4.81721e-12 41 VAR = 2.15334e-23 42 SD = 4.64041e-12 43 R = 0.0304622 44 SHIFT = 2.22459e-13 45 VOV = 0.000166754 46 FOM = 1238.68 47 48 // Part I.B 49 // If the largeset scored events happen at nex 50 // then how much the event effects the statist 51 52 THE LARGEST SCORE = 1.07301e-11 and it happe 53 Affected Mean = 4.82311e-12 and its rati 54 Affected VAR = 2.15468e-23 and its rati 55 Affected R = 0.0304192 and its rati 56 Affected SHIFT = 2.1804e-13 and its rati 57 Affected FOM = 1238.68 and its rati 58 59 // Part I.C 60 // Convergence tests results 61 62 MEAN distribution is RANDOM 63 r follows 1/std::sqrt(N) 64 r is monotonically decrease 65 r is less than 0.1. r = 0.0304622 66 VOV follows 1/std::sqrt(N) 67 VOV is monotonically decrease 68 FOM distribution is not RANDOM 69 SLOPE is not large enough 70 This result passes 6 / 8 Convergence Test. 71 72 73 // Part II 74 // Profile of statistics values in the history 75 76 G4ConvergenceTester Output History of DOSE_TAL 77 i/16 till_ith mean var 78 1 62 4.94618e-12 2.04631e-23 4.52362e 79 2 124 4.69364e-12 2.10698e-23 4.59018e 80 3 187 4.72161e-12 2.14009e-23 4.62612e 81 4 249 4.95617e-12 2.13982e-23 4.62582e 82 5 312 4.8529e-12 2.13482e-23 4.62041e 83 6 374 5.14255e-12 2.15736e-23 4.64474e 84 7 437 5.03849e-12 2.13484e-23 4.62043e 85 8 499 4.96962e-12 2.1429e-23 4.62914e 86 9 562 4.91513e-12 2.14709e-23 4.63367e 87 10 624 4.82995e-12 2.13825e-23 4.62412e 88 11 687 4.79197e-12 2.13975e-23 4.62574e 89 12 749 4.77183e-12 2.15116e-23 4.63807e 90 13 812 4.76087e-12 2.14479e-23 4.63119e 91 14 874 4.81359e-12 2.13296e-23 4.6184e 92 15 937 4.82018e-12 2.14558e-23 4.63204e 93 16 999 4.81721e-12 2.15334e-23 4.64041e 94 95 ********************************************** 96 97 Reference of this Convergence tests 98 MCNP(TM) -A General Monte Carlo N-Particle Tra 99 Version 4B 100 Judith F. Briesmeister, Editor 101 LA-12625-M, Issued: March 1997, UC 705 and UC 102 CHAPTER 2. GEOMETRY, DATA, PHYSICS, AND MATHEM 103 VI. ESTIMATION OF THE MONTE CARLO PRECI 104