Virtual Meeting - 2016/02/12

New plot: G4_x_err vs. distance (with crossing planes)


  • This plot was motivated by the need to know whether plane intersections alter the errors (in turn, this came from the fact that the errors in the intersection points are way much lower than these errors).
  • Clearly, the maximum x error does not decrease. It even increases from ~5.6 mm to ~6 mm (using 10 crossing planes).
  • Thus, we still have an open question regarding the errors in the intersection points in Geant4. This is summarized next.

Open questions

  • The well-known plots of the intersection points show promising results for Geant4, but they leave aside the time component.
  • In order to check if the explanation for such good results are hidden there, we first modified Geant4 and printed out the time of each detection.
    • These changes were recently validated by Soon in an email conversation.
  • We discovered that the difference between the theoretical time of each intersection and the simulated time where the intersection actually happens is strictly increasing and positive. In other words, G4 always detects geometry crossings before they happen, and it consistently keeps falling behind each time.
  • Nevertheless, there is an inconsistency. From previous experiments we know that the simulated velocity is always below the theoretical velocity. This implies that Geant4's particle will always be behind an hypotetical particle travelling at the theoretical speed (and the distance between them will keep increasing).
  • Thus, it is still not clear why the intersections happen before time and with such accurate values.

Additional test

  • I've taken the last intersection point after 1 km and its crossing time t_0. My intention was to find where the particle should actually be in that t_0, and then compare both positions.
    • In summary, t_0 * v gives the distance travelled, which in turn can be used to find the angle after travelling an integral number of times around the circle and leaving a remainder. Then, using the parametric equation of the circle and this angle, the final position can be retrieved.
  • The distance between these two points was ~3 mm. Curiously, this value matches the maximum x error for 1 km (as shown here).
  • However, the "theoretical point" was behind Geant4's, which should not happen since the theoretical velocity is greater than the simulated one.

New plot: difference between real distance and QSS distance (dQRel = 1e-5)


  • The difference seems to be considerably larger in QSS (~20 m against ~0.6 mm).
  • We validated this result using two different strategies for the calculation of the simulated distance (see section below).
  • The difference also seems to decrease an order of magnitude for each order of magnitude of dQRel (e.g., it is about 200 mm using dQRel = 1e-7 and -2 mm using dQRel = 1e-9).

Arc length calculation for QSS methods

  • In order to generate this last plot, we first investigated how to compute the arc length of a curve in QSS.
  • We did this in two different ways:
    1. Inside the model, adding a new equation to implement this result.
    2. Outside the model, parsing the QSS polynomials saved to a custom log file and then computing the arc length of each section in turn (code here).
  • Even though the second method is slightly more accurate, there are not significative differences between them (for 1 km, the second method was ~200 mm closer to the real distance).

QSS integration within Geant4

  • The progress in this matter was already discussed by email during this week.