CPAlgorithms: more user-side improvements
This MR implements the following changes for smoother user experience:
- allow to read data23 in the
Campaigns
enum - autoconfigure the
runNumber
used in the PMG CutBookkeepers - remove the "expert-level"
EventSelectionConfig
blocks from the YAML setup, and instead expose the much nicer make-method (which takes care of filtering behind the scenes and avoids having to repeat generic settings e.g. like object collections)
On that last point, the current way to set up two simple selections and filter on them is written as:
EventSelection:
- name: 'SUBcommon'
electrons: 'AnaElectrons.loose'
muons: 'AnaMuons.tight'
jets: 'AnaJets.baselineSel&&jvt_selection'
met: 'AnaMET'
btagDecoration: 'ftag_select_DL1dv01_FixedCutBEff_85'
noFilter: True
selectionCuts: |
JET_N_BTAG >= 2
JET_N_BTAG DL1dv01:FixedCutBEff_70 >= 1
JET_N 25000 >= 4
MET >= 20000
SAVE
- name: 'ejets'
electrons: 'AnaElectrons.loose'
muons: 'AnaMuons.tight'
jets: 'AnaJets.baselineSel&&jvt_selection'
met: 'AnaMET'
btagDecoration: 'ftag_select_DL1dv01_FixedCutBEff_85'
noFilter: True
selectionCuts: |
IMPORT SUBcommon
EL_N 25000 >= 1
EL_N tight 25000 == 1
MU_N 25000 == 0
MWT < 170000
MET+MWT > 40000
SAVE
- name: 'mujets'
electrons: 'AnaElectrons.loose'
muons: 'AnaMuons.tight'
jets: 'AnaJets.baselineSel&&jvt_selection'
met: 'AnaMET'
btagDecoration: 'ftag_select_DL1dv01_FixedCutBEff_85'
noFilter: True
selectionCuts: |
EL_N 25000 == 0
MU_N 25000 > 0
MU_N 25000 == 1
IMPORT SUBcommon
SAVE
EventSelectionMerger:
selections:
- 'pass_ejets_%SYS%'
- 'pass_mujets_%SYS%'
noFilter: False
EventCutFlow:
- postfix: 'ejets'
customSelections: 'ejets'
- postfix: 'mujets'
customSelections: 'mujets'
while with the proposed changes it becomes:
EventSelection:
- electrons: 'AnaElectrons.loose'
muons: 'AnaMuons.tight'
jets: 'AnaJets.baselineSel&&jvt_selection'
met: 'AnaMET'
btagDecoration: 'ftag_select_DL1dv01_FixedCutBEff_85'
noFilter: False
cutFlowHistograms: True
selectionCutsDict:
'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 25000 == 0
MWT < 170000
MET+MWT > 40000
SAVE
'mujets': |
EL_N 25000 == 0
MU_N 25000 > 0
MU_N 25000 == 1
IMPORT SUBcommon
SAVE