Skip to content

Adds functor for brem-corrected momenta / covariance

Maarten Van Veghel requested to merge mveghel-bremfunctors into master

Adds functor for brem-corrected momenta / covariance via a wrapper, see LHCb!3894 (merged) and Moore!2127 (merged).

Idea is to use one brem functor that creates a wrapper around the underlying object (Particle/Track-BremInfo zip/Composite/...). This way one can do e.g. the following:

import Functors as F
PT_WITH_BREM   = F.PT @ F.WITH_BREM
MASS_WITH_BREM = F.MASS @ F.WITH_BREM

Any functor using momenta (incl. covariance) of the object one acts on can then be written to use brem-corrected version, including non-brem added electron or other IDs. Idea is that this will work with DTF functors as well. In addition, this should make SelectiveBremAdder also obsolete. Analysts can then on the fly decide to cut on brem or not-brem corrected momenta, mass, etc., which gives a lot more freedom over the overwritten momenta of Particle objects that SelectiveBremAdder uses. Functors also check Particle objects if BremAdder ran or not (to not double correct).

Accounting for overlap (not double counting brem) in composites should be done using specific composite builders (like FunctionalDiElectronMaker, which runs SelectiveBremAdder) or even better in the future with DTF (as it is a decay-tree dependent momentum calculation). Implementing such a thing with these functors would be dangerous as in-discrepancies might occur when apply the functor on a child (which object is not aware of the mother).

See for further examples also Phys/FunctorCore/tests/src/TestFunctors.cpp.

To do:

  • Add v1 3/4 momentum functionality
  • Factorize/equalize calculations with SelectiveBremAdder
  • Add v1 covariance functions

For future merge request:

  • Overlap accounting with DTF
  • Add v2 functionality

Related issues: LHCb#107, #316 (closed), https://gitlab.cern.ch/lhcb-dpa/project/-/issues/210

Should also address LHCb#237 (closed)

Edited by Maarten Van Veghel

Merge request reports