- Table of contents
- Meeting 2015 10 16
Meeting 2015 10 16¶
Objectives Proposed during last meeting¶
- (DONE) Finish all calculations internally in Geant4.
* RHS calculations. See last commits by Lucio.
* Error calculations. See my last commit.
The errors are calculated 100% internally and in the numerically correct way (in the r_error case) also are not varying with epsilon. Actually, they vary very slightly and they become larger when we decrease epsilon. - (DONE partially) Run again all experiments (in Geant4 with the new internal calculations, and in QSS instead of PD)
- (DONE) Add boundaries to the QSS solver.
- (DONE partially: missing error calculation) In parallel to solving the epsilon mistery try running an experiment with a stand-alone implementation of RungeKutta 4/5. Proposal: do this using the QSS Solver!
- Keep in mind the relation between epsilon and deltaInt in each of the experiments (more of a reminder than a task).
Generic settings¶
/N02/det/trackMaxSteps 1000000000
/N02/det/trackMaxLen 10 km
/gun/energy 10.9181415106 MeV
/N02/prec/setDeltaOne 1.0e-2 mm
/N02/prec/setDeltaInt 1.0e-5 mm
/N02/prec/setEpsilonMin 1.0e-3
/N02/prec/setEpsilonMax 1.0e-3
/N02/prec/setDeltaChord 0.25 mm
/N02/det/stepMax 20. mm
- All measured times correspond to executions (both of G4 or PD) which don't produce output at all (or produce a minimum logging).
- MSE is the Mean Squared Error of the position
- MSE = 1/N * sum_{i=1}^{N} (G4x_i - ANx_i)^2 + (G4y_i - ANy_i)^2
- N = Number of output points
- r_RMSE = sqrt(MSE)
- max(X_Error) is the maximum of all the absolute errors in x, i.e. max(abs(G4x_i - ANx_i))
- circle_RMSE is the RMSE of the accumulated distances from the simulated position to the analytical circle.
- circle_RMSE = sqrt(1/N * sum_{i=1}^{N} circleError_i^2)
- circleError_i = |sqrt(G4x_i^2 + (G4y_i + 38.0854)^2) - 38.0854|
Experiment 1.1 - Vary epsilon in G4 & Calculate errors inside G4¶
epsilonMax = epsilonMin = epsilon
The errors still show an unusual behavior. They don't vary, or even grow, when making epsilon smaller. This is counterintuitive. Also, the circle_RMSE doesn't vary much with distance whereas the other errors do, showing the movement is stable around the circle, but the error comes from a "time phase" which seems to increase over time.
100 mm | 1 m | 10 m | 100 m | 1 km | |||||||||||||||
epsilon | Simulation Time[s] | RHS evaluation steps | Output Steps | round(Steps Ratio / 11) | r_RMSE [mm] | Max(X_Error) [mm] | circle_RMSE [mm] | r_RMSE [mm] | Max(X_Error) [mm] | circle_RMSE [mm] | r_RMSE [mm] | Max(X_Error) [mm] | circle_RMSE [mm] | r_RMSE [mm] | Max(X_Error) [mm] | circle_RMSE [mm] | r_RMSE [mm] | Max(X_Error) [mm] | circle_RMSE [mm] |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1E-3 | 1.58 | 1.65E6 | 50001 | 3 | 3.3E-5 | 1.85E-5 | 1.64E-4 | 2.5E-4 | 1.75E-4 | 1.81E-4 | 2.89E-3 | 1.73E-3 | 1.87E-4 | 2.95E-2 | 1.73E-2 | 1.87E-4 | 2.99E-1 | 1.73E-1 | 1.87E-4 |
1E-4 | 1.52 | 1.65E6 | 50001 | 3 | 3.3E-5 | 1.85E-5 | 1.64E-4 | 2.5E-4 | 1.75E-4 | 1.81E-4 | 2.89E-3 | 1.73E-3 | 1.87E-4 | 2.95E-2 | 1.73E-2 | 1.87E-4 | 2.99E-1 | 1.73E-1 | 1.87E-4 |
1E-5 | 1.54 | 1.65E6 | 50001 | 3 | 3.3E-5 | 1.85E-5 | 1.64E-4 | 2.5E-4 | 1.75E-4 | 1.81E-4 | 2.89E-3 | 1.73E-3 | 1.87E-4 | 2.95E-2 | 1.73E-2 | 1.87E-4 | 2.99E-1 | 1.73E-1 | 1.87E-4 |
1E-6 | 2.41 | 3.85E6 | 50001 | 7 | 3.3E-5 | 1.87E-5 | 1.67E-4 | 2.52E-4 | 1.76E-4 | 1.82E-4 | 2.91E-3 | 1.74E-3 | 1.88E-4 | 2.97E-4 | 1.74E-2 | 1.88E-4 | 3.01E-1 | 1.74E-1 | 1.88E-4 |
1E-7 | 3.19 | 6.05E6 | 50001 | 11 | 3.3E-5 | 1.87E-5 | 1.67E-4 | 2.52E-4 | 1.76E-4 | 1.82E-4 | 2.91E-3 | 1.74E-3 | 1.88E-4 | 2.97E-4 | 1.74E-2 | 1.88E-4 | 3.01E-1 | 1.74E-1 | 1.88E-4 |
1E-8 | 4.20 | 1.05E7 | 50001 | 19 | 3.3E-5 | 1.87E-5 | 1.67E-4 | 2.52E-4 | 1.76E-4 | 1.82E-4 | 2.91E-3 | 1.74E-3 | 1.88E-4 | 2.97E-4 | 1.74E-2 | 1.88E-4 | 3.01E-1 | 1.74E-1 | 1.88E-4 |
1E-9 | 6.13 | 1.59E7 | 50001 | 29 | 3.3E-5 | 1.87E-5 | 1.67E-4 | 2.52E-4 | 1.76E-4 | 1.82E-4 | 2.91E-3 | 1.74E-3 | 1.88E-4 | 2.97E-4 | 1.74E-2 | 1.88E-4 | 3.01E-1 | 1.74E-1 | 1.88E-4 |
1E-10 | 9.30 | 2.70E7 | 50001 | 49 | 3.3E-5 | 1.87E-5 | 1.67E-4 | 2.52E-4 | 1.76E-4 | 1.82E-4 | 2.91E-3 | 1.74E-3 | 1.88E-4 | 2.97E-4 | 1.74E-2 | 1.88E-4 | 3.01E-1 | 1.74E-1 | 1.88E-4 |
1E-11 | 15.06 | 4.57E7 | 50001 | 83 | 3.3E-5 | 1.87E-5 | 1.67E-4 | 2.52E-4 | 1.76E-4 | 1.82E-4 | 2.91E-3 | 1.74E-3 | 1.88E-4 | 2.97E-4 | 1.74E-2 | 1.88E-4 | 3.01E-1 | 1.74E-1 | 1.88E-4 |
1E-12 | 24.73 | 7.87E7 | 50001 | 143 | 3.3E-5 | 1.87E-5 | 1.67E-4 | 2.52E-4 | 1.76E-4 | 1.82E-4 | 2.91E-3 | 1.74E-3 | 1.88E-4 | 2.97E-4 | 1.74E-2 | 1.88E-4 | 3.01E-1 | 1.74E-1 | 1.88E-4 |
Plots using the Solver¶
No planes, simulation during 3339 ns (equivalente to 1km distance)
Fig 1: {x,y}[mm] vs time [ns], QSS3, Tolerance = 1E-3
Fig 2: {x,y}[mm] vs time [ns], QSS3, Tolerance = 1E-5
Fig 3: {x,y}[mm] vs time [ns], DOPRI5, Tolerance = 1E-3
Fig 4: {x,y}[mm] vs time [ns], DOPRI5, Tolerance = 1E-5
Simulation Time vs # Planes for each method¶
Fig 5: Simulation Time [ms] vs #Planes (linear scale in y axis)
Fig 6: Simulation Time [ms] vs #Planes (log scale in y axis)