Skip to content

Fixes to TTree selection and histogram labelling for checks

Dylan Jaide White requested to merge djwhite/checks-treepattern into master

Currently, checks look inside the ntuples produced from lb-ap test for TTrees matching r"(.*Tuple/DecayTree)|(MCDecayTreeTuple.*/MCDecayTree)" and perform the checks on all matching branches. This runs into problems when a production uses multiple TTrees for different channels, as not all branches are the same for each tree, limiting what expressions can be used. For example, in D02HHHH, there are separate TTrees for 4pi, 2K2pi, etc. - if the user tried to create a range histogram check using the branch Kplus_PE, currently there would be no way to prevent this from running & failing on the 4pi TTree.

This MR adds an extra option to the checks portion of info.yaml: tree_pattern. If specified for a check, the check should run only on TTrees that match the provided pattern. If not specified, it takes on the default value of r"(.*/DecayTree)|(.*/MCDecayTree)" (slightly different to the current default, but works more widely).

@gtuci has also added some more information to CheckResult objects, in particular the name of the ttree the data is from and axis labels. While not critical to functionality, it allows for much improved labelling & naming of histograms produced by range and range_nd checks.

Also included is @gtuci 's fix to account for cases with multiple entries in the luminosity tuple.

Documentation for these changes (and the rest of the checks features) is in lhcb-datapkg/AnalysisProductions!137 (merged)

Work related to DPA task https://gitlab.cern.ch/lhcb-dpa/project/-/issues/93.

Edited by Dylan Jaide White

Merge request reports