Skip to content

Fix typo in cutflow printing

tprocter46 requested to merge cutflow_printing_fix into release-3-2-x

Entirely my fault for missing it in review of !687 (merged), but there's an out-by-one error in the cutflow printing code.

EXAMPLE:

For the cutflow defined

book(_flows, {"CutFlow1", "CutFlow2"},
                   { {"NJet >= 4 ", "Delta12 < 1.4", "PJet1 > 400 GeV", "M SumJ > 1.0 ",
                      "NbJet > 0", "M SumJ > 1.0  & NbJet > 0"},
                     {"NJet >= 4 ", "Delta12 < 1.4", "NJet >= 5 ", "M SumJ > 0.8 ",
                      "NbJet > 0", "M SumJ > 0.8  & NbJet > 0"} });

Before:

Rivet.Analysis.ATLAS_2018_I1667046: INFO  /ATLAS_2018_I1667046/CutFlow1 cut-flow:
                                 Weight        Count    A_cumu    A_incr
                                 360.0         360.0      100%        - 
Pass                              60.0          60.0       17%       17%
Pass NJet >= 4                    49.0          49.0       14%       82%
Pass Delta12 < 1.4                49.0          49.0       14%      100%
Pass PJet1 > 400 GeV              49.0          49.0       14%      100%
Pass M SumJ > 1.0                  0.0           0.0        0%        0%
Pass NbJet > 0                     0.0           0.0        0%        - 

After this fix:

Rivet.Analysis.ATLAS_2018_I1667046: INFO  /ATLAS_2018_I1667046/CutFlow1 cut-flow:
                                 Weight        Count    A_cumu    A_incr
                                 978.0         978.0      100%        - 
Pass NJet >= 4                   159.0         159.0       16%       16%
Pass Delta12 < 1.4               134.0         134.0       14%       84%
Pass PJet1 > 400 GeV             134.0         134.0       14%      100%
Pass M SumJ > 1.0                134.0         134.0       14%      100%
Pass NbJet > 0                     1.0           1.0        0%        1%
Pass M SumJ > 1.0  & NbJet > 0     1.0           1.0        0%      100%

Merge request reports