-
Notifications
You must be signed in to change notification settings - Fork 45
PileUp ReWeighting
Jiwon Park edited this page Jan 14, 2019
·
3 revisions
First, update lumiJSON in ''CatProducer/python/catDefinitions_cfi.py''. Don't put '.txt'. In lxplus or afs enabled server
getJSONAndPuWeights.py -l Cert_314472-325175_13TeV_PromptReco_Collisions18_JSON.txt
This will produce a 'pileupWeight.py' file
In your analysis/ntupler cfg file, insert
process.load("CATTools.CatProducer.pileupWeight_cff") # loads pileup weighting tool
from CATTools.CatProducer.pileupWeight_cff import pileupWeightMap
process.pileupWeight.weightingMethod = "RedoWeight" # set mode to reweighting
process.pileupWeight.pileupMC = pileupWeightMap["Startup2015_25ns"] # MC pileup distrubition
from pileup import pileupMap # new pileup file made with getPileUpData.py
process.pileupWeight.pileupRD = pileupMap["Cert_246908-260627_13TeV_PromptReco_Collisions15_25ns_JSON"] # new data PU distrubition
process.pileupWeight.pileupUp = pileupMap["Cert_246908-260627_13TeV_PromptReco_Collisions15_25ns_JSON_Up"]
process.pileupWeight.pileupDn = pileupMap["Cert_246908-260627_13TeV_PromptReco_Collisions15_25ns_JSON_Dn"]
process.p = cms.Path(process.pileupWeight + process.yourcode)