Skip to content

Add algorithm for calculating and persisting related info (e.g. isolation information)

Thomas Latham requested to merge tlatham_run3_isolation_to_master into master

Created an algorithm (FunctorsToRelTable) to calculate and store information in a RelatedInfoMap and add that map to a relation table to be persisted as extra_output in an HLT2/Spruce line.

Depends on LHCb!4921 (merged), which adds a versioned dictionary that relates the variable labels, e.g. CONE_PX, to the indices that will be used to store them in the RelatedInfoMap and provides tests to ensure the integrity of that dictionary. That functionality is extended here by the following changes:

  • Created in the C++ a compile-time-constant versioned dictionary that, for each version number, relates a set of labels (of string type, e.g. "CONE_PX") to the functors that should be used to calculate the corresponding values
  • Added also a compile-time constant that indicates the latest version of the dictionary
  • Version 0 of the dictionary is intentionally empty
  • The integrity of this versioned dictionary is guaranteed by tests that ensure that a) the structure of this dictionary matches that of the label -> index dictionary in the LHCb project, b) the values computed by the functors do not change for a given set of inputs

The algorithm is configured with a list of variable labels and, optionally, a label -> index/functor dictionary version number that defaults to whatever is the latest version. At initialisation, the algorithm uses the dictionary and the version number to convert the list of labels into the functors to be used to calculate the values and the indices to be used to store them.

Added some functors to be used with the algorithm to make cuts and calculate cone and vertex isolation information:

  • Functors for calculating IP and IPCHI2 of particle wrt end-vertex of another particle

  • Asym and Diff functors in C++ for calculating the Asymmetry/Delta of some quantity related to the 3- or 4-momentum of a particle and the combination of a vector of particles (e.g. those in a given cone around the reference particle)

  • A functor has been composed for calculating the minimum IPCHI2 wrt a composite's decay vertex - a replacement for the SMALLEST_DELTA_CHI2

  • Added a functor to retrieve quantities from a persisted RelatedInfoMap that uses the label-based accessor added in LHCb!4921 (merged)

A previous implementation of the algorithm used with_functor_maps but with a short int key, so with_functor_maps has been modified so that the key type is templated - this is retained here as a potentially useful generalisation.

MRs in Moore and DaVinci that demonstrate the use of this algorithm in HLT2/Spruce lines and how to tuple the output:

cc: @mmonk @fswystun @malehura @ghallett @tfulghes

Edited by Thomas Latham

Merge request reports

Loading