File indexing completed on 2024-04-06 12:23:59
0001
0002 from PhysicsTools.PatAlgos.patTemplate_cfg import *
0003
0004
0005
0006 process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
0007 patAlgosToolsTask.add(process.patCandidatesTask)
0008
0009 process.patTaus.skipMissingTauID = True
0010
0011 process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
0012 patAlgosToolsTask.add(process.selectedPatCandidatesTask)
0013
0014 from PhysicsTools.PatAlgos.tools.metTools import addMETCollection
0015
0016 addMETCollection(process, labelName='patMETPF', metSource='pfMetT1')
0017
0018
0019
0020
0021 from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection
0022 from PhysicsTools.PatAlgos.tools.jetTools import switchJetCollection
0023
0024
0025 labelAK4PFCHS = 'AK4PFCHS'
0026 postfixAK4PFCHS = 'Copy'
0027 addJetCollection(
0028 process,
0029 postfix = postfixAK4PFCHS,
0030 labelName = labelAK4PFCHS,
0031 jetSource = cms.InputTag('ak4PFJetsCHS'),
0032 jetCorrections = ('AK4PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'Type-2')
0033 )
0034 process.out.outputCommands.append( 'drop *_selectedPatJets%s%s_caloTowers_*'%( labelAK4PFCHS, postfixAK4PFCHS ) )
0035
0036
0037 switchJetCollection(
0038 process,
0039 jetSource = cms.InputTag('ak4PFJets'),
0040 jetCorrections = ('AK4PF', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'Type-1'),
0041 btagDiscriminators = [
0042 'pfJetBProbabilityBJetTags'
0043 , 'pfJetProbabilityBJetTags'
0044 , 'pfTrackCountingHighPurBJetTags'
0045 , 'pfTrackCountingHighEffBJetTags'
0046 , 'pfSimpleSecondaryVertexHighEffBJetTags'
0047 , 'pfSimpleSecondaryVertexHighPurBJetTags'
0048 , 'pfCombinedInclusiveSecondaryVertexV2BJetTags'
0049 ]
0050 )
0051 process.out.outputCommands.append( 'drop *_selectedPatJets_caloTowers_*' )
0052
0053
0054 labelAK8PFCHSSoftDrop = 'AK8PFCHSSoftDrop'
0055 addJetCollection(
0056 process,
0057 labelName = labelAK8PFCHSSoftDrop,
0058 jetSource = cms.InputTag('ak8PFJetsCHSSoftDrop',''),
0059 algo = 'AK',
0060 rParam = 0.8,
0061 genJetCollection = cms.InputTag('ak8GenJets'),
0062 jetCorrections = ('AK8PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'None'),
0063 btagDiscriminators = ['None'],
0064 getJetMCFlavour = False
0065 )
0066 process.out.outputCommands.append( 'keep *_selectedPatJets%s_pfCandidates_*'%( labelAK8PFCHSSoftDrop ) )
0067 process.out.outputCommands.append( 'drop *_selectedPatJets%s_caloTowers_*'%( labelAK8PFCHSSoftDrop ) )
0068
0069
0070 labelAK4Calo = 'AK4Calo'
0071 addJetCollection(
0072 process,
0073 labelName = labelAK4Calo,
0074 jetSource = cms.InputTag('ak4CaloJets'),
0075 jetCorrections = ('AK7Calo', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'Type-1'),
0076 btagDiscriminators = [
0077 'pfJetBProbabilityBJetTags'
0078 , 'pfJetProbabilityBJetTags'
0079 , 'pfTrackCountingHighPurBJetTags'
0080 , 'pfTrackCountingHighEffBJetTags'
0081 , 'pfSimpleSecondaryVertexHighEffBJetTags'
0082 , 'pfSimpleSecondaryVertexHighPurBJetTags'
0083 , 'pfCombinedInclusiveSecondaryVertexV2BJetTags'
0084 ]
0085 )
0086 process.out.outputCommands.append( 'drop *_selectedPatJets%s_pfCandidates_*'%( labelAK4Calo ) )
0087
0088
0089
0090
0091 process.patJetsAK4Calo.useLegacyJetMCFlavour=True
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102 from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValProdTTbarAODSIM
0103 process.source.fileNames = filesRelValProdTTbarAODSIM
0104
0105
0106
0107 process.maxEvents.input = 10
0108
0109
0110
0111 process.out.fileName = 'patTuple_addJets.root'
0112
0113