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.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]
1
2 Example of Convergence Tester
3
4 Koi, Tatsumi
5 SLAC National Accelerator Laboratory / PPA
6 tkoi@slac.stanford.eedu
7
8 This example shows how to use convergece tester in Geant4.
9 The aim of Convergence Tester
10 After a Monte Carlo simulation, we get an answer. However how to estimate quality of the answer.
11 The answer is usually given in a form of average value.
12 But sometimes the value is strongly affected by single or a few events in the full calculation.
13 In such case, we must concern about quality of the value.
14 What we must remember is
15 Large number of history does not valid result of simulation.
16 Small Relative Error does not valid result of simulation
17 Convergence tester provides statistical information
18 to assist establishing valid confidence intervals for Monte Carlo results for users.
19
20 Geometry and Physics are same to exampleB1. Please see README.B1
21 Also run1.mac and run2.mac are like in exampleB1, with the only diffrence slightly
22 increased number of events in run1.mac.
23 Note that in this example, the classes with the code added for
24 the purpose of demonstration of the Convergence Tester are defined in the namespace
25 B1Con instead of B1 and also the executable and the test macro names are changed
26 in exampleB1Con and exampleB1Con.in.
27
28 Known problem:
29 Computing time of T cannot be gotten properly in current MT migration of example of B1Con. Therefore
30 FOM (=1/(R^2T) where R is relative error and T is computing time) relates numbers are unusable.
31
32 ***********************************************************************************************************************
33 Output example
34
35 // Part I.A
36 // Basic statistics values
37
38 G4ConvergenceTester Output Result of DOSE_TALLY
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 next to the last event,
50 // then how much the event effects the statistics values of the calculation
51
52 THE LARGEST SCORE = 1.07301e-11 and it happend at 487th event
53 Affected Mean = 4.82311e-12 and its ratio to orignal is 1.00123
54 Affected VAR = 2.15468e-23 and its ratio to orignal is 1.00062
55 Affected R = 0.0304192 and its ratio to orignal is 0.998587
56 Affected SHIFT = 2.1804e-13 and its ratio to orignal is 0.980133
57 Affected FOM = 1238.68 and its ratio to orignal is 1
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_TALLY
77 i/16 till_ith mean var sd r vov fom shift e r2eff r2int
78 1 62 4.94618e-12 2.04631e-23 4.52362e-12 0.115225 0.00313634 86.5745 -1.73435e-14 0.619048 0.00976801 0.00329797
79 2 124 4.69364e-12 2.10698e-23 4.59018e-12 0.0874712 0.001597 150.228 3.11143e-13 0.6 0.00533333 0.00225666
80 3 187 4.72161e-12 2.14009e-23 4.62612e-12 0.0714575 0.00101852 225.105 3.1009e-13 0.590426 0.00368986 0.00138916
81 4 249 4.95617e-12 2.13982e-23 4.62582e-12 0.0590299 0.000690138 329.865 9.71971e-14 0.62 0.00245161 0.00101898
82 5 312 4.8529e-12 2.13482e-23 4.62041e-12 0.0538155 0.000573301 396.887 1.95662e-13 0.607029 0.00206827 0.000818582
83 6 374 5.14255e-12 2.15736e-23 4.64474e-12 0.046641 0.000432121 528.379 -6.42963e-14 0.637333 0.00151743 0.000652145
84 7 437 5.03849e-12 2.13484e-23 4.62043e-12 0.0438173 0.000379317 598.673 2.54207e-14 0.636986 0.00130112 0.000614447
85 8 499 4.96962e-12 2.1429e-23 4.62914e-12 0.0416574 0.000329007 662.364 9.27708e-14 0.63 0.0011746 0.000557264
86 9 562 4.91513e-12 2.14709e-23 4.63367e-12 0.0397316 0.000285324 728.13 1.33544e-13 0.623446 0.0010728 0.000502991
87 10 624 4.82995e-12 2.13825e-23 4.62412e-12 0.0382954 0.000272664 783.766 2.19101e-13 0.616 0.000997403 0.000466792
88 11 687 4.79197e-12 2.13975e-23 4.62574e-12 0.0368022 0.000251788 848.661 2.48547e-13 0.606105 0.000944593 0.000407838
89 12 749 4.77183e-12 2.15116e-23 4.63807e-12 0.0354912 0.000227501 912.513 2.6728e-13 0.601333 0.000883962 0.000373986
90 13 812 4.76087e-12 2.14479e-23 4.63119e-12 0.0341162 0.000212259 987.548 2.70437e-13 0.597786 0.000827601 0.000334885
91 14 874 4.81359e-12 2.13296e-23 4.6184e-12 0.0324353 0.0001976 1092.56 2.14521e-13 0.603429 0.000751082 0.000299767
92 15 937 4.82018e-12 2.14558e-23 4.63204e-12 0.0313767 0.000181379 1167.52 2.18545e-13 0.601279 0.000706952 0.000276498
93 16 999 4.81721e-12 2.15334e-23 4.64041e-12 0.0304622 0.000166754 1238.68 2.22459e-13 0.601 0.000663894 0.000263125
94
95 **************************************************************************************************************************
96
97 Reference of this Convergence tests
98 MCNP(TM) -A General Monte Carlo N-Particle Transport Code
99 Version 4B
100 Judith F. Briesmeister, Editor
101 LA-12625-M, Issued: March 1997, UC 705 and UC 700
102 CHAPTER 2. GEOMETRY, DATA, PHYSICS, AND MATHEMATICS
103 VI. ESTIMATION OF THE MONTE CARLO PRECISION
104