Skip to content

CPAlgorithms: event selection algorithms

We migrate the event selection algorithms from TopCPToolkit. These are implemented in the config-block formalism (no sequences).

Common selection cuts are broken down into individual algorithms, allowing to e.g. select events with a certain number of objects passing quality and pT cuts, apply MET requirements, or request OS pairs of leptons. These individual cuts are written down by the user in a single string (one cut per line) which is parsed by the python config driver. The selection decision for each cut is applied to EventInfo. After the final cut, the event is filtered.

It is possible to define multiple event selections. In this case, a dictionary is passed to the python config (one entry per selection). The event filtering is then a logical OR of all possible event selections. It also becomes possible to define "sub-selections", which are not used in the filtering and whose purpose is to avoid duplicating the common parts of various selections. In the example below, a sub-selection applies some generic jet and b-jet cuts, and is then used as the starting point of the proper electron+jets and muon+jets selections:

mycuts = {
  'SUBcommon': """
JET_N_BTAG >= 2
JET_N_BTAG DL1dv01:FixedCutBEff_70 >= 1
JET_N 25000 >= 4
MET >= 20000
SAVE
""",
  'ejets': """
IMPORT SUBcommon
EL_N 25000 >= 1
EL_N tight 25000 == 1
MU_N 5000 == 0
MWT < 170000
MET+MWT > 40000
SAVE
""",
  'mujets': """
IMPORT SUBcommon
EL_N 5000 == 0
MU_N tight 25000 > 0
SAVE
"""
}

makeMultipleEventSelectionConfigs(configSeq, electrons="AnaElectrons.loose", muons ="AnaMuons.tight", met="AnaMET",
                                  jets="AnaJets.baselineSel&&jvt_selection", btagDecoration='ftag_select_DL1dv01_FixedCutBEff_85',
                                  preselection=None, selectionCutsDict = mycuts, noFilter=noFilter, cutFlowHistograms=True)

As in most other algorithms, the specific object collections to use (and corresponding object preselections) can be specified as arguments to the python config. The text-based cuts allow to override them. An option is provided to turn on event-wise cutflow (see also !65648 (merged)).

It is foreseen that analysis teams might want to use more selection cuts: these can be similarly implemented as their own algorithms and added to this package, and the python config readily extended to parse the new keywords and options. The future transition to a YAML/text-based config for the CP algorithms (see !63155 (merged)) should also be reasonably straightforward.

Merge request reports

Loading