-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
PuppiMET with PUPPIv15 and UL17 PUID #31927
Changes from all commits
594115f
e813a69
3890df1
2a8ae74
3a2fe05
e52e4dc
0d7e2c6
e39ee00
53e5fa6
e38d09f
e5f1f79
4b072e0
cd79112
a5e62d0
010d0e4
ff0d9b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets | ||
|
||
chsForSATkJets = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string('charge()!=0 && pvAssociationQuality()>=5 && vertexRef().key()==0')) | ||
softActivityJets = ak4PFJets.clone(src = 'chsForSATkJets', doAreaFastjet = False, jetPtMin=1) | ||
softActivityJets = ak4PFJets.clone(src = 'chsForSATkJets', doAreaFastjet = False, jetPtMin=1) | ||
softActivityJets10 = cms.EDFilter("CandPtrSelector", src = cms.InputTag("softActivityJets"), cut = cms.string('pt>10')) | ||
softActivityJets5 = cms.EDFilter("CandPtrSelector", src = cms.InputTag("softActivityJets"), cut = cms.string('pt>5')) | ||
softActivityJets2 = cms.EDFilter("CandPtrSelector", src = cms.InputTag("softActivityJets"), cut = cms.string('pt>2')) | ||
|
@@ -128,7 +128,7 @@ | |
) | ||
|
||
jercVars = cms.EDProducer("BetaStarPackedCandidateVarProducer", | ||
srcJet = cms.InputTag("updatedJets"), | ||
srcJet = cms.InputTag("updatedJets"), | ||
srcPF = cms.InputTag("packedPFCandidates"), | ||
maxDR = cms.double(0.4) | ||
) | ||
|
@@ -154,16 +154,18 @@ | |
qgl = cms.InputTag('qgtagger:qgLikelihood'), | ||
puId94XDisc = cms.InputTag('pileupJetId94X:fullDiscriminant'), | ||
puId102XDisc = cms.InputTag('pileupJetId102X:fullDiscriminant'), | ||
puId106XUL17Disc = cms.InputTag('pileupJetId106XUL17:fullDiscriminant'), | ||
chFPV0EF = cms.InputTag("jercVars:chargedFromPV0EnergyFraction"), | ||
chFPV1EF = cms.InputTag("jercVars:chargedFromPV1EnergyFraction"), | ||
chFPV2EF = cms.InputTag("jercVars:chargedFromPV2EnergyFraction"), | ||
chFPV3EF = cms.InputTag("jercVars:chargedFromPV3EnergyFraction"), | ||
chFPV3EF = cms.InputTag("jercVars:chargedFromPV3EnergyFraction"), | ||
), | ||
userInts = cms.PSet( | ||
tightId = cms.InputTag("tightJetId"), | ||
tightIdLepVeto = cms.InputTag("tightJetIdLepVeto"), | ||
vtxNtrk = cms.InputTag("bJetVars:vtxNtrk"), | ||
leptonPdgId = cms.InputTag("bJetVars:leptonPdgId"), | ||
puId106XUL17Id = cms.InputTag('pileupJetId106XUL17:fullId'), | ||
), | ||
) | ||
for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016: | ||
|
@@ -235,8 +237,8 @@ | |
btagDeepFlavCvL = Var("?(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probuds')+bDiscriminator('pfDeepFlavourJetTags:probg'))>0?bDiscriminator('pfDeepFlavourJetTags:probc')/(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probuds')+bDiscriminator('pfDeepFlavourJetTags:probg')):-1",float,doc="DeepJet c vs uds+g discriminator",precision=10), | ||
btagDeepFlavCvB = Var("?(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probb')+bDiscriminator('pfDeepFlavourJetTags:probbb')+bDiscriminator('pfDeepFlavourJetTags:problepb'))>0?bDiscriminator('pfDeepFlavourJetTags:probc')/(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probb')+bDiscriminator('pfDeepFlavourJetTags:probbb')+bDiscriminator('pfDeepFlavourJetTags:problepb')):-1",float,doc="DeepJet c vs b+bb+lepb discriminator",precision=10), | ||
btagDeepFlavQG = Var("?(bDiscriminator('pfDeepFlavourJetTags:probg')+bDiscriminator('pfDeepFlavourJetTags:probuds'))>0?bDiscriminator('pfDeepFlavourJetTags:probg')/(bDiscriminator('pfDeepFlavourJetTags:probg')+bDiscriminator('pfDeepFlavourJetTags:probuds')):-1",float,doc="DeepJet g vs uds discriminator",precision=10), | ||
puIdDisc = Var("userFloat('puId102XDisc')",float,doc="Pilup ID discriminant with 102X (2018) training",precision=10), | ||
puId = Var("userInt('pileupJetId:fullId')",int,doc="Pilup ID flags with 80X (2016) training"), | ||
puIdDisc = Var("userFloat('puId102XDisc')",float,doc="Pileup ID discriminant with 102X (2018) training",precision=10), | ||
puId = Var("userInt('pileupJetId:fullId')",int,doc="Pileup ID flags for pre-UL trainings"), | ||
jetId = Var("userInt('tightId')*2+4*userInt('tightIdLepVeto')",int,doc="Jet ID flags bit1 is loose (always false in 2017 since it does not exist), bit2 is tight, bit3 is tightLepVeto"), | ||
qgl = Var("userFloat('qgl')",float,doc="Quark vs Gluon likelihood discriminator",precision=10), | ||
hfsigmaEtaEta = Var("userFloat('hfJetShowerShape:sigmaEtaEta')",float,doc="sigmaEtaEta for HF jets (noise discriminating variable)",precision=10), | ||
|
@@ -269,9 +271,14 @@ | |
btagDeepFlavC = Var("bDiscriminator('pfDeepFlavourJetTags:probc')",float,doc="DeepFlavour charm tag discriminator",precision=10), | ||
) | ||
for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016: | ||
modifier.toModify( jetTable.variables, jetId = Var("userInt('tightIdLepVeto')*4+userInt('tightId')*2+userInt('looseId')",int,doc="Jet ID flags bit1 is loose, bit2 is tight, bit3 is tightLepVeto")) | ||
run2_jme_2016.toModify( jetTable.variables, puIdDisc = Var("userFloat('pileupJetId:fullDiscriminant')",float,doc="Pilup ID discriminant with 80X (2016) training",precision=10)) | ||
run2_jme_2017.toModify( jetTable.variables, puIdDisc = Var("userFloat('puId94XDisc')", float,doc="Pilup ID discriminant with 94X (2017) training",precision=10)) | ||
modifier.toModify( jetTable.variables, jetId = Var("userInt('tightIdLepVeto')*4+userInt('tightId')*2+userInt('looseId')",int,doc="Jet ID flags bit1 is loose, bit2 is tight, bit3 is tightLepVeto")) | ||
run2_jme_2016.toModify( jetTable.variables, puIdDisc = Var("userFloat('pileupJetId:fullDiscriminant')",float,doc="Pileup ID discriminant with 80X (2016) training",precision=10)) | ||
run2_jme_2017.toModify( jetTable.variables, puId = Var("userInt('puId106XUL17Id')", int,doc="Pileup ID flags with 106X (2017) training")) | ||
run2_jme_2017.toModify( jetTable.variables, puIdDisc = Var("userFloat('puId106XUL17Disc')", float,doc="Pileup ID discriminant with 106X (2017) training",precision=10)) | ||
for modifier in run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2: | ||
modifier.toModify( jetTable.variables, puIdDisc = Var("userFloat('puId94XDisc')", float,doc="Pileup ID discriminant with 94X (2017) training",precision=10)) | ||
modifier.toModify( jetTable.variables, puId = Var("userInt('pileupJetId:fullId')",int,doc="Pileup ID flags for 2016/2017/2018 EOY trainings")) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. last request here we need to add also the in the DQM plots I see that for EOY2017 inherit from the general modifier we did before 'puId106XUL17Id' |
||
|
||
bjetNN= cms.EDProducer("BJetEnergyRegressionMVA", | ||
backend = cms.string("TF"), | ||
|
@@ -470,7 +477,7 @@ | |
doc="index of second subjet"), | ||
|
||
# btagDeepC = Var("bDiscriminator('pfDeepCSVJetTags:probc')",float,doc="CMVA V2 btag discriminator",precision=10), | ||
#puIdDisc = Var("userFloat('pileupJetId:fullDiscriminant')",float,doc="Pilup ID discriminant",precision=10), | ||
#puIdDisc = Var("userFloat('pileupJetId:fullDiscriminant')",float,doc="Pileup ID discriminant",precision=10), | ||
# nConstituents = Var("numberOfDaughters()",int,doc="Number of particles in the jet"), | ||
# rawFactor = Var("1.-jecFactor('Uncorrected')",float,doc="1 - Factor to get back to raw pT",precision=6), | ||
), | ||
|
@@ -487,12 +494,12 @@ | |
# Deprecated after 106X | ||
modifier.toModify( fatJetTable.variables, | ||
btagCMVA = Var("bDiscriminator('pfCombinedMVAV2BJetTags')",float,doc="CMVA V2 btag discriminator",precision=10), | ||
btagDDBvL_noMD = Var("bDiscriminator('pfDeepDoubleBvLJetTags:probHbb')",float,doc="DeepDoubleX discriminator (no mass-decorrelation) for H(Z)->bb vs QCD",precision=10), | ||
btagDDCvL_noMD = Var("bDiscriminator('pfDeepDoubleCvLJetTags:probHcc')",float,doc="DeepDoubleX discriminator (no mass-decorrelation) for H(Z)->cc vs QCD",precision=10), | ||
btagDDCvB_noMD = Var("bDiscriminator('pfDeepDoubleCvBJetTags:probHcc')",float,doc="DeepDoubleX discriminator (no mass-decorrelation) for H(Z)->cc vs H(Z)->bb",precision=10), | ||
btagDDBvL = Var("bDiscriminator('pfMassIndependentDeepDoubleBvLJetTags:probHbb')",float,doc="DeepDoubleX (mass-decorrelated) discriminator for H(Z)->bb vs QCD",precision=10), | ||
btagDDCvL = Var("bDiscriminator('pfMassIndependentDeepDoubleCvLJetTags:probHcc')",float,doc="DeepDoubleX (mass-decorrelated) discriminator for H(Z)->cc vs QCD",precision=10), | ||
btagDDCvB = Var("bDiscriminator('pfMassIndependentDeepDoubleCvBJetTags:probHcc')",float,doc="DeepDoubleX (mass-decorrelated) discriminator for H(Z)->cc vs H(Z)->bb",precision=10), | ||
btagDDBvL_noMD = Var("bDiscriminator('pfDeepDoubleBvLJetTags:probHbb')",float,doc="DeepDoubleX discriminator (no mass-decorrelation) for H(Z)->bb vs QCD",precision=10), | ||
btagDDCvL_noMD = Var("bDiscriminator('pfDeepDoubleCvLJetTags:probHcc')",float,doc="DeepDoubleX discriminator (no mass-decorrelation) for H(Z)->cc vs QCD",precision=10), | ||
btagDDCvB_noMD = Var("bDiscriminator('pfDeepDoubleCvBJetTags:probHcc')",float,doc="DeepDoubleX discriminator (no mass-decorrelation) for H(Z)->cc vs H(Z)->bb",precision=10), | ||
btagDDBvL = Var("bDiscriminator('pfMassIndependentDeepDoubleBvLJetTags:probHbb')",float,doc="DeepDoubleX (mass-decorrelated) discriminator for H(Z)->bb vs QCD",precision=10), | ||
btagDDCvL = Var("bDiscriminator('pfMassIndependentDeepDoubleCvLJetTags:probHcc')",float,doc="DeepDoubleX (mass-decorrelated) discriminator for H(Z)->cc vs QCD",precision=10), | ||
btagDDCvB = Var("bDiscriminator('pfMassIndependentDeepDoubleCvBJetTags:probHcc')",float,doc="DeepDoubleX (mass-decorrelated) discriminator for H(Z)->cc vs H(Z)->bb",precision=10), | ||
) | ||
run2_miniAOD_80XLegacy.toModify( fatJetTable.variables, msoftdrop_chs = Var("userFloat('ak8PFJetsCHSSoftDropMass')",float, doc="Legacy uncorrected soft drop mass with CHS",precision=10)) | ||
run2_miniAOD_80XLegacy.toModify( fatJetTable.variables.tau1, expr = cms.string("userFloat(\'ak8PFJetsPuppiValueMap:NjettinessAK8PuppiTau1\')"),) | ||
|
@@ -528,7 +535,7 @@ | |
variables = cms.PSet(P4Vars, | ||
btagDeepB = Var("bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb')",float,doc="DeepCSV b+bb tag discriminator",precision=10), | ||
btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10), | ||
rawFactor = Var("1.-jecFactor('Uncorrected')",float,doc="1 - Factor to get back to raw pT",precision=6), | ||
rawFactor = Var("1.-jecFactor('Uncorrected')",float,doc="1 - Factor to get back to raw pT",precision=6), | ||
tau1 = Var("userFloat('NjettinessAK8Subjets:tau1')",float, doc="Nsubjettiness (1 axis)",precision=10), | ||
tau2 = Var("userFloat('NjettinessAK8Subjets:tau2')",float, doc="Nsubjettiness (2 axis)",precision=10), | ||
tau3 = Var("userFloat('NjettinessAK8Subjets:tau3')",float, doc="Nsubjettiness (3 axis)",precision=10), | ||
|
@@ -698,12 +705,13 @@ | |
qgtagger=QGTagger.clone(srcJets="updatedJets",srcVertexCollection="offlineSlimmedPrimaryVertices") | ||
|
||
|
||
from RecoJets.JetProducers.PileupJetID_cfi import pileupJetId, _chsalgos_94x, _chsalgos_102x | ||
from RecoJets.JetProducers.PileupJetID_cfi import pileupJetId, _chsalgos_94x, _chsalgos_102x, _chsalgos_106X_UL17 | ||
pileupJetId94X=pileupJetId.clone(jets="updatedJets",algos = cms.VPSet(_chsalgos_94x),inputIsCorrected=True,applyJec=False,vertexes="offlineSlimmedPrimaryVertices") | ||
pileupJetId102X=pileupJetId.clone(jets="updatedJets",algos = cms.VPSet(_chsalgos_102x),inputIsCorrected=True,applyJec=False,vertexes="offlineSlimmedPrimaryVertices") | ||
pileupJetId106XUL17=pileupJetId.clone(jets="updatedJets",algos = cms.VPSet(_chsalgos_106X_UL17),inputIsCorrected=True,applyJec=False,vertexes="offlineSlimmedPrimaryVertices") | ||
|
||
#before cross linking | ||
jetSequence = cms.Sequence(jetCorrFactorsNano+updatedJets+tightJetId+tightJetIdLepVeto+bJetVars+qgtagger+jercVars+pileupJetId94X+pileupJetId102X+updatedJetsWithUserData+jetCorrFactorsAK8+updatedJetsAK8+tightJetIdAK8+tightJetIdLepVetoAK8+updatedJetsAK8WithUserData+chsForSATkJets+softActivityJets+softActivityJets2+softActivityJets5+softActivityJets10+finalJets+finalJetsAK8) | ||
jetSequence = cms.Sequence(jetCorrFactorsNano+updatedJets+tightJetId+tightJetIdLepVeto+bJetVars+qgtagger+jercVars+pileupJetId94X+pileupJetId102X+pileupJetId106XUL17+updatedJetsWithUserData+jetCorrFactorsAK8+updatedJetsAK8+tightJetIdAK8+tightJetIdLepVetoAK8+updatedJetsAK8WithUserData+chsForSATkJets+softActivityJets+softActivityJets2+softActivityJets5+softActivityJets10+finalJets+finalJetsAK8) | ||
|
||
|
||
_jetSequence_2016 = jetSequence.copy() | ||
|
@@ -712,8 +720,8 @@ | |
for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016: | ||
modifier.toReplaceWith(jetSequence, _jetSequence_2016) | ||
|
||
#HF shower shape recomputation | ||
#Only run if needed (i.e. if default MINIAOD info is missing or outdated because of new JECs...) | ||
#HF shower shape recomputation | ||
#Only run if needed (i.e. if default MINIAOD info is missing or outdated because of new JECs...) | ||
from RecoJets.JetProducers.hfJetShowerShape_cfi import hfJetShowerShape | ||
hfJetShowerShapeforNanoAOD = hfJetShowerShape.clone(jets="updatedJets",vertices="offlineSlimmedPrimaryVertices") | ||
for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_102Xv1, run2_nanoAOD_106Xv1: | ||
|
@@ -723,7 +731,7 @@ | |
) | ||
modifier.toModify(updatedJetsWithUserData.userInts, | ||
hfcentralEtaStripSize = cms.InputTag('hfJetShowerShapeforNanoAOD:centralEtaStripSize'), | ||
hfadjacentEtaStripsSize = cms.InputTag('hfJetShowerShapeforNanoAOD:adjacentEtaStripsSize'), | ||
hfadjacentEtaStripsSize = cms.InputTag('hfJetShowerShapeforNanoAOD:adjacentEtaStripsSize'), | ||
) | ||
modifier.toModify( jetTable.variables, hfsigmaEtaEta = Var("userFloat('hfsigmaEtaEta')",float,doc="sigmaEtaEta for HF jets (noise discriminating variable)",precision=10)) | ||
modifier.toModify( jetTable.variables, hfsigmaPhiPhi = Var("userFloat('hfsigmaPhiPhi')",float,doc="sigmaPhiPhi for HF jets (noise discriminating variable)",precision=10)) | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -64,7 +64,7 @@ | |||||||||||||
discNames = cms.vstring( | ||||||||||||||
"pfCombinedInclusiveSecondaryVertexV2BJetTags", | ||||||||||||||
"pfDeepCSVJetTags:probb+pfDeepCSVJetTags:probbb", #if multiple MiniAOD branches need to be summed up (e.g., DeepCSV b+bb), separate them using '+' delimiter | ||||||||||||||
"pfCombinedMVAV2BJetTags" | ||||||||||||||
"pfCombinedMVAV2BJetTags" | ||||||||||||||
), | ||||||||||||||
discShortNames = cms.vstring( | ||||||||||||||
"CSVV2", | ||||||||||||||
|
@@ -73,7 +73,7 @@ | |||||||||||||
), | ||||||||||||||
weightFiles = cms.vstring( #default settings are for 2017 94X. toModify function is called later for other eras. | ||||||||||||||
btagSFdir+"CSVv2_94XSF_V2_B_F.csv", | ||||||||||||||
btagSFdir+"DeepCSV_94XSF_V2_B_F.csv", | ||||||||||||||
btagSFdir+"DeepCSV_94XSF_V2_B_F.csv", | ||||||||||||||
"unavailable" #if SFs for an algorithm in an era is unavailable, the corresponding branch will not be stored | ||||||||||||||
), | ||||||||||||||
operatingPoints = cms.vstring("3","3","3"), #loose = 0, medium = 1, tight = 2, reshaping = 3 | ||||||||||||||
|
@@ -84,20 +84,20 @@ | |||||||||||||
) | ||||||||||||||
|
||||||||||||||
for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016: # to be updated when SF for Summer16MiniAODv3 MC will be available | ||||||||||||||
modifier.toModify(btagWeightTable, | ||||||||||||||
modifier.toModify(btagWeightTable, | ||||||||||||||
cut = cms.string("pt > 25. && abs(eta) < 2.4"), #80X corresponds to 2016, |eta| < 2.4 | ||||||||||||||
weightFiles = cms.vstring( #80X corresponds to 2016 SFs | ||||||||||||||
btagSFdir+"CSVv2_Moriond17_B_H.csv", | ||||||||||||||
"unavailable", | ||||||||||||||
btagSFdir+"cMVAv2_Moriond17_B_H.csv" | ||||||||||||||
btagSFdir+"CSVv2_Moriond17_B_H.csv", | ||||||||||||||
"unavailable", | ||||||||||||||
btagSFdir+"cMVAv2_Moriond17_B_H.csv" | ||||||||||||||
) | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
lheInfoTable = cms.EDProducer("LHETablesProducer", | ||||||||||||||
lheInfo = cms.VInputTag(cms.InputTag("externalLHEProducer"), cms.InputTag("source")), | ||||||||||||||
precision = cms.int32(14), | ||||||||||||||
storeLHEParticles = cms.bool(True) | ||||||||||||||
storeLHEParticles = cms.bool(True) | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
l1bits=cms.EDProducer("L1TriggerResultsConverter", src=cms.InputTag("gtStage2Digis"), legacyL1=cms.bool(False), | ||||||||||||||
|
@@ -106,7 +106,7 @@ | |||||||||||||
|
||||||||||||||
nanoSequenceCommon = cms.Sequence( | ||||||||||||||
nanoMetadata + jetSequence + muonSequence + tauSequence + electronSequence+photonSequence+vertexSequence+ | ||||||||||||||
isoTrackSequence + jetLepSequence + # must be after all the leptons | ||||||||||||||
isoTrackSequence + jetLepSequence + # must be after all the leptons | ||||||||||||||
linkedObjects + | ||||||||||||||
jetTables + muonTables + tauTables + electronTables + photonTables + globalTables +vertexTables+ metTables+simpleCleanerTable + isoTrackTables | ||||||||||||||
) | ||||||||||||||
|
@@ -208,7 +208,35 @@ def nanoAOD_recalibrateMETs(process,isData): | |||||||||||||
table.variables.muonSubtrFactor = Var("1-userFloat('muonSubtrRawPt')/(pt()*jecFactor('Uncorrected'))",float,doc="1-(muon-subtracted raw pt)/(raw pt)",precision=6) | ||||||||||||||
process.metTables += process.corrT1METJetTable | ||||||||||||||
# makePuppiesFromMiniAOD(process,True) # call this before in the global customizer otherwise it would reset photon IDs in VID | ||||||||||||||
runMetCorAndUncFromMiniAOD(process,isData=isData,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi") | ||||||||||||||
nanoAOD_PuppiV15_switch = cms.PSet( | ||||||||||||||
recoMetFromPFCs = cms.untracked.bool(False), | ||||||||||||||
reclusterJets = cms.untracked.bool(False), | ||||||||||||||
) | ||||||||||||||
run2_nanoAOD_106Xv1.toModify(nanoAOD_PuppiV15_switch,recoMetFromPFCs=True,reclusterJets=True) | ||||||||||||||
runMetCorAndUncFromMiniAOD(process,isData=isData,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi", recoMetFromPFCs=bool(nanoAOD_PuppiV15_switch.recoMetFromPFCs), reclusterJets=bool(nanoAOD_PuppiV15_switch.reclusterJets)) | ||||||||||||||
if nanoAOD_PuppiV15_switch.reclusterJets: | ||||||||||||||
from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets | ||||||||||||||
from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask | ||||||||||||||
task = getPatAlgosToolsTask(process) | ||||||||||||||
addToProcessAndTask('ak4PuppiJets', ak4PFJets.clone (src = 'puppi', doAreaFastjet = True, jetPtMin = 10.), process, task) | ||||||||||||||
from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this change goes in the right direction and is compatible on what is done with the TYPE1 in general cmssw/JetMETCorrections/Type1MET/python/correctionTermsPfMetType1Type2_cff.py Lines 40 to 45 in 60e3a2a
besides this puppiV15 need of reclustering, how the EM and Muon like objects are handled in nano ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello, the EM and muon cleaning are performed inside the runMetCorAndUncFromMiniAOD call which takes as input the uncleaned jet collection, so things are as expected. |
||||||||||||||
addJetCollection(process, | ||||||||||||||
labelName = 'Puppi', | ||||||||||||||
jetSource = cms.InputTag('ak4PuppiJets'), | ||||||||||||||
algo = 'AK', rParam=0.4, | ||||||||||||||
genJetCollection=cms.InputTag('slimmedGenJets'), | ||||||||||||||
jetCorrections = ('AK4PFPuppi', ['L1FastJet', 'L2Relative', 'L3Absolute','L2L3Residual'], 'None'), | ||||||||||||||
pfCandidates = cms.InputTag('packedPFCandidates'), | ||||||||||||||
pvSource = cms.InputTag('offlineSlimmedPrimaryVertices'), | ||||||||||||||
svSource = cms.InputTag('slimmedSecondaryVertices'), | ||||||||||||||
muSource =cms.InputTag( 'slimmedMuons'), | ||||||||||||||
elSource = cms.InputTag('slimmedElectrons'), | ||||||||||||||
genParticles= cms.InputTag('prunedGenParticles'), | ||||||||||||||
getJetMCFlavour=False | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
process.patJetsPuppi.addGenPartonMatch = cms.bool(False) | ||||||||||||||
process.patJetsPuppi.addGenJetMatch = cms.bool(False) | ||||||||||||||
process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(process.jetSequence),cms.Sequence(process.puppiMETSequence+process.fullPatMetSequencePuppi)) | ||||||||||||||
return process | ||||||||||||||
|
||||||||||||||
|
@@ -284,7 +312,7 @@ def nanoAOD_runMETfixEE2017(process,isData): | |||||||||||||
process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(jetSequence),process.fullPatMetSequenceFixEE2017) | ||||||||||||||
|
||||||||||||||
def nanoAOD_customizeCommon(process): | ||||||||||||||
makePuppiesFromMiniAOD(process,True) | ||||||||||||||
makePuppiesFromMiniAOD(process,True) | ||||||||||||||
process.puppiNoLep.useExistingWeights = True | ||||||||||||||
process.puppi.useExistingWeights = True | ||||||||||||||
run2_nanoAOD_106Xv1.toModify(process.puppiNoLep, useExistingWeights = False) | ||||||||||||||
|
@@ -352,7 +380,7 @@ def nanoAOD_customizeMC(process): | |||||||||||||
|
||||||||||||||
### Era dependent customization | ||||||||||||||
_80x_sequence = nanoSequenceCommon.copy() | ||||||||||||||
#remove stuff | ||||||||||||||
#remove stuff | ||||||||||||||
_80x_sequence.remove(isoTrackTables) | ||||||||||||||
_80x_sequence.remove(isoTrackSequence) | ||||||||||||||
#add stuff | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alefisico @lathomas
while it's correct to update the UL 2017, we should keep the EOY untouched; after line 276 add this
for modifier in run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2:
modifier.toModify( jetTable.variables, puIdDisc = Var("userFloat('puId94XDisc')", float,doc="Pilup ID discriminant with 94X (2017) training",precision=10))
What you want to do for the 2016,2018 of UL ? now you have the old id of the EOY
pileupJetId:fullDiscriminant
andpileupJetId102X
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello. Yes this is intended (we only have UL training for 2017 so far)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok for the UL-2016 and 2018 we can keep the old EOY or now.
But there is no reason to change the puId for the 2017 EOY to the new one since people will have in hands the SF for the EOY.
This block of code is still required after line 276
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to summarize this is what we want:
EOY 16 (run2_nanoAOD_94X2016)
pileupJetId:fullDiscriminant
EOY 17 (run2_nanoAOD_94XMiniAODv1 + run2_nanoAOD_94XMiniAODv2 )
puId94XDisc
EOY 18 (run2_nanoAOD_102Xv1)
pileupJetId102X
UL 16 (run2_nanoAOD_106Xv1, run2_jme_2016)
pileupJetId:fullDiscriminant
[temporary]UL 17 (run2_nanoAOD_106Xv1, run2_jme_2017)
puId106XUL17Disc
UL 18 (run2_nanoAOD_106Xv1)
pileupJetId102X
[temporary]now how you do in reMiniAOD ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I just implemented this. I think for reMiniAOD we should use the same strategy as in the nanoAODv8 for UL.