Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-29 01:21:39

0001 import FWCore.ParameterSet.Config as cms
0002 from PhysicsTools.NanoAOD.common_cff import *
0003 from PhysicsTools.NanoAOD.nano_eras_cff import *
0004 
0005 
0006 btagSFdir="PhysicsTools/NanoAOD/data/btagSF/"
0007 
0008 btagWeightTable = cms.EDProducer("BTagSFProducer",
0009     src = cms.InputTag("linkedObjects","jets"),
0010     cut = cms.string("pt > 25. && abs(eta) < 2.5"),
0011     discNames = cms.vstring(
0012         "pfCombinedInclusiveSecondaryVertexV2BJetTags",
0013         "pfDeepCSVJetTags:probb+pfDeepCSVJetTags:probbb",       #if multiple MiniAOD branches need to be summed up (e.g., DeepCSV b+bb), separate them using '+' delimiter
0014         "pfCombinedMVAV2BJetTags"
0015     ),
0016     discShortNames = cms.vstring(
0017         "CSVV2",
0018         "DeepCSVB",
0019         "CMVA"
0020     ),
0021     weightFiles = cms.vstring(                                  #default settings are for 2017 94X. toModify function is called later for other eras.
0022         btagSFdir+"CSVv2_94XSF_V2_B_F.csv",
0023         btagSFdir+"DeepCSV_94XSF_V2_B_F.csv",
0024         "unavailable"                                           #if SFs for an algorithm in an era is unavailable, the corresponding branch will not be stored
0025     ),
0026     operatingPoints = cms.vstring("3","3","3"),                 #loose = 0, medium = 1, tight = 2, reshaping = 3
0027     measurementTypesB = cms.vstring("iterativefit","iterativefit","iterativefit"),     #e.g. "comb", "incl", "ttbar", "iterativefit"
0028     measurementTypesC = cms.vstring("iterativefit","iterativefit","iterativefit"),
0029     measurementTypesUDSG = cms.vstring("iterativefit","iterativefit","iterativefit"),
0030     sysTypes = cms.vstring("central","central","central")
0031 )
0032 
0033 for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016: # to be updated when SF for Summer16MiniAODv3 MC will be available
0034     modifier.toModify(btagWeightTable,
0035         cut = cms.string("pt > 25. && abs(eta) < 2.4"),             #80X corresponds to 2016, |eta| < 2.4
0036         weightFiles = cms.vstring(                                  #80X corresponds to 2016 SFs
0037             btagSFdir+"CSVv2_Moriond17_B_H.csv",
0038             "unavailable",
0039             btagSFdir+"cMVAv2_Moriond17_B_H.csv"
0040         )
0041     )