Skip to content

Commit

Permalink
Merge pull request #38711 from mandrenguyen/dontReclusterAAMiniAOD
Browse files Browse the repository at this point in the history
Don't recluster jets in HI miniAOD for Run 3
  • Loading branch information
cmsbuild authored Jul 26, 2022
2 parents df1cbb6 + 3f512ee commit 61a96f0
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@
workflows[158.2] = ['',['PhotonJets_Pt_10_13_HI','DIGIHI2018PPRECO','RECOHI2018PPRECO','HARVESTHI2018PPRECO']]
workflows[158.3] = ['',['ZEEMM_13_HI','DIGIHI2018PPRECO','RECOHI2018PPRECO','HARVESTHI2018PPRECO']]
workflows[159] = ['',['HydjetQ_B12_5020GeV_2021_ppReco','DIGIHI2021PPRECO','RECOHI2021PPRECOMB','ALCARECOHI2021PPRECO','HARVESTHI2021PPRECO']]
workflows[159.01] = ['',['HydjetQ_reminiaodPbPb2021_INPUT','REMINIAODHI2021PPRECOMB','HARVESTHI2021PPRECOMINIAOD']]
workflows[159.1] = ['',['QCD_Pt_80_120_14_HI_2021','DIGIHI2021PPRECO','RECOHI2021PPRECO','HARVESTHI2021PPRECO']]
workflows[159.2] = ['',['PhotonJets_Pt_10_14_HI_2021','DIGIHI2021PPRECO','RECOHI2021PPRECO','HARVESTHI2021PPRECO']]
workflows[159.3] = ['',['ZMM_14_HI_2021','DIGIHI2021PPRECO','RECOHI2021PPRECO','HARVESTHI2021PPRECO']]
Expand Down
14 changes: 14 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ def identitySim(wf):
steps['TTbar_13_reminiaod2018UL_INPUT']={'INPUT':InputInfo(dataSet='/RelValProdTTbar_13_pmx25ns/CMSSW_10_6_4-PUpmx25ns_106X_upgrade2018_realistic_v9-v1/AODSIM',label='rmaod',location='STD')}
# INPUT command for reminiAOD wfs on PbPb relval inputs
steps['HydjetQ_reminiaodPbPb2018_INPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_B12_5020GeV_2018_ppReco/CMSSW_10_3_3-PU_103X_upgrade2018_realistic_HI_v11-v1/GEN-SIM-RECO',label='rmaod',location='STD')}
steps['HydjetQ_reminiaodPbPb2021_INPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_B12_5020GeV_2021_ppReco/CMSSW_12_5_0_pre3-124X_mcRun3_2022_realistic_HI_v8-v1/GEN-SIM-RECO',label='rmaod',location='STD')}

#input for a NANOAOD from MINIAOD workflow
steps['ZEE_13_80XNanoAODINPUT']={'INPUT':InputInfo(dataSet='/RelValZEE_13/CMSSW_8_0_21-PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/MINIAODSIM',label='nanoaod80X',location='STD')}
Expand Down Expand Up @@ -2745,6 +2746,13 @@ def gen2021HiMix(fragment,howMuch):
'--era':'Run3_pp_on_PbPb',
'--procModifiers':'genJetSubEvent',
},step3Up2015Defaults])
steps['REMINIAODHI2021PPRECOMB']=merge([{'-s':'PAT,VALIDATION:@miniAODValidation,DQM:@miniAODDQM',
'--datatier':'MINIAODSIM,DQMIO',
'--eventcontent':'MINIAODSIM,DQM',
'-n':100,
'--era':'Run3_pp_on_PbPb',
'--procModifiers':'genJetSubEvent',
},hiDefaults2021_ppReco,step3Up2015Defaults])

steps['ALCARECOHI2021PPRECO']=merge([hiDefaults2021_ppReco,{'-s':'ALCA:TkAlMinBias+SiStripCalMinBias',
'--datatier':'ALCARECO',
Expand Down Expand Up @@ -3288,6 +3296,12 @@ def gen2021HiMix(fragment,howMuch):
'--mc':'',
'--era' : 'Run3_pp_on_PbPb',
'--filetype':'DQM'}])
steps['HARVESTHI2021PPRECOMINIAOD']=merge([{'-s':'HARVESTING:@miniAODValidation+@miniAODDQM',
'--filein':'file:step2_inDQM.root',
'--mc':'',
'--era' : 'Run3_pp_on_PbPb',
'--filetype':'DQM',
'-n':100},hiDefaults2021_ppReco])

steps['HARVESTHI2018PPRECO']=merge([hiDefaults2018_ppReco,{'-s':'HARVESTING:validationHarvestingNoHLT+dqmHarvestingFakeHLT',
'--filein':'file:step3_inDQM.root',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@
run2_miniAOD_pp_on_AA_103X.toReplaceWith(recoPFJetsHIpostAODTask, _recoPFJetsHIpostAODTask)


recoJetsHIpostAODTask = cms.Task(
recoPFJetsHIpostAODTask,
recoGenJetsHIpostAODTask = cms.Task(
allPartons,
hiGenJetsTask,
)
14 changes: 10 additions & 4 deletions PhysicsTools/PatAlgos/python/producersLayer1/jetProducer_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@
)

from PhysicsTools.PatAlgos.producersHeavyIons.heavyIonJets_cff import *
_makePatJetsTaskHI2018 = cms.Task(
recoPFJetsHIpostAODTask,
recoGenJetsHIpostAODTask,
makePatJetsTask.copy()
)
_makePatJetsTaskHI = cms.Task(
recoJetsHIpostAODTask,
recoGenJetsHIpostAODTask,
makePatJetsTask.copy()
)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(makePatJetsTask, _makePatJetsTaskHI)
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
pp_on_AA_2018.toReplaceWith(makePatJetsTask, _makePatJetsTaskHI2018)
from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
pp_on_PbPb_run3.toReplaceWith(makePatJetsTask, _makePatJetsTaskHI)

makePatJets = cms.Sequence(makePatJetsTask)

Expand Down
58 changes: 38 additions & 20 deletions PhysicsTools/PatAlgos/python/producersLayer1/jetProducer_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,26 +99,44 @@
resolutions = dict()
)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toModify(_patJets,
jetSource = "akCs4PFJets",
genJetMatch = "patJetGenJetMatch",
genPartonMatch = "patJetPartonMatch",
JetFlavourInfoSource = "patJetFlavourAssociation",
JetPartonMapSource = "patJetFlavourAssociationLegacy",
jetCorrFactorsSource = ["patJetCorrFactors"],
trackAssociationSource = "ak5JetTracksAssociatorAtVertex",
useLegacyJetMCFlavour = True,
discriminatorSources = [
"simpleSecondaryVertexHighEffBJetTags",
"simpleSecondaryVertexHighPurBJetTags",
"combinedSecondaryVertexV2BJetTags",
"jetBProbabilityBJetTags",
"jetProbabilityBJetTags",
"trackCountingHighEffBJetTags",
"trackCountingHighPurBJetTags",
],
addJetCharge = False,
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
pp_on_AA_2018.toModify(_patJets,
jetSource = "akCs4PFJets",
genJetMatch = "patJetGenJetMatch",
genPartonMatch = "patJetPartonMatch",
JetFlavourInfoSource = "patJetFlavourAssociation",
JetPartonMapSource = "patJetFlavourAssociationLegacy",
jetCorrFactorsSource = ["patJetCorrFactors"],
trackAssociationSource = "ak5JetTracksAssociatorAtVertex",
useLegacyJetMCFlavour = True,
discriminatorSources = [
"simpleSecondaryVertexHighEffBJetTags",
"simpleSecondaryVertexHighPurBJetTags",
"combinedSecondaryVertexV2BJetTags",
"jetBProbabilityBJetTags",
"jetProbabilityBJetTags",
"trackCountingHighEffBJetTags",
"trackCountingHighPurBJetTags",
],
addJetCharge = False,
)

from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
pp_on_PbPb_run3.toModify(_patJets,
jetSource = "akCs4PFJets",
genJetMatch = "patJetGenJetMatch",
genPartonMatch = "patJetPartonMatch",
JetFlavourInfoSource = "patJetFlavourAssociation",
JetPartonMapSource = "patJetFlavourAssociationLegacy",
jetCorrFactorsSource = ["patJetCorrFactors"],
trackAssociationSource = "",
useLegacyJetMCFlavour = True,
discriminatorSources = [],
tagInfoSources = [],
addJetCharge = False,
addTagInfos = False,
addDiscriminators = False,
addAssociatedTracks = False,
)

patJets = _patJets.clone()
18 changes: 10 additions & 8 deletions PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ def _add_deepFlavour(process):
'pfDeepCSVDiscriminatorsJetTags:CvsB',
'pfDeepCSVDiscriminatorsJetTags:CvsL',
])
(~pp_on_AA).toModify(process, _add_deepFlavour)
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
(~pp_on_AA_2018).toModify(process, _add_deepFlavour)

## CaloJets
process.caloJetMap = cms.EDProducer("RecoJetDeltaRValueMapProducer",
Expand Down Expand Up @@ -322,11 +323,11 @@ def _add_deepFlavour(process):
keysForValueMaps = cms.InputTag('reducedEgamma','reducedGedGsfElectrons'),
src = cms.InputTag("gedGsfElectronsFrom94XTo106X"))

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toModify(task, func=lambda t: t.add(process.gedGsfElectronsFrom94XTo106XTask))
pp_on_AA.toModify(process.electronMVAValueMapProducer,
keysForValueMaps = cms.InputTag('reducedEgamma','reducedGedGsfElectrons'),
src = "gedGsfElectronsFrom94XTo106X")
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
pp_on_AA_2018.toModify(task, func=lambda t: t.add(process.gedGsfElectronsFrom94XTo106XTask))
pp_on_AA_2018.toModify(process.electronMVAValueMapProducer,
keysForValueMaps = cms.InputTag('reducedEgamma','reducedGedGsfElectrons'),
src = "gedGsfElectronsFrom94XTo106X")

for idmod in electron_ids:
setupAllVIDIdsInModule(process,idmod,setupVIDElectronSelection,None,False,task)
Expand Down Expand Up @@ -460,8 +461,9 @@ def _add_jetsPuppi(process):
process.patJets.tagInfoSources = ["pixelClusterTagInfos"]

_run2_miniAOD_ANY.toModify(process.patJets, addTagInfos = False )

pp_on_AA.toModify(process.patJets, tagInfoSources = cms.VInputTag(["impactParameterTagInfos","secondaryVertexTagInfos"]) )

from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
pp_on_AA_2018.toModify(process.patJets, tagInfoSources = cms.VInputTag(["impactParameterTagInfos","secondaryVertexTagInfos"]) )

## puppi met
def _add_metPuppi(process):
Expand Down

0 comments on commit 61a96f0

Please sign in to comment.