Skip to content

Chain & step count checker for legacy/CA menu comparison

As preparation for CA/legacy reprocessing comparisons, this script does a little postprocessing of the count dumps, producing a diff that is easier to digest, in particular avoiding comparisons where migrations are incomplete.

Given a legacy directory and a CA directory, each containing the corresponding HLT menu json, the HLTChain.txt and HLTSteps.txt, this will spit out:

  • chain_count_legacy_CA.json -- a map of chain to legacy/CA event counts
  • HLTChain_diff.txt -- a side-by-side comparison of the event counts
  • step_count_legacy_CA.json -- a map of chain to legacy/CA step count lists
  • HLTStep_diff.txt -- a side-by-side comparison of the step counts, with step names labelled

Preview of the text formats:

Chain counts disagreeing between CA and legacy configs:
-----
Chain name                                                         | legacy | CA
HLT_2mu4_bBmux_BdmuDstarX_L12MU3V                                  |      0 | 2
HLT_3j60_0eta290_020jvt_bdl1d77_pf_ftf_presel3j45b95_L13J35p0ETA23 |      0 | 3
HLT_beamspot_allTE_trkfast_BeamSpotPEB_L1J15                       |      0 | 19
HLT_e5_lhvloose_bBeeM6000_L14J15                                   |      0 | 9
Step counts disagreeing between CA and legacy configs:
-----
Chain name                    | Legacy step                      | legacy | CA step                      | CA
HLT_e14_idperf_tight_L1eEM9   | Step1_FastCalo_electron          |      7 | Step1_FastCalo_electron      | 7
                              | Step2_fast_tracking              |      7 | Step2_fast_tracking          | 7
                              | Step4_precisionCalo_electron     |      6 | Step4_precisionCalo_electron | 6
                              | Step5_precisionTracking_electron |      6 | N/A                          | 0
                              | ...                              |      6 | ...                          | 0
HLT_mu24_ivarmedium_L1MU14FCH | Step1_mufast                     |      7 | Step1_mufast                 | 7
                              | Step2_muComb                     |      5 | Step2_muComb                 | 5
                              | Step3_muEFSA                     |      4 | Step3_muEFSA                 | 4
                              | Step4_EFCB                       |      4 | Step4_EFCB                   | 4
                              | Step5_muEFIso                    |      4 | N/A                          | 0

In the case where the CA configuration has fewer steps than legacy, only the first non-migrated legacy step name is printed. If steps are renamed between the legacy and CA configurations, the names may be incorrectly displayed.

N.B. Depending on the rejection of the final steps, the chain counts may show as identical even though CA steps are missing, hence the step counts will be more inclusive in terms of the set of chains to be compared, rather than just a zoom in on chains with differing event counts.

More complete examples of the diff text files based on the RDOtoRDOTrig ART test are attached to the trigger core SW agenda from Oct 27.

Edited by Teng Jian Khoo

Merge request reports