Skip to content

Commit

Permalink
set correct era (for DeepCSV training), enable pdf weights for signal
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed Apr 16, 2020
1 parent ef38b59 commit c11bf26
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions TreeMaker/run/searchRegionTreeMaker_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,6 @@

process = cms.Process('run')

print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
#process = cms.Process('run',eras.Run2_2017)
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("YOU ARE USING THE INCORRECT ERA FOR DEEP CSV!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
process.options = cms.untracked.PSet(
wantSummary=cms.untracked.bool(True)
)
Expand Down Expand Up @@ -72,6 +55,13 @@

options.parseArguments()

if '2016' in options.type:
process = cms.Process('run',eras.Run2_2016)
elif '2017' in options.type:
process = cms.Process('run',eras.Run2_2017)
elif '2018' in options.type:
process = cms.Process('run',eras.Run2_2018)

process.TFileService = cms.Service('TFileService',
fileName=cms.string(options.outputFile)
)
Expand Down Expand Up @@ -99,7 +89,6 @@
sample = options.sample
type = options.type


isRealData = ('Run' in type)
isSignal = ('signal' in sample)
isTTBar = ('ttbar' in sample)
Expand Down Expand Up @@ -130,8 +119,8 @@
setupTreeMakerAndGlobalTag(process,process.treeMaker,isRealData,type)
process.treeMaker.EventFiller.sampParam = options.sampParam;
# turn off for now
# if isSignal:
# process.treeMaker.EventFiller.addPDFWeights = True;
if isSignal:
process.treeMaker.EventFiller.addPDFWeights = True;

#==============================================================================================================================#
#Event counting: needed for event weights
Expand Down Expand Up @@ -197,7 +186,7 @@
if '2017' in type:
process.p += process.fullPatMetSequenceModifiedMET


# L1EcalPrefireWeights
if '2017' in type or '2016' in type : #https://twiki.cern.ch/twiki/bin/viewauth/CMS/L1ECALPrefiringWeightRecipe
from PhysicsTools.PatUtils.l1ECALPrefiringWeightProducer_cfi import l1ECALPrefiringWeightProducer
process.prefiringweight = l1ECALPrefiringWeightProducer.clone(
Expand All @@ -210,6 +199,7 @@
if not isRealData :
process.treeMaker.EventFiller.addPrefiringWeights = True
process.p += process.prefiringweight

if '2017' in type or '2018' in type : #https://twiki.cern.ch/twiki/bin/viewauth/CMS/MissingETOptionalFiltersRun2
process.load('RecoMET.METFilters.ecalBadCalibFilter_cfi')
baddetEcallist = cms.vuint32(
Expand Down

0 comments on commit c11bf26

Please sign in to comment.