New experiment: error measures in one cycle, varying epsilon¶
As we already discussed, past experiments have shown some counterintuitive facts that are yet to be explained. On the one hand, the errors computed did not seem to change as epsilon was decreased . Also, we recently observed that Geant4 calls
AccurateAdvance depending at least on the values of
epsilon . After further inspection, we have seen that this function is used even though
QuickAdvance seems to provide acceptable results (fourth item on Nico's last email as of 2015-11-30).
In order to explore this, we designed a new experiment. The goal was not only to have a controlled trajectory with a fixed and well-known number of steps, but also to change the accuracy parameters together and keep them synchronized, since we were usually focusing on
epsilonMax alone. As we show below, these changes follow from the relationship between
Outline of the experiment¶
- The simulation consists of one full cycle of the particle. This was achieved by setting
trackMaxLen = p, where
pis the circle perimeter (see below).
- The idea was to keep the number of steps small, and so we defined
stepMax = p / SLICES, being
SLICESa constant with the value 10.
- As we are focusing on how
deltaOneStepinteract with the step taken so as to decide whether or not
AccurateAdvanceis called, we set
deltaChord = pjust to keep it high enough and make sure that it does not interfere with the experiment.
epsilonMaxare defined in terms of
stepMaxand an additional value
f, which is the factor by which
deltaOneStep = stepMax / f
epsilonMin = epsilonMax = 1 / f
- This way,
epsilon = deltaOneStep / stepMax = stepMax / (f * stepMax) = 1 / f, which explains why
epsilonMaxtake this value.
- Having this framework, the expriment iterates increasing values of
fand takes measures of the maximum r_error obtained and the substep ratio for each run.
- Finally, for this experiment we added a new output line inside
G4ChordFinder::AdvanceChordLimitedso as to expose the values of
FindNextChord, for each step of each run.
Settings and definitions¶
p: circle perimeter. Since its radius is ~38.0854 mm,
p ~= 239.2976256980574 mm.
SLICES: a constant value used to control the number of steps in each run. Set to 10 by default and generic settings.
f: variable that defines how the accuracy parameters are obtained from
stepMax. Each run uses a different value for
f. The range we swept for the results below is
[100, 10^5)with leaps of
r_error(t) = sqrt((G4x(t) - ANx(t))^2 + (G4y(t) - ANy(t))^2)
StepRatio = RHS steps / (output steps * 11)
- The following table summarizes the results we found:
|f||stepMax [mm]||epsilonMin||epsilonMax||deltaOneStep [mm]||max(r_error) [mm]||StepRatio|
- We could not see significant changes in the errors. In fact, the variance of the errors is very small (~2.27e-10).
dyErris not changing, which is also rather surprising. The debug line we added always shows that
dyErr = 1.338101e-02. In consequence, Geant4 should call
epsStep <= 5.59178e-4 = dyErr / stepMax(as
stepMaxis fixed). This last inequality holds for every
f, which is reasonable. Lower values of
epsilonlarger, and thus less work is needed to fulfill this precision requirement.