Introduce MCReplay engine based on Virtual Monte Carlo
Given logged steps extracted with the MCStepLogger
, this engine replays the logged steps exactly (no actual physics and stepping is simulated and it is therefore not a real Monte Carlo engine for that reason but it is significantly faster).
The main motivation for this implementation is the optimisation of simulation parameters by e.g. comparing the baseline hits with those produced after varying parameters. The replay has been tested with GEANT3_VMC
and GEANT4_VMC
at this point.
No additional dependencies were introduced.
The MCStepLogger
logs a few additional information required for a replay. In particular, the geometry paths of new tracks or those at volume boundaries are stored to exactly restore the appropriate geometry state (which cannot be guaranteed to be initialised exactly from only spatial information, in particular close to volume boundaries).
At the same time the code was re-organised.