Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOY JMR and JMS Update #300

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d563767
allow recomputing an existing branch
lenzip Mar 16, 2018
11aca61
allow replacing an existing branch
lenzip Mar 16, 2018
350d1a8
add AK4PFchs file to apply new JECs in postprocessor
arizzi Mar 16, 2018
ed659dd
add a stripped down version of HEPPY JEC recalibrator. Currently with…
arizzi Mar 16, 2018
eef3d75
add data recalib module (untested)
arizzi Mar 16, 2018
751577b
small bugfixes and add propagation of JEC to MET for data
Mar 17, 2018
c0d060e
take out jetGrooming from jetmetUncertainties.py
Mar 20, 2018
64c3fcb
Add option to reduce precision of output branches
arizzi Mar 20, 2018
61d06a5
add reduce mantissa
arizzi Mar 21, 2018
90f6cd5
copied from libminifloat in cmssw
arizzi Mar 21, 2018
6c60054
Added: Reading uncertainty sources from file
kschweiger Mar 30, 2018
e42a108
add a module which produces event count histograms
Apr 7, 2018
c2ed834
workaround to pass arguments to postprocessor jobs
Apr 9, 2018
12d4360
remove AK08 jet softdrop mass smearing for 2016
Apr 9, 2018
d276760
fix bug in turning off msoftdrop recalculation for 2016
Apr 9, 2018
7e27c16
first draft of pt correction and error producer
Apr 12, 2018
92ef715
adding 2016 and 2017 rochester corrections
Apr 13, 2018
c691bf1
moving mc check to beginFile
Apr 13, 2018
3c4ecc2
use Gaussian instead of flat distribution for random smearing
Apr 18, 2018
fba1c38
Minimal PR for dropping output branches.
vasile-ghete Apr 20, 2018
8fe3e38
btag SF v2
arizzi Apr 20, 2018
62b35ec
new changes to recompute existing trees
lenzip Apr 24, 2018
fe86a09
add pileup systematic up/down variations (2016-only)
Apr 25, 2018
d213101
remove change from other development
Apr 25, 2018
9a7504e
fix btag sf file
jpata Apr 25, 2018
2d7f808
enable shape corr for sfv2
jpata Apr 26, 2018
98136f1
add 2017 pileup up/down and fix deepCSV scale factor input file
Apr 30, 2018
cf699a6
add protection to muonScaleResProducer.py
May 3, 2018
2718ad6
removed printout
lenzip May 3, 2018
0317eb7
update 2017 pileup targets
May 17, 2018
4ac0d48
FIX: roccor 2016 char bug
May 18, 2018
2b6f1b3
adding Muon_pt_sys_uncert branch
May 24, 2018
a141295
Use hadronFlavour instead of partonFlavour in btagSFProducer
ktht May 28, 2018
b26496a
Fix warning when merging large files if a trigger bit is missing in n…
arizzi Jun 26, 2018
32f5638
nall variable fix
lcorcodilos Jul 11, 2018
27a9e1a
Added all 2016 and 2017 uncertainty sources to jetmetUncertainties
camclean Aug 16, 2018
0e2c40f
Pulled cms-nanoAOD/nanoAOD-tools master branch and resolved conflicts
camclean May 20, 2019
7a984ae
merge
camclean Feb 28, 2022
ba80513
Updating postprocessor
camclean Mar 2, 2022
a8c56f2
Merge branch 'master' of github.com:cms-nanoAOD/nanoAOD-tools
camclean Mar 2, 2022
9e39271
Updated EOY JMR and JMS values to correspond to a consistent tau21 cu…
camclean Mar 2, 2022
b5c3812
EOY JMR and JMS Update
camclean Mar 2, 2022
c9ac73a
Adding pdf weight producer
camclean May 18, 2022
0d54577
Merge branch 'JMRJMS' of github.com:camclean/nanoAOD-tools into JMRJMS
camclean May 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions python/postprocessing/modules/common/pdfWeightProducer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import ROOT
import math, os,re
import numpy as np
ROOT.PyConfig.IgnoreCommandLineOptions = True

from PhysicsTools.NanoAODTools.postprocessing.framework.datamodel import Collection, Object
from PhysicsTools.NanoAODTools.postprocessing.framework.eventloop import Module

class pdfWeightProducer(Module):
#def __init__(self):

#def beginJob(self):

#def endJob(self):

def beginFile(self, inputFile, outputFile, inputTree, wrappedOutputTree):
self.out = wrappedOutputTree
self.out.branch("LHEPdfWeightUp", "F")
self.out.branch("LHEPdfWeightDown", "F")

def endFile(self, inputFile, outputFile, inputTree, wrappedOutputTree):
pass

def analyze(self, event):
"""process event, return True (go to next module) or False (fail, go to next event)"""

pdfWeightUp = -99.
pdfWeightDown = -99.

if hasattr(event,"LHEPdfWeight"):
self.pdfWeightList = [ i for i in event.LHEPdfWeight ]

if len(self.pdfWeightList) > 1:
w = np.std(self.pdfWeightList)
pdfWeightUp = 1. + abs(w)
pdfWeightDown = 1. - abs(w)

self.out.fillBranch("LHEPdfWeightUp", pdfWeightUp)
self.out.fillBranch("LHEPdfWeightDown", pdfWeightDown)

return True
11 changes: 4 additions & 7 deletions python/postprocessing/modules/jme/jetmetHelperRun2.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@
#nominal, up, down
jmrValues = {
'2016': [1.0, 1.2, 0.8],
'2017': [1.09, 1.14, 1.04],
# Use 2017 values for 2018 until 2018 are released
'2018': [1.09, 1.14, 1.04],
'2017': [0.99, 1.032, 0.948],
'2018': [1.108, 1.142, 1.074],
'UL2016_preVFP': [1.00, 1.00, 1.00], # placeholder
'UL2016': [1.00, 1.00, 1.00], # placeholder
'UL2017': [1.00, 1.00, 1.00], # placeholder
Expand All @@ -97,12 +96,10 @@

# jet mass scale
# W-tagging PUPPI softdrop JMS values: https://twiki.cern.ch/twiki/bin/view/CMS/JetWtagging
# 2016 values
jmsValues = {
'2016': [1.00, 0.9906, 1.0094], # nominal, down, up
'2017': [0.982, 0.978, 0.986],
# Use 2017 values for 2018 until 2018 are released
'2018': [0.982, 0.978, 0.986],
'2017': [1.014, 1.011, 1.017],
'2018': [0.999, 0.997, 1.001],
'UL2016_preVFP': [1.000, 1.000, 1.000], # placeholder
'UL2016': [1.000, 1.000, 1.000], # placeholder
'UL2017': [1.000, 1.000, 1.000], # placeholder
Expand Down
Loading