Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-19 23:20:00

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from DQMOffline.RecoB.tagGenericAnalysis_cff import bTagGenericAnalysisBlock
0004 from DQMOffline.RecoB.tagGenericAnalysis_cff import cTagGenericAnalysisBlock
0005 from DQMOffline.RecoB.tagGenericAnalysis_cff import tauTagGenericAnalysisBlock
0006 from DQMOffline.RecoB.tagGenericAnalysis_cff import sTagGenericAnalysisBlock
0007 from DQMOffline.RecoB.tagGenericAnalysis_cff import qgTagGenericAnalysisBlock
0008 
0009 ############################################################
0010 #
0011 # DeepCSV
0012 #
0013 ############################################################
0014 # recommendation for UL18: https://twiki.cern.ch/twiki/bin/view/CMS/BtagRecommendation106XUL18
0015 deepCSVWP = {
0016     'BvsAll': 0.1208, # loose
0017     'CvsL':   0.153,  # medium
0018     'CvsB':   0.363,  # medium
0019 }
0020 
0021 DeepCSVDiscriminators = {
0022     'BvsAll': cms.PSet(
0023         bTagGenericAnalysisBlock,
0024 
0025         folder = cms.string('DeepCSV_BvsAll'),
0026         CTagPlots = cms.bool(False),
0027         discrCut = cms.double(deepCSVWP['BvsAll']),
0028         numerator = cms.vstring(
0029             'pfDeepCSVJetTags:probb',
0030             'pfDeepCSVJetTags:probbb',
0031         ),
0032         denominator = cms.vstring(),
0033     ),
0034 
0035     'CvsL': cms.PSet(
0036         cTagGenericAnalysisBlock,
0037 
0038         folder = cms.string('DeepCSV_CvsL'),
0039         CTagPlots = cms.bool(True),
0040         discrCut = cms.double(deepCSVWP['CvsL']),
0041         numerator = cms.vstring('pfDeepCSVJetTags:probc'),
0042         denominator = cms.vstring(
0043             'pfDeepCSVJetTags:probc',
0044             'pfDeepCSVJetTags:probudsg',
0045         ),
0046     ),
0047 
0048     'CvsB': cms.PSet(
0049         cTagGenericAnalysisBlock,
0050 
0051         folder = cms.string('DeepCSV_CvsB'),
0052         CTagPlots = cms.bool(True),
0053         discrCut = cms.double(deepCSVWP['CvsB']),
0054         numerator = cms.vstring('pfDeepCSVJetTags:probc'),
0055         denominator = cms.vstring(
0056             'pfDeepCSVJetTags:probc',
0057             'pfDeepCSVJetTags:probb',
0058             'pfDeepCSVJetTags:probbb',
0059         ),
0060     ),
0061 }
0062 
0063 
0064 ############################################################
0065 #
0066 # DeepFlavour (aka DeepJet)
0067 #
0068 ############################################################
0069 # Summer23BPix Working points
0070 deepFlavourWP = {
0071     'BvsAll': 0.048, # loose
0072     'CvsL':   0.102,  # medium
0073     'CvsB':   0.328,  # medium
0074 }
0075 
0076 DeepFlavourDiscriminators = {
0077     'BvsAll': cms.PSet(
0078         bTagGenericAnalysisBlock,
0079 
0080         folder = cms.string('DeepFlavour_BvsAll'),
0081         CTagPlots = cms.bool(False),
0082         discrCut = cms.double(deepFlavourWP['BvsAll']),
0083         numerator = cms.vstring(
0084             'pfDeepFlavourJetTags:probb',
0085             'pfDeepFlavourJetTags:probbb',
0086             'pfDeepFlavourJetTags:problepb',
0087         ),
0088         denominator = cms.vstring(),
0089     ),
0090 
0091     'CvsL': cms.PSet(
0092         cTagGenericAnalysisBlock,
0093 
0094         folder = cms.string('DeepFlavour_CvsL'),
0095         CTagPlots = cms.bool(True),
0096         discrCut = cms.double(deepFlavourWP['CvsL']),
0097         numerator = cms.vstring('pfDeepFlavourJetTags:probc'),
0098         denominator = cms.vstring(
0099             'pfDeepFlavourJetTags:probc',
0100             'pfDeepFlavourJetTags:probuds',
0101             'pfDeepFlavourJetTags:probg',
0102         ),
0103     ),
0104 
0105     'CvsB': cms.PSet(
0106         cTagGenericAnalysisBlock,
0107 
0108         folder = cms.string('DeepFlavour_CvsB'),
0109         CTagPlots = cms.bool(True),
0110         discrCut = cms.double(deepFlavourWP['CvsB']),
0111         numerator = cms.vstring('pfDeepFlavourJetTags:probc'),
0112         denominator = cms.vstring(
0113             'pfDeepFlavourJetTags:probc',
0114             'pfDeepFlavourJetTags:probb',
0115             'pfDeepFlavourJetTags:probbb',
0116             'pfDeepFlavourJetTags:problepb',
0117         ),
0118     ),
0119 }
0120 
0121 ############################################################
0122 #
0123 # AK4 ParticleNet for Puppi jets
0124 #
0125 ############################################################
0126 from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4PuppiCentralJetTagsMetaDiscr as pfParticleNetFromMiniAODAK4PuppiCentralJetTagsMetaDiscr
0127 from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4PuppiForwardJetTagsMetaDiscr as pfParticleNetFromMiniAODAK4PuppiForwardJetTagsMetaDiscr
0128 
0129 ParticleNetPuppiCentralDiscriminators = {}
0130 
0131 for meta_tagger in pfParticleNetFromMiniAODAK4PuppiCentralJetTagsMetaDiscr:
0132     discr = meta_tagger.split(':')[1]
0133 
0134     commonTaggerConfig = cms.PSet(
0135         folder = cms.string('ParticleNetCentral_'+discr),
0136         numerator = cms.vstring(meta_tagger),
0137         denominator = cms.vstring(),
0138         discrCut = cms.double(0.3),#Dummy,
0139         CTagPlots = cms.bool(False)
0140     )
0141     if "Bvs" in discr:
0142         ParticleNetPuppiCentralDiscriminators[discr] = cms.PSet(
0143             commonTaggerConfig,
0144             bTagGenericAnalysisBlock
0145         )
0146         if "BvsAll" in discr:
0147             ParticleNetPuppiCentralDiscriminators[discr].discrCut = cms.double(0.0359)#Summer23BPix Loose WP
0148     elif "Cvs" in discr:
0149         ParticleNetPuppiCentralDiscriminators[discr] = cms.PSet(
0150             commonTaggerConfig,
0151             cTagGenericAnalysisBlock,
0152         )
0153         ParticleNetPuppiCentralDiscriminators[discr].CTagPlots = True
0154         if "CvsB" in discr:
0155             ParticleNetPuppiCentralDiscriminators[discr].discrCut = cms.double(0.358)#Summer23BPix Medium WP
0156         if "CvsL" in discr:
0157             ParticleNetPuppiCentralDiscriminators[discr].discrCut = cms.double(0.149)#Summer23BPix Medium WP
0158     elif "TauVs" in discr:
0159         ParticleNetPuppiCentralDiscriminators[discr] = cms.PSet(
0160             commonTaggerConfig,
0161             cTagGenericAnalysisBlock
0162         )
0163     elif "QvsG" in discr:
0164         ParticleNetPuppiCentralDiscriminators[discr] = cms.PSet(
0165             commonTaggerConfig,
0166             cTagGenericAnalysisBlock
0167         )
0168 
0169 ParticleNetPuppiForwardDiscriminators = {}
0170 
0171 for meta_tagger in pfParticleNetFromMiniAODAK4PuppiForwardJetTagsMetaDiscr:
0172     discr = meta_tagger.split(':')[1]
0173 
0174     commonTaggerConfig = cms.PSet(
0175         folder = cms.string('ParticleNetForward_'+discr),
0176         numerator = cms.vstring(meta_tagger),
0177         denominator = cms.vstring(),
0178         discrCut = cms.double(0.3),#Dummy,
0179         CTagPlots = cms.bool(False)
0180     )
0181     if "QvsG" in discr:
0182         ParticleNetPuppiForwardDiscriminators[discr] = cms.PSet(
0183             commonTaggerConfig,
0184             qgTagGenericAnalysisBlock,
0185         )
0186 
0187 ############################################################
0188 #
0189 # UParT
0190 #
0191 ############################################################
0192 from RecoBTag.ONNXRuntime.pfUnifiedParticleTransformerAK4_cff import _pfUnifiedParticleTransformerAK4JetTagsMetaDiscrs as pfUnifiedParticleTransformerAK4JetTagsMetaDiscrs
0193 
0194 UParTDiscriminators = {}
0195 #
0196 #
0197 #
0198 for meta_tagger in pfUnifiedParticleTransformerAK4JetTagsMetaDiscrs:
0199     discr = meta_tagger.split(':')[1] #split input tag to get thcde producer label
0200     #
0201     #
0202     #
0203     commonTaggerConfig = cms.PSet(
0204         folder = cms.string('UParT_'+discr),
0205         numerator = cms.vstring(meta_tagger),
0206         denominator = cms.vstring(),
0207         discrCut = cms.double(0.3),#Dummy,
0208         CTagPlots = cms.bool(False)
0209     )
0210     if "Bvs" in discr:
0211         UParTDiscriminators[discr] = cms.PSet(
0212             commonTaggerConfig,
0213             bTagGenericAnalysisBlock
0214         )
0215     elif "Cvs" in discr:
0216         UParTDiscriminators[discr] = cms.PSet(
0217             commonTaggerConfig,
0218             cTagGenericAnalysisBlock,
0219         )
0220         UParTDiscriminators[discr].CTagPlots = True
0221     elif "QvsG" in discr:
0222         UParTDiscriminators[discr] = cms.PSet(
0223             commonTaggerConfig,
0224             cTagGenericAnalysisBlock
0225         )
0226     elif "Svs" in discr:
0227         UParTDiscriminators[discr] = cms.PSet(
0228             commonTaggerConfig,
0229             cTagGenericAnalysisBlock
0230         )
0231     elif "TauVs" in discr:
0232         UParTDiscriminators[discr] = cms.PSet(
0233             commonTaggerConfig,
0234             cTagGenericAnalysisBlock
0235         )
0236