Project

General

Profile

Meeting 2015 10 30

Objectives Proposed during last meeting

  1. (P0) (DONE) Check the values and precision of the parameters involved in Geant4, QSS and analytical solution are exactly the same.
  2. (P0) (DONE) Plot the difference between the simulated velocity and the expected value (which is a parameter in the model).
  3. (P1) (DONE. TODO: summarize results) For each simulation with a certain number of planes, calculate the error of the simulation.
  4. (P3) (PARTIALLY DONE) Improve last meeting plots which compare Geant4, QSS3 and DOPRI5 performance.
    • Format issues (scales, line colors, etc.)
    • TODO: Make statistic on many (10?) simulations for the points and add {simulationTime, simulationTimeError} for each number of planes.
    • How does DOPRI5 find the intersection with the planes?
  5. (P1) New Experiment: varying stepMax (from 0.1mm to 100mm) calculate the error in the first steps (in the position and in the velocity, also the error which is compared to epsilon in Geant4)
  6. (P1) Repeat Experiment 1: debug what is the error in Geant4 stepper, which is to be compared with epsilon.
  7. (P2) New Experiment: study impact of deltaInt parameter in Geant4 when changing the number of planes.
  8. (P3) Make some experiments with a different magnetic field:
    B(x,y) = (B/R) sqrt( x*x + (y+R)*(y+R)) zhat (where B= constant, zhat is the directional vector along the z axis, R is the radius of the circle)
    This field will keep the problem same as it is, but will give a deviation if the particle is off the circle
    (due to the error of the stepper).
  9. (P3) Introduce discrete stochastic events simulating an artificial decay.
  10. Introduce a different graphical representation (such as changing the color of the scatter points) for each different type of errors.
    • What are the different possible kind of errors?
  11. (P1) Summarize all the information Nico learnt with Soon about the transportation chain in a slide, or a handwritten sketch.
  12. (P1) (DONE) Group presentation on Thursday by Nico.
  13. (P1) (DONE) Understand why deltaInt parameter is needed in Geant4.
  14. (P2) Plot a histogram of the x position in Geant4 and QSS when a certain plane at x_m is crossed.
  15. (P1) Change performance plots for 'speed-up'

Constant Values

After last meeting, we found a few inconsistencies in the constants we were using as parameters in our external scripts and the ones used internally by Geant4.

  • c is consistent
    • In Line 54: /opt/geant4/geant4.10.01.p01/source/externals/clhep/include/CLHEP/Units/PhysicalConstants.
      static const double c_light = 2.99792458e+8 * m/s;
    • We used:
      c = 299.792458
  • gamma is inconsistent
    • We used:
      gamma = 22.366272
    • which is inconsistent with the value
      gamma = np.sqrt(1/(1 - (v0/c)**2)) = 22.3662720421
  • Electron mass (M) is inconsistent
    • In Line 85 /opt/geant4/geant4.10.01.p01/source/externals/clhep/include/CLHEP/Units/PhysicalConstants.h
      static const double electron_mass_c2 = 0.510998910 * MeV;
    • We used:
      old_M = 0.5109989
  • Kinetic Energy is inconsistent: ** In Geant4, we were using a value for Kinetic Energt which was different to the one that can be calculated either with the old or new values of the constants:
    /gun/energy 10.9181415106 MeV (this 'wrong' value was taken from the original wiki entry).
    • The new and correct value for Kinetic Energy should be:
      /gun/energy 10.9181417243 MeV
  • A few experiments were reran and no difference in the plots nor in the errors was noticed.
    This seems reasonable considering this corrections are of very low order, and our errors are larger.
  • As a conclusion, this is an error we have to correct but which doesn't modify our previous results and leaves open the same questions as before regarding the invariance of error when changing epsilon.

Velocity Error Plots


Figure 1: VError (difference between simulated and expected value) vs distance


Figure 2: VError (difference between simulated and expected value) histogram

  • We notice the simulated velocity is always smaller than the expected velocity.
  • Why is this happening?

Error in Simulations varying # Planes

QSS3 - Tolerance = 1e-3 & AbsTolerance = 1e-6

r_RMSE:
1 planes
2.12E+01 | 6.07E+00 | 7.45E-01 | 8.19E-02 | 7.00E-03 | 4.26E-04 | 4.38E-12 |
6 planes
2.12E+01 | 6.07E+00 | 7.40E-01 | 8.10E-02 | 7.00E-03 | 4.26E-04 | 4.38E-12 |
11 planes
2.12E+01 | 6.06E+00 | 7.39E-01 | 8.15E-02 | 7.00E-03 | 4.26E-04 | 4.38E-12 |
21 planes
2.13E+01 | 6.06E+00 | 7.39E-01 | 8.17E-02 | 7.00E-03 | 4.26E-04 | 4.38E-12 |
41 planes
2.12E+01 | 6.06E+00 | 7.40E-01 | 8.16E-02 | 7.00E-03 | 4.26E-04 | 4.38E-12 |
81 planes
2.12E+01 | 6.07E+00 | 7.46E-01 | 8.19E-02 | 7.00E-03 | 4.26E-04 | 4.38E-12 |
101 planes
2.12E+01 | 6.07E+00 | 7.49E-01 | 8.24E-02 | 7.00E-03 | 4.26E-04 | 4.38E-12 |
151 planes
2.11E+01 | 6.06E+00 | 7.46E-01 | 8.12E-02 | 7.00E-03 | 4.26E-04 | 4.38E-12 |
201 planes
2.13E+01 | 6.06E+00 | 7.41E-01 | 8.10E-02 | 7.00E-03 | 4.26E-04 | 4.38E-12 |

X_maxError:
1 planes
3.74E+01 | 1.25E+01 | 1.47E+00 | 1.36E-01 | 9.10E-03 | 5.65E-04 | 1.52E-12 |
6 planes
3.74E+01 | 1.25E+01 | 1.44E+00 | 1.37E-01 | 9.10E-03 | 5.65E-04 | 1.52E-12 |
11 planes
3.74E+01 | 1.24E+01 | 1.45E+00 | 1.37E-01 | 9.10E-03 | 5.65E-04 | 1.52E-12 |
21 planes
3.74E+01 | 1.25E+01 | 1.45E+00 | 1.37E-01 | 9.10E-03 | 5.65E-04 | 1.52E-12 |
41 planes
3.74E+01 | 1.25E+01 | 1.48E+00 | 1.37E-01 | 9.10E-03 | 5.65E-04 | 1.52E-12 |
81 planes
3.74E+01 | 1.26E+01 | 1.48E+00 | 1.37E-01 | 9.10E-03 | 5.65E-04 | 1.52E-12 |
101 planes
3.74E+01 | 1.25E+01 | 1.50E+00 | 1.37E-01 | 9.10E-03 | 5.65E-04 | 1.52E-12 |
151 planes
3.74E+01 | 1.25E+01 | 1.50E+00 | 1.37E-01 | 9.10E-03 | 5.65E-04 | 1.52E-12 |
201 planes
3.74E+01 | 1.25E+01 | 1.47E+00 | 1.37E-01 | 9.10E-03 | 5.65E-04 | 1.52E-12 |

QSS3 - Tolerance = 1e-5 & AbsTolerance = 1e-8

r_RMSE:
1 planes
2.71E+00 | 2.76E-01 | 2.78E-02 | 2.82E-03 | 1.99E-04 | 1.56E-05 | 2.94E-07 |
6 planes
2.71E+00 | 2.76E-01 | 2.77E-02 | 2.82E-03 | 1.99E-04 | 1.56E-05 | 2.94E-07 |
11 planes
2.71E+00 | 2.76E-01 | 2.76E-02 | 2.81E-03 | 1.99E-04 | 1.56E-05 | 2.94E-07 |
21 planes
2.71E+00 | 2.76E-01 | 2.77E-02 | 2.82E-03 | 1.99E-04 | 1.56E-05 | 2.94E-07 |
41 planes
2.71E+00 | 2.76E-01 | 2.77E-02 | 2.80E-03 | 1.99E-04 | 1.56E-05 | 2.94E-07 |
81 planes
2.71E+00 | 2.76E-01 | 2.77E-02 | 2.83E-03 | 1.99E-04 | 1.56E-05 | 2.94E-07 |
101 planes
2.71E+00 | 2.76E-01 | 2.78E-02 | 2.83E-03 | 1.99E-04 | 1.56E-05 | 2.94E-07 |
151 planes
2.71E+00 | 2.76E-01 | 2.77E-02 | 2.80E-03 | 1.99E-04 | 1.56E-05 | 2.94E-07 |
201 planes
2.71E+00 | 2.76E-01 | 2.76E-02 | 2.81E-03 | 1.99E-04 | 1.56E-05 | 2.94E-07 |

X_maxError:
1 planes
4.51E+00 | 4.60E-01 | 4.60E-02 | 4.49E-03 | 3.88E-04 | 3.32E-05 | 5.76E-07 |
6 planes
4.51E+00 | 4.59E-01 | 4.58E-02 | 4.48E-03 | 3.88E-04 | 3.32E-05 | 5.76E-07 |
11 planes
4.51E+00 | 4.60E-01 | 4.57E-02 | 4.44E-03 | 3.88E-04 | 3.32E-05 | 5.76E-07 |
21 planes
4.51E+00 | 4.60E-01 | 4.58E-02 | 4.47E-03 | 3.88E-04 | 3.32E-05 | 5.76E-07 |
41 planes
4.51E+00 | 4.60E-01 | 4.58E-02 | 4.43E-03 | 3.88E-04 | 3.32E-05 | 5.76E-07 |
81 planes
4.51E+00 | 4.60E-01 | 4.58E-02 | 4.50E-03 | 3.88E-04 | 3.32E-05 | 5.76E-07 |
101 planes
4.51E+00 | 4.60E-01 | 4.59E-02 | 4.50E-03 | 3.88E-04 | 3.32E-05 | 5.76E-07 |
151 planes
4.51E+00 | 4.60E-01 | 4.58E-02 | 4.43E-03 | 3.88E-04 | 3.32E-05 | 5.76E-07 |
201 planes
4.51E+00 | 4.60E-01 | 4.57E-02 | 4.44E-03 | 3.88E-04 | 3.32E-05 | 5.76E-07 |

DOPRI5 - Tolerance = 1e-3 & AbsTolerance = 1e-6

r_RMSE:
1 planes
4.75E+01 | 1.16E+01 | 1.16E+00 | 9.27E-02 | 9.58E-04 | 8.80E-07 | 9.62E-08 |
6 planes
1.03E+03 | 4.74E+01 | 1.96E+00 | 1.70E-01 | 2.16E-03 | 8.80E-07 | 9.62E-08 |
11 planes
5.61E+02 | 4.77E+01 | 3.09E+00 | 2.91E-01 | 8.46E-03 | 4.20E-06 | 9.62E-08 |
21 planes
3.11E+02 | 3.08E+01 | 2.66E+00 | 2.69E-01 | 1.63E-02 | 4.89E-05 | 9.62E-08 |
41 planes
1.80E+02 | 1.83E+01 | 1.69E+00 | 1.71E-01 | 1.43E-02 | 1.62E-04 | 9.62E-08 |
81 planes
1.09E+02 | 1.09E+01 | 1.06E+00 | 1.06E-01 | 9.67E-03 | 2.56E-04 | 9.62E-08 |
101 planes
9.29E+01 | 9.31E+00 | 8.99E-01 | 9.19E-02 | 8.66E-03 | 3.08E-04 | 5.07E-07 |
151 planes
7.07E+01 | 7.15E+00 | 6.95E-01 | 7.14E-02 | 6.97E-03 | 2.82E-04 | 3.44E-07 |
201 planes
5.91E+01 | 6.04E+00 | 5.88E-01 | 5.97E-02 | 6.01E-03 | 2.45E-04 | 4.00E-07 |

X_maxError:
1 planes
6.58E+01 | 1.98E+01 | 1.97E+00 | 1.74E-01 | 2.30E-03 | 2.14E-06 | 2.14E-07 |
6 planes
1.33E+03 | 7.94E+01 | 3.22E+00 | 2.95E-01 | 1.88E-03 | 2.14E-06 | 2.14E-07 |
11 planes
7.17E+02 | 7.64E+01 | 5.49E+00 | 5.06E-01 | 5.14E-03 | 9.37E-06 | 2.14E-07 |
21 planes
3.96E+02 | 4.98E+01 | 4.48E+00 | 4.66E-01 | 1.40E-02 | 1.30E-04 | 2.14E-07 |
41 planes
2.29E+02 | 2.99E+01 | 2.91E+00 | 2.85E-01 | 1.35E-02 | 4.41E-04 | 2.14E-07 |
81 planes
1.47E+02 | 1.80E+01 | 1.80E+00 | 1.75E-01 | 9.91E-03 | 6.12E-04 | 2.14E-07 |
101 planes
1.30E+02 | 1.54E+01 | 1.54E+00 | 1.50E-01 | 9.47E-03 | 6.84E-04 | 1.22E-06 |
151 planes
1.07E+02 | 1.19E+01 | 1.19E+00 | 1.16E-01 | 8.49E-03 | 5.67E-04 | 8.14E-07 |
201 planes
9.17E+01 | 1.00E+01 | 1.01E+00 | 9.72E-02 | 7.80E-03 | 4.66E-04 | 8.29E-07 |

DOPRI5 - Tolerance = 1e-5 & AbsTolerance = 1e-8

r_RMSE:
1 planes
2.28E+00 | 2.32E-01 | 2.31E-02 | 2.23E-03 | 1.28E-04 | 3.29E-06 | 9.62E-08 |
6 planes
1.63E+00 | 1.65E-01 | 1.64E-02 | 1.66E-03 | 1.31E-04 | 3.29E-06 | 9.62E-08 |
11 planes
1.71E+00 | 1.77E-01 | 1.76E-02 | 1.77E-03 | 1.25E-04 | 5.13E-06 | 9.62E-08 |
21 planes
2.54E+00 | 2.29E-01 | 2.14E-02 | 2.11E-03 | 1.95E-04 | 4.85E-06 | 9.62E-08 |
41 planes
3.51E+00 | 3.52E-01 | 3.45E-02 | 3.53E-03 | 3.86E-04 | 3.17E-06 | 9.62E-08 |
81 planes
2.42E+00 | 2.60E-01 | 2.42E-02 | 2.46E-03 | 3.43E-04 | 5.08E-06 | 9.62E-08 |
101 planes
1.89E+00 | 2.02E-01 | 2.01E-02 | 2.11E-03 | 3.22E-04 | 6.32E-06 | 5.07E-07 |
151 planes
1.04E+00 | 1.18E-01 | 1.20E-02 | 1.31E-03 | 2.37E-04 | 5.44E-06 | 3.44E-07 |
201 planes
7.21E-01 | 7.31E-02 | 7.15E-03 | 8.19E-04 | 1.97E-04 | 4.39E-06 | 5.12E-07 |

X_maxError:
1 planes
3.94E+00 | 4.00E-01 | 3.97E-02 | 3.85E-03 | 3.15E-04 | 8.12E-06 | 2.14E-07 |
6 planes
2.81E+00 | 2.82E-01 | 2.81E-02 | 2.75E-03 | 3.20E-04 | 8.12E-06 | 2.14E-07 |
11 planes
2.94E+00 | 2.96E-01 | 3.02E-02 | 2.95E-03 | 3.06E-04 | 1.04E-05 | 2.14E-07 |
21 planes
4.40E+00 | 3.86E-01 | 3.68E-02 | 3.64E-03 | 2.64E-04 | 1.09E-05 | 2.14E-07 |
41 planes
5.98E+00 | 5.87E-01 | 5.93E-02 | 5.88E-03 | 3.86E-04 | 4.81E-06 | 2.14E-07 |
81 planes
4.10E+00 | 4.35E-01 | 4.20E-02 | 4.04E-03 | 3.08E-04 | 1.17E-05 | 2.14E-07 |
101 planes
3.21E+00 | 3.38E-01 | 3.44E-02 | 3.44E-03 | 2.80E-04 | 1.49E-05 | 1.22E-06 |
151 planes
1.76E+00 | 1.95E-01 | 2.05E-02 | 2.15E-03 | 2.18E-04 | 1.12E-05 | 8.14E-07 |
201 planes
1.24E+00 | 1.22E-01 | 1.22E-02 | 1.21E-03 | 1.90E-04 | 7.31E-06 | 1.19E-06 |