|
64 | 64 | discNames = cms.vstring( |
65 | 65 | "pfCombinedInclusiveSecondaryVertexV2BJetTags", |
66 | 66 | "pfDeepCSVJetTags:probb+pfDeepCSVJetTags:probbb", #if multiple MiniAOD branches need to be summed up (e.g., DeepCSV b+bb), separate them using '+' delimiter |
67 | | - "pfCombinedMVAV2BJetTags" |
| 67 | + "pfCombinedMVAV2BJetTags" |
68 | 68 | ), |
69 | 69 | discShortNames = cms.vstring( |
70 | 70 | "CSVV2", |
|
73 | 73 | ), |
74 | 74 | weightFiles = cms.vstring( #default settings are for 2017 94X. toModify function is called later for other eras. |
75 | 75 | btagSFdir+"CSVv2_94XSF_V2_B_F.csv", |
76 | | - btagSFdir+"DeepCSV_94XSF_V2_B_F.csv", |
| 76 | + btagSFdir+"DeepCSV_94XSF_V2_B_F.csv", |
77 | 77 | "unavailable" #if SFs for an algorithm in an era is unavailable, the corresponding branch will not be stored |
78 | 78 | ), |
79 | 79 | operatingPoints = cms.vstring("3","3","3"), #loose = 0, medium = 1, tight = 2, reshaping = 3 |
|
84 | 84 | ) |
85 | 85 |
|
86 | 86 | for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016: # to be updated when SF for Summer16MiniAODv3 MC will be available |
87 | | - modifier.toModify(btagWeightTable, |
| 87 | + modifier.toModify(btagWeightTable, |
88 | 88 | cut = cms.string("pt > 25. && abs(eta) < 2.4"), #80X corresponds to 2016, |eta| < 2.4 |
89 | 89 | weightFiles = cms.vstring( #80X corresponds to 2016 SFs |
90 | | - btagSFdir+"CSVv2_Moriond17_B_H.csv", |
91 | | - "unavailable", |
92 | | - btagSFdir+"cMVAv2_Moriond17_B_H.csv" |
| 90 | + btagSFdir+"CSVv2_Moriond17_B_H.csv", |
| 91 | + "unavailable", |
| 92 | + btagSFdir+"cMVAv2_Moriond17_B_H.csv" |
93 | 93 | ) |
94 | 94 | ) |
95 | 95 |
|
96 | 96 |
|
97 | 97 | lheInfoTable = cms.EDProducer("LHETablesProducer", |
98 | 98 | lheInfo = cms.VInputTag(cms.InputTag("externalLHEProducer"), cms.InputTag("source")), |
99 | 99 | precision = cms.int32(14), |
100 | | - storeLHEParticles = cms.bool(True) |
| 100 | + storeLHEParticles = cms.bool(True) |
101 | 101 | ) |
102 | 102 |
|
103 | 103 | l1bits=cms.EDProducer("L1TriggerResultsConverter", src=cms.InputTag("gtStage2Digis"), legacyL1=cms.bool(False), |
|
106 | 106 |
|
107 | 107 | nanoSequenceCommon = cms.Sequence( |
108 | 108 | nanoMetadata + jetSequence + muonSequence + tauSequence + electronSequence+photonSequence+vertexSequence+ |
109 | | - isoTrackSequence + jetLepSequence + # must be after all the leptons |
| 109 | + isoTrackSequence + jetLepSequence + # must be after all the leptons |
110 | 110 | linkedObjects + |
111 | 111 | jetTables + muonTables + tauTables + electronTables + photonTables + globalTables +vertexTables+ metTables+simpleCleanerTable + isoTrackTables |
112 | 112 | ) |
@@ -208,7 +208,13 @@ def nanoAOD_recalibrateMETs(process,isData): |
208 | 208 | table.variables.muonSubtrFactor = Var("1-userFloat('muonSubtrRawPt')/(pt()*jecFactor('Uncorrected'))",float,doc="1-(muon-subtracted raw pt)/(raw pt)",precision=6) |
209 | 209 | process.metTables += process.corrT1METJetTable |
210 | 210 | # makePuppiesFromMiniAOD(process,True) # call this before in the global customizer otherwise it would reset photon IDs in VID |
211 | | - runMetCorAndUncFromMiniAOD(process,isData=isData,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi") |
| 211 | + nanoAOD_PuppiV15_switch = cms.PSet( |
| 212 | + recoMetFromPFCs = cms.untracked.bool(False), |
| 213 | + reclusterJets = cms.untracked.bool(False), |
| 214 | + ) |
| 215 | + run2_nanoAOD_106Xv1.toModify( nanoAOD_PuppiV15_switch, recoMetFromPFCs=True, reclusterJets=True ) |
| 216 | + runMetCorAndUncFromMiniAOD(process,isData=isData,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi", recoMetFromPFCs=bool(nanoAOD_PuppiV15_switch.recoMetFromPFCs), reclusterJets=bool(nanoAOD_PuppiV15_switch.reclusterJets)) |
| 217 | + #if not isData: process.patJetPartons.particles = 'prunedGenParticles' |
212 | 218 | process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(process.jetSequence),cms.Sequence(process.puppiMETSequence+process.fullPatMetSequencePuppi)) |
213 | 219 | return process |
214 | 220 |
|
@@ -284,7 +290,7 @@ def nanoAOD_runMETfixEE2017(process,isData): |
284 | 290 | process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(jetSequence),process.fullPatMetSequenceFixEE2017) |
285 | 291 |
|
286 | 292 | def nanoAOD_customizeCommon(process): |
287 | | - makePuppiesFromMiniAOD(process,True) |
| 293 | + makePuppiesFromMiniAOD(process,True) |
288 | 294 | process.puppiNoLep.useExistingWeights = True |
289 | 295 | process.puppi.useExistingWeights = True |
290 | 296 | run2_nanoAOD_106Xv1.toModify(process.puppiNoLep, useExistingWeights = False) |
@@ -352,7 +358,7 @@ def nanoAOD_customizeMC(process): |
352 | 358 |
|
353 | 359 | ### Era dependent customization |
354 | 360 | _80x_sequence = nanoSequenceCommon.copy() |
355 | | -#remove stuff |
| 361 | +#remove stuff |
356 | 362 | _80x_sequence.remove(isoTrackTables) |
357 | 363 | _80x_sequence.remove(isoTrackSequence) |
358 | 364 | #add stuff |
|
0 commit comments