Fix rules in the menu chain ordering and merge dictionaries for signatures into one

As discussed in !77514 (closed), I have reviewed the leg ordering in the chain names and made the chain validation test, that runs in all menu CI tests, more robust. It includes two main parts:

  • Fix of the current test: during my investigation I have found that the validation test that is used in test_HLTmenu.py is currently basically null, because it does not catch the correct patterns (a “_” was missing in the regex), and thus do not report any error. I have fixed it, and maintained the rule that the order is the same even if one of the legs is a probe, so in principle the ‘probe’ string can be anywhere in the chain name. For example chain HLT_e5_idperf_loose_lrtloose_probe_g25_medium_L1eEM24L has probe electrons + photons. The order is correct from the dictionary (first e, then g), but does the probe leg has to be the last one in the name (last leg), for any reason? Maybe the code is simpler in the alignment, but I have to check it. First I would like to check with you if there are basic reasons. With this rule, I found 10 chains failing the ordering rules in Phy & Dev Menu:
_2mu14_g20_tight_probe_L1eEM18M_L12MU8F _2mu14_g22_tight_probe_L1eEM18M_L12MU8F  _2mu14_g25_medium_probe_L1eEM24L_L12MU8F _2mu14_g35_medium_probe_L1eEM24L_L12MU8F _2mu14_g50_loose_probe_L1eEM24L_L12MU8F 
_j30_mu3vtx_L12MU8F 
_xe0_nn_j0_HT500XX0eta240_pf_ftf_preselcHT450 _xe0_nn_j0_HT650XX0eta240_pf_ftf_preselcHT450 _xe0_pfopufit_j0_HT500XX0eta240_pf_ftf_preselcHT450 _xe0_pfopufit_j0_HT650XX0eta240_pf_ftf_preselcHT450 

They indeed do not follow the dictionary order., which is: ['e', 'g', 'mu', 'tau', 'j', 'xe', 'xs', 'te', 'mb', 'hi', 'cosmic', 'calib', 'streamer', 'mon', 'beamspot', 'eb', ['isotrk', 'fslrt', 'dedxtrk', 'hitdvjet', 'fsvsi', 'distrk', 'dispjet', 'dispvtx'], 'TestChain']

  • Make the test robust: I also created a unique dictionary that sets the order the signatures in the chain name, AND is used also in the validation tests (they were misaligned). This dictionary ALSO contains the group that each signature is assigned to (we have one dictionary instead of 3 different ones). The dictionary is in the SignatureDict.py . The order of the grouping instead is in the MenuAlignmentTools.py, saved as a list, because it only relates to the alignment. Any other arrangement is welcome.

Tests will fail because of the wrong chain name ordering, waiting for decisions. Tagging @khoo , @tamartin , @sutt

Edited by Francesca Pastore

Merge request reports

Loading