KIT-CMS / CROWN

C++ based ROOT Workflow for N-tuples (CROWN)
https://crown.readthedocs.io
MIT License
4 stars 21 forks source link

Implemention of electron energy uncertainties for MC #265

Closed nshadskiy closed 4 months ago

nshadskiy commented 4 months ago

In this pull request a producer is introduced to derive uncertainties for the already applied (in nanoAOD) electron energy corrections for simulated samples. The implementation is based on the information from https://cms-talk.web.cern.ch/t/electron-scale-smear-variables-in-nanoaod/20210 and https://twiki.cern.ch/twiki/bin/view/CMS/EgammaSFJSON. For the energy resolution uncertainty dedicated branches in nanoAOD are used:

pT_up = pT_nominal + Electron_dEsigmaUp / cosh(eta)
pT_down = pT_nominal + Electron_dEsigmaDown / cosh(eta)

The branches for the energy scale uncertainty are unfortunately broken for MC and always 0. Therefore a patch with a correctionlib json is used (ERA e.g. "2018"):

pT_up = pT_nominal * sf("ERA", "scaleup", eta, gain) 
pT_down = pT_nominal * sf("ERA", "scaledown", eta, gain)

The json files are take from https://github.com/cms-egamma/ScaleFactorsJSON

harrypuuter commented 4 months ago

The corrections folder is still called patch