Refactoring DecayProcess<T> and decay model selection.
As per the discussions during the last corsika-devel meeting (03/06), I've started work on refactoring DecayProcess<T>
and the current concrete implementations (SIBYLL::Decay, Pythia::Decay, TAUOLA). In particular,
- Remove
GetLifetime()
fromDecayProcess<T>
(since it is identical across all implementations) and compute the boosted decay time inCascade::Step
. This was previously discussed in #134. - Remove the duplicate book keeping in the Pythia, Sibyll, and TAUOLA implementations to decide on which model should decay which particle. This was previously discussed in #255.
There are several important design decisions that should be made before I start work on 2). Primarily,
- Do we want the model selection to be "by particle" (so each particle is handled exclusively by one model) or, as suggested in #134, do we want to allow for different decay modes to be assigned to different decay models using the tabulated branching fractions? The first option is more straightforward to implement and might be more self-consistent? Is there a clear advantage to breaking up the decay model by branching fraction?
- Do we want this decision to be made at runtime or at compile-time? There is obviously additional flexibility with being able to configure this as part of the simulation (especially once we start shipping C8 binaries as opposed to sources) but there is a small run-time cost with mapping particle codes to decay implementations. With compile-time polymorphism, the mapping from particle to decay model can be done at compile time so we don't occur any runtime cost for deciding on the decay model for a given particle type.
Does anyone have any thoughts or comments on the above? My inclination is for a "by particle" runtime model but I am open to suggestions!
(cc'ing some people who were involved in the two prior issues: @riehn @rulrich)