Support electrons and bremsstrahlung in the new/v2 event model
In the old/v1 event model, bremsstrahlung recovery was provided by the BremAdder
algorithm, which either performed a matching itself or used a matching produced by the calorimeter reconstruction. The results were stored directly in the e^\pm
LHCb::Particle
object momentum.
In this model, the sum of bremsstrahlung photon 4-momenta is encoded in the difference between the "particle" and "track" momentum of an electron, and the number of photons is stored in the particle extra information. Individual photon momenta are not stored, and can only be determined by re-running the recovery, which is only possible if the full reconstructed event has been saved. This leads to contortions in code that operates on electrons, and has resulted in bugs when special handling for electrons was not included everywhere.
The old model is also problematic in the Gaudi::Functional
world, where data that has been placed on the TES is immutable; an algorithm like BremAdder
would have to copy its input as modifying it in-place is forbidden. And the current proposal of charged basic particles being a zip of "fitted tracks + other stuff" does not include the concept of a particle momentum that is distinct from the track momentum.
A more natural solution would be to add a new event model container that stores bremsstrahlung photons, and to include this in the zip definition of charged basic particles (see also the discussion in #106; it may prove pragmatic not to define a separate "charged basic particles with bremsstrahlung" type). These photons would then have to be explicitly counted/added where relevant (example: the combiner algorithm should add the union of child bremsstrahlung photons to the composite 4-momentum; example: the PT
functor, when applied to a zip of tracks and bremsstrahlung photons, should return the transverse part of the sum of the track and bremsstrahlung 3-momenta).
The alternative solution where bremsstrahlung-corrected electrons are defined as composites with an e^\pm\rightarrow e^\pm \gamma
decay chain appears inferior (it seems inevitable that this would need more special cases in the combiner, you would have to define a vertex position, you could not then easily do track extrapolations with the "composite electron", ...).
See also: discussion in Phys#12 (closed) of the interplay between bremsstrahlung recovery and overlap checking.