CPAlgorithms: better default options for OR
This MR attempts to simplify a little bit the YAML config needed by users who request ≥2 Overlap Removal setups (e.g. one on tight leptons and one on loose leptons, common for fake estimations). The changes are as follows:
-
addToAllSelections
has its default changed fromTrue
toFalse
: when we define e.g.AnaElectrons.tight
andAnaElectrons.loose
, we may want to run OR only onAnaElectrons.tight
. HavingaddToAllSelections
set toTrue
will add that OR decision also toAnaElectrons.loose
- but a loose-not-tight electron gets a failed flag from the OR tool, which means thatAnaElectrons.loose
is now equivalent toAnaElectrons.tight
and that can't be the desired behaviour by default. - to avoid issues with duplicated names, the output branch with the OR decision is called
select_or
if it is meant to be applied to the entire containers, orselect_or_<user label>
otherwise. - if a user specifies the property e.g.
electronsSelectionName
, we apply the OR decision on top of that selection. If no such property is specified, we look at the electron container that was passed as input and check if a selection is specified (e.g.AnaElectrons.tight
vsAnaElectrons
). If there is one, we use it. If not, we fall back onselectionName
(which may be set, or maybe the empty string and once again means we apply the OR decision to the entire container.
As an example, for a fake estimation in a ttbar lepton+jets analysis, one would previously need to set up the OR block as follows:
OverlapRemoval:
- inputLabel: 'preselectORtight'
outputLabel: 'passesORtight'
jets: 'AnaJets.baselineJvt'
electrons: 'AnaElectrons.tight'
muons: 'AnaMuons.tight'
electronsSelectionName: 'tight'
muonsSelectionName: 'tight'
jetsSelectionName: 'baselineJvt'
addToAllSelections: False
- inputLabel: 'preselectORloose'
outputLabel: 'passesORloose'
jets: 'AnaJets.baselineJvt'
electrons: 'AnaElectrons.loose'
muons: 'AnaMuons.loose'
electronsSelectionName: 'loose'
muonsSelectionName: 'loose'
jetsSelectionName: 'baselineJvtLoose'
selectionName: 'notuseful'
addToAllSelections: False
which seems rather redundant (and most of these options have to be set manually, and are rather hard to understand without extensive documentation / tutorial). With this MR, the setup is simplified to:
OverlapRemoval:
- inputLabel: 'preselectORtight'
outputLabel: 'passesORtight'
jets: 'AnaJets.baselineJvt'
electrons: 'AnaElectrons.tight'
muons: 'AnaMuons.tight'
- inputLabel: 'preselectORloose'
outputLabel: 'passesORloose'
jets: 'AnaJets.baselineJvt'
electrons: 'AnaElectrons.loose'
muons: 'AnaMuons.loose'
jetsSelectionName: 'baselineJvtLoose'
where one creates a new jet selection 'baselineJvtLoose' since different jets might be overlap-removed with respect to loose or tight leptons.
I also filled in a couple of info-strings that were missing.