Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:24

0001 # This configuration is an example that recalibrates the slimmedJets from MiniAOD
0002 # and adds a new userfloat "oldJetMass" and an additional b-tag discriminator to them
0003 
0004 ## import skeleton process
0005 from PhysicsTools.PatAlgos.patTemplate_cfg import *
0006 #process.Tracer = cms.Service("Tracer")
0007 
0008 ## uncomment the following line to update different jet collections
0009 ## and add them to the event content
0010 from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection, addJetCollection
0011 
0012 ## An example where the jet energy correction are updated to the current GlobalTag
0013 ## and a userFloat containing the previous mass of the jet and an additional
0014 ## b-tag discriminator are added
0015 from RecoJets.Configuration.RecoPFJets_cff import ak8PFJetsPuppiSoftDropMass
0016 process.oldJetMass = ak8PFJetsPuppiSoftDropMass.clone(
0017   src = cms.InputTag("slimmedJets"),
0018   matched = cms.InputTag("slimmedJets") )
0019 patAlgosToolsTask.add(process.oldJetMass)
0020 
0021 updateJetCollection(
0022    process,
0023    jetSource = cms.InputTag('slimmedJets'),
0024    jetCorrections = ('AK4PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'None'),
0025    btagDiscriminators = [
0026       'pfCombinedSecondaryVertexV2BJetTags',
0027 
0028       'pfDeepCSVJetTags:probudsg', 
0029       'pfDeepCSVJetTags:probb', 
0030       'pfDeepCSVJetTags:probc', 
0031       'pfDeepCSVJetTags:probbb', 
0032       ## probcc was merged with probc
0033       ## 'pfDeepCSVJetTags:probcc',
0034 
0035       ## 'pfDeepCMVAJetTags:probudsg', 
0036       ## 'pfDeepCMVAJetTags:probb', 
0037       ## 'pfDeepCMVAJetTags:probc', 
0038       ## 'pfDeepCMVAJetTags:probbb', 
0039       ## 'pfDeepCMVAJetTags:probcc'
0040       ] ## to add discriminators
0041 )
0042 
0043 process.updatedPatJets.userData.userFloats.src += ['oldJetMass']
0044 
0045 from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpMINIAODSIM
0046 process.source.fileNames = filesRelValTTbarPileUpMINIAODSIM
0047 #                                         ##
0048 process.maxEvents.input = 100
0049 #                                         ##
0050 from Configuration.EventContent.EventContent_cff import MINIAODSIMEventContent
0051 process.out.outputCommands = MINIAODSIMEventContent.outputCommands
0052 process.out.outputCommands.append('keep *_selectedUpdatedPatJets*_*_*')
0053 process.out.outputCommands.append('keep *_pfDeepCSVTagInfos*_*_*')
0054 process.out.outputCommands.append('keep *_updatedPatJets*_*_*')
0055 #                                         ##
0056 process.out.fileName = 'testDeepCSV.root'
0057 #                                         ##
0058 #   process.options.wantSummary = False   ##  (to suppress the long output at the end of the job)
0059 # process.add_(cms.Service("InitRootHandlers", DebugLevel =cms.untracked.int32(3)))