CPAlgorithms: user-friendly systematics regexp
Users have pointed out that the systematics regexp offered in CommonServicesConfig
can be difficult to read (and write, for those not familiar with regex). In AnalyisTop, we provided a configurable option that accepted combinations of keywords like "AllJets", "AllElectrons" etc. to set up only the systematics corresponding to these objects.
In this MR, I introduce an option onlySystematicsCategories
to CommonServicesConfig
that can be configured as a list of the following keywords: jets, electrons, muons, photons, taus, met, ftag, event. The regexp option filterSystematics
takes precedence and overwrites this one if also set.
Example YAML setup (should set only JER, JES, JVT, FTag and MET, plus nominal/NOSYS):
CommonServices:
runSystematics: True
systematicsHistogram: 'listOfSystematics'
onlySystematicsCategories:
- jets
- ftag
- met
Tagging @dbaronmo @skorn @ztao @thsteven who may want to test the changes. Upon request, we could also introduce more keywords to e.g. distinguish JES and JER, EG scales and efficiencies, etc.