Add SelReport writer

Merged Thomas Boettcher requested to merge thboettc_selreports_jan2021mc into master

Added SelReports writer. The raw bank structure is described here:

The raw bank contains 4 sub-banks:

For each sub-bank, separate algorithms determine the objects to be saved (and calculate the bank size) and populate the banks. This requires multiple new algorithms:

  • count_long_track_hits: Counts the total hits used in reconstructed long tracks in each event.
  • make_hits_container: Copies the LHCbIDs for each hit used in a long track to a consolidated container.
  • calc_rb_hits_size: Calculates the size of the Hits sub-bank. Also creates lists of selected physics objects, which are used to calculate the sizes of and construct the other sub-banks.
  • calc_rb_substr_size: Calculates the size of the Substr and StdInfo sub-banks. Also creates a list of passing trigger lines.
  • make_rb_hits: Constructs the Hits sub-bank.
  • make_rb_substr: Constructs the Substr sub-bank.
  • make_rb_stdinfo: Constructs the StdInfo sub-bank. For now the StdInfo contains only 0 for physics objects and the selection ID for selection objects.
  • make_rb_objtyp: Constructs the ObjTyp sub-bank.
  • calc_selrep_size: Calculates the total size of the SelReport for each event.
  • make_selreps: Constructs the SelReport header and copies the sub-banks into the final SelReport buffer. If the --output-file flag is specified, the SelRerports are written to the output MDF file via the OutputHandler.

Added SelReportChecker, which prints summaries of the SelReport contents including the number of events selected by each line, the total number of candidates that fire each line, and the total numbers of tracks, SVs, and hits saved. The SelReportChecker output has been added to the reference files and will be checked as part of the physics efficiency test.

This MR also includes the fix in !570 (merged), which is necessary to for the sequence to run on GPUs.

Edited by Thomas Boettcher

Merge request reports