CMS 3D CMS Logo

Functions
customizePuppiTune_cff Namespace Reference

Functions

def UpdatePuppiTuneV15 (process, runOnMC=True)
 
def UpdatePuppiTuneV15_Data (process)
 
def UpdatePuppiTuneV15_MC (process)
 

Function Documentation

◆ UpdatePuppiTuneV15()

def customizePuppiTune_cff.UpdatePuppiTuneV15 (   process,
  runOnMC = True 
)

Definition at line 3 of file customizePuppiTune_cff.py.

3 def UpdatePuppiTuneV15(process, runOnMC=True):
4  #
5  # Adapt for re-running PUPPI
6  #
7  print("customizePuppiTune_cff::UpdatePuppiTuneV15: Recomputing PUPPI with Tune v15, slimmedJetsPuppi and slimmedMETsPuppi")
8  from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask
9  task = getPatAlgosToolsTask(process)
10  from PhysicsTools.PatAlgos.slimming.puppiForMET_cff import makePuppiesFromMiniAOD
11  makePuppiesFromMiniAOD(process,True)
12  process.puppi.useExistingWeights = False
13  process.puppiNoLep.useExistingWeights = False
14  from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMetCorAndUncFromMiniAOD
15  runMetCorAndUncFromMiniAOD(process,isData=False,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi",recoMetFromPFCs=True)
16  from PhysicsTools.PatAlgos.patPuppiJetSpecificProducer_cfi import patPuppiJetSpecificProducer
17  addToProcessAndTask('patPuppiJetSpecificProducer', patPuppiJetSpecificProducer.clone(src=cms.InputTag("patJetsPuppi")), process, task)
18  from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection
19  updateJetCollection(
20  process,
21  labelName = 'PuppiJetSpecific',
22  jetSource = cms.InputTag('patJetsPuppi'),
23  )
24  process.updatedPatJetsPuppiJetSpecific.userData.userFloats.src = ['patPuppiJetSpecificProducer:puppiMultiplicity', 'patPuppiJetSpecificProducer:neutralPuppiMultiplicity', 'patPuppiJetSpecificProducer:neutralHadronPuppiMultiplicity', 'patPuppiJetSpecificProducer:photonPuppiMultiplicity', 'patPuppiJetSpecificProducer:HFHadronPuppiMultiplicity', 'patPuppiJetSpecificProducer:HFEMPuppiMultiplicity' ]
25  addToProcessAndTask('slimmedJetsPuppi', process.updatedPatJetsPuppiJetSpecific.clone(), process, task)
26  del process.updatedPatJetsPuppiJetSpecific
27  process.puppiSequence = cms.Sequence(process.puppiMETSequence+process.fullPatMetSequencePuppi+process.patPuppiJetSpecificProducer+process.slimmedJetsPuppi)
28  #
29  # Adapt for PUPPI tune V15
30  #
31  process.puppi.PtMaxCharged = 20.
32  process.puppi.EtaMinUseDeltaZ = 2.4
33  process.puppi.PtMaxNeutralsStartSlope = 20.
34  process.puppi.NumOfPUVtxsForCharged = 2
35  process.puppi.algos[0].etaMin[0] = -0.01
36  process.puppiNoLep.PtMaxCharged = 20.
37  process.puppiNoLep.EtaMinUseDeltaZ = 2.4
38  process.puppiNoLep.PtMaxNeutralsStartSlope = 20.
39  process.puppiNoLep.NumOfPUVtxsForCharged = 2
40  process.puppiNoLep.algos[0].etaMin[0] = -0.01
41 
42  from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
43  phase2_common.toModify( process.puppi, EtaMinUseDeltaZ = 4.0)
44  phase2_common.toModify( process.puppiNoLep, EtaMinUseDeltaZ = 4.0)
45 

References helpers.addToProcessAndTask(), helpers.getPatAlgosToolsTask(), puppiForMET_cff.makePuppiesFromMiniAOD(), edm.print(), and runMETCorrectionsAndUncertainties.runMetCorAndUncFromMiniAOD().

Referenced by UpdatePuppiTuneV15_Data(), and UpdatePuppiTuneV15_MC().

◆ UpdatePuppiTuneV15_Data()

def customizePuppiTune_cff.UpdatePuppiTuneV15_Data (   process)

Definition at line 49 of file customizePuppiTune_cff.py.

49 def UpdatePuppiTuneV15_Data(process):
50  UpdatePuppiTuneV15(process,runOnMC=False)

References UpdatePuppiTuneV15().

◆ UpdatePuppiTuneV15_MC()

def customizePuppiTune_cff.UpdatePuppiTuneV15_MC (   process)

Definition at line 46 of file customizePuppiTune_cff.py.

46 def UpdatePuppiTuneV15_MC(process):
47  UpdatePuppiTuneV15(process,runOnMC=True)
48 

References UpdatePuppiTuneV15().

customizePuppiTune_cff.UpdatePuppiTuneV15_Data
def UpdatePuppiTuneV15_Data(process)
Definition: customizePuppiTune_cff.py:49
helpers.getPatAlgosToolsTask
def getPatAlgosToolsTask(process)
Definition: helpers.py:14
puppiForMET_cff.makePuppiesFromMiniAOD
def makePuppiesFromMiniAOD(process, createScheduledSequence=False)
Definition: puppiForMET_cff.py:13
jetTools
helpers
customizePuppiTune_cff.UpdatePuppiTuneV15_MC
def UpdatePuppiTuneV15_MC(process)
Definition: customizePuppiTune_cff.py:46
customizePuppiTune_cff.UpdatePuppiTuneV15
def UpdatePuppiTuneV15(process, runOnMC=True)
Definition: customizePuppiTune_cff.py:3
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
runMETCorrectionsAndUncertainties.runMetCorAndUncFromMiniAOD
def runMetCorAndUncFromMiniAOD(process, metType="PF", jetCollUnskimmed="slimmedJets", photonColl="slimmedPhotons", electronColl="slimmedElectrons", muonColl="slimmedMuons", tauColl="slimmedTaus", pfCandColl="packedPFCandidates", jetFlavor="AK4PFchs", jetCleaning="LepClean", isData=False, manualJetConfig=False, reclusterJets=None, jetSelection="pt>15 && abs(eta)<9.9", recoMetFromPFCs=None, jetCorLabelL3="ak4PFCHSL1FastL2L3Corrector", jetCorLabelRes="ak4PFCHSL1FastL2L3ResidualCorrector", CHS=False, reapplyJEC=True, jecUncFile="", computeMETSignificance=True, fixEE2017=False, fixEE2017Params=None, postfix="")
Definition: runMETCorrectionsAndUncertainties.py:2013
helpers.addToProcessAndTask
def addToProcessAndTask(label, module, process, task)
Definition: helpers.py:29