Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:04

0001 ## import skeleton process
0002 from PhysicsTools.PatAlgos.patTemplate_cfg import *
0003 
0004 ## to run in un-scheduled mode uncomment the following lines
0005 process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
0006 patAlgosToolsTask.add(process.patCandidatesTask)
0007 #Temporary customize to the unit tests that fail due to old input samples
0008 process.patTaus.skipMissingTauID = True
0009 
0010 process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
0011 patAlgosToolsTask.add(process.selectedPatCandidatesTask)
0012 
0013 ## uncomment the following line to add different jet collections
0014 ## to the event content
0015 from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection
0016 
0017 # b-tag discriminators
0018 btagDiscriminators = [
0019      # legacy framework (no longer supported, work with RECO/AOD but not MiniAOD)
0020      'jetBProbabilityBJetTags'
0021     ,'jetProbabilityBJetTags'
0022     ,'positiveOnlyJetBProbabilityBJetTags'
0023     ,'positiveOnlyJetProbabilityBJetTags'
0024     ,'negativeOnlyJetBProbabilityBJetTags'
0025     ,'negativeOnlyJetProbabilityBJetTags'
0026     ,'trackCountingHighPurBJetTags'
0027     ,'trackCountingHighEffBJetTags'
0028     ,'negativeTrackCountingHighEffBJetTags'
0029     ,'negativeTrackCountingHighPurBJetTags'
0030     ,'simpleSecondaryVertexHighEffBJetTags'
0031     ,'simpleSecondaryVertexHighPurBJetTags'
0032     ,'negativeSimpleSecondaryVertexHighEffBJetTags'
0033     ,'negativeSimpleSecondaryVertexHighPurBJetTags'
0034     ,'combinedSecondaryVertexV2BJetTags'
0035     ,'positiveCombinedSecondaryVertexV2BJetTags'
0036     ,'negativeCombinedSecondaryVertexV2BJetTags'
0037     ,'simpleInclusiveSecondaryVertexHighEffBJetTags'
0038     ,'simpleInclusiveSecondaryVertexHighPurBJetTags'
0039     ,'negativeSimpleInclusiveSecondaryVertexHighEffBJetTags'
0040     ,'negativeSimpleInclusiveSecondaryVertexHighPurBJetTags'
0041     ,'doubleSecondaryVertexHighEffBJetTags'
0042     ,'combinedInclusiveSecondaryVertexV2BJetTags'
0043     ,'positiveCombinedInclusiveSecondaryVertexV2BJetTags'
0044     ,'negativeCombinedInclusiveSecondaryVertexV2BJetTags'
0045     ,'combinedMVAV2BJetTags'
0046     ,'negativeCombinedMVAV2BJetTags'
0047     ,'positiveCombinedMVAV2BJetTags'
0048      # new candidate-based framework (supported with RECO/AOD/MiniAOD)
0049     ,'pfJetBProbabilityBJetTags'
0050     ,'pfJetProbabilityBJetTags'
0051     ,'pfPositiveOnlyJetBProbabilityBJetTags'
0052     ,'pfPositiveOnlyJetProbabilityBJetTags'
0053     ,'pfNegativeOnlyJetBProbabilityBJetTags'
0054     ,'pfNegativeOnlyJetProbabilityBJetTags'
0055     ,'pfTrackCountingHighPurBJetTags'
0056     ,'pfTrackCountingHighEffBJetTags'
0057     ,'pfNegativeTrackCountingHighPurBJetTags'
0058     ,'pfNegativeTrackCountingHighEffBJetTags'
0059     ,'pfSimpleSecondaryVertexHighEffBJetTags'
0060     ,'pfSimpleSecondaryVertexHighPurBJetTags'
0061     ,'pfNegativeSimpleSecondaryVertexHighEffBJetTags'
0062     ,'pfNegativeSimpleSecondaryVertexHighPurBJetTags'
0063     ,'pfSimpleInclusiveSecondaryVertexHighEffBJetTags'
0064     ,'pfSimpleInclusiveSecondaryVertexHighPurBJetTags'
0065     ,'pfNegativeSimpleInclusiveSecondaryVertexHighEffBJetTags'
0066     ,'pfNegativeSimpleInclusiveSecondaryVertexHighPurBJetTags'
0067     ,'pfCombinedSecondaryVertexV2BJetTags'
0068     ,'pfPositiveCombinedSecondaryVertexV2BJetTags'
0069     ,'pfNegativeCombinedSecondaryVertexV2BJetTags'
0070     ,'pfCombinedInclusiveSecondaryVertexV2BJetTags'
0071     ,'pfPositiveCombinedInclusiveSecondaryVertexV2BJetTags'
0072     ,'pfNegativeCombinedInclusiveSecondaryVertexV2BJetTags'
0073     ,'pfGhostTrackBJetTags'
0074     ,'softPFMuonBJetTags'
0075     ,'softPFMuonByPtBJetTags'
0076     ,'softPFMuonByIP3dBJetTags'
0077     ,'softPFMuonByIP2dBJetTags'
0078     ,'positiveSoftPFMuonBJetTags'
0079     ,'positiveSoftPFMuonByPtBJetTags'
0080     ,'positiveSoftPFMuonByIP3dBJetTags'
0081     ,'positiveSoftPFMuonByIP2dBJetTags'
0082     ,'negativeSoftPFMuonBJetTags'
0083     ,'negativeSoftPFMuonByPtBJetTags'
0084     ,'negativeSoftPFMuonByIP3dBJetTags'
0085     ,'negativeSoftPFMuonByIP2dBJetTags'
0086     ,'softPFElectronBJetTags'
0087     ,'softPFElectronByPtBJetTags'
0088     ,'softPFElectronByIP3dBJetTags'
0089     ,'softPFElectronByIP2dBJetTags'
0090     ,'positiveSoftPFElectronBJetTags'
0091     ,'positiveSoftPFElectronByPtBJetTags'
0092     ,'positiveSoftPFElectronByIP3dBJetTags'
0093     ,'positiveSoftPFElectronByIP2dBJetTags'
0094     ,'negativeSoftPFElectronBJetTags'
0095     ,'negativeSoftPFElectronByPtBJetTags'
0096     ,'negativeSoftPFElectronByIP3dBJetTags'
0097     ,'negativeSoftPFElectronByIP2dBJetTags'
0098     ,'pfCombinedMVAV2BJetTags'
0099     ,'pfNegativeCombinedMVAV2BJetTags'
0100     ,'pfPositiveCombinedMVAV2BJetTags'
0101      # CTagging
0102     ,'pfCombinedCvsLJetTags'
0103     ,'pfCombinedCvsBJetTags'
0104      # ChargeTagging
0105     ,'pfChargeBJetTags'
0106      #Deep Flavour
0107     ,'pfDeepCSVJetTags:probb'
0108     ,'pfDeepCSVJetTags:probc'
0109     ,'pfDeepCSVJetTags:probudsg'
0110     ,'pfDeepCSVJetTags:probbb'
0111      # DeepCMVA
0112     ,'pfDeepCMVAJetTags:probb'
0113     ,'pfDeepCMVAJetTags:probc'
0114     ,'pfDeepCMVAJetTags:probudsg'
0115     ,'pfDeepCMVAJetTags:probbb'
0116     ,'pfDeepCMVAJetTags:probcc'
0117 ]
0118 
0119 # uncomment the following lines to add ak4PFJets with new b-tags to your PAT output
0120 addJetCollection(
0121    process,
0122    labelName = 'AK4PF',
0123    jetSource = cms.InputTag('ak4PFJets'),
0124    jetCorrections = ('AK4PF', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'Type-2'),
0125    btagDiscriminators = btagDiscriminators
0126 )
0127 process.patJetsAK4PF.addTagInfos = True
0128 
0129 # uncomment the following lines to add ak8PFJetsCHS with new b-tags to your PAT output
0130 addJetCollection(
0131    process,
0132    labelName = 'AK8PFCHS',
0133    jetSource = cms.InputTag('ak8PFJetsCHS'),
0134    jetCorrections = ('AK8PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'Type-2'),
0135    algo = 'AK',
0136    rParam = 0.8,
0137    btagDiscriminators = ['pfBoostedDoubleSecondaryVertexAK8BJetTags']
0138 )
0139 process.patJetsAK8PFCHS.addTagInfos = True
0140 
0141 # uncomment the following lines to add subjets of ak8PFJetsCHSSoftDrop with new b-tags to your PAT output
0142 from pdb import set_trace
0143 addJetCollection(
0144    process,
0145    labelName = 'AK8PFCHSSoftDropSubjets',
0146    jetSource = cms.InputTag('ak8PFJetsCHSSoftDrop','SubJets'),
0147    jetCorrections = ('AK4PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'Type-2'), # Using AK4 JECs for subjets which might not be completely appropriate
0148    algo = 'AK',  # needed for subjet flavor clustering
0149    btagDiscriminators = btagDiscriminators,
0150    explicitJTA = True,  # needed for subjet b tagging
0151    svClustering = True, # needed for subjet b tagging
0152    fatJets = cms.InputTag("ak8PFJetsCHS"),               # needed for subjet flavor clustering
0153    groomedFatJets = cms.InputTag("ak8PFJetsCHSSoftDrop"), # needed for subjet flavor clustering
0154    rParam = 0.8, # needed for subjet flavor clustering
0155 )
0156 process.patJetsAK8PFCHSSoftDropSubjets.addTagInfos = True
0157 
0158 ## JetID works only with RECO input for the CaloTowers (s. below for 'process.source.fileNames')
0159 #process.patJets.addJetID=True
0160 #process.load("RecoJets.JetProducers.ak4JetID_cfi")
0161 #process.patJets.jetIDMap="ak4JetID"
0162 process.out.outputCommands.append( 'drop *_selectedPatJetsAK4PF_caloTowers_*' )
0163 
0164 ## ------------------------------------------------------
0165 #  In addition you usually want to change the following
0166 #  parameters:
0167 ## ------------------------------------------------------
0168 #
0169 #process.GlobalTag.globaltag =  'MCRUN1_74_V2::All'     ##  (according to https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions)
0170 #                                         ##
0171 ## switch to RECO input
0172 from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValProdTTbarAODSIM
0173 process.source.fileNames = filesRelValProdTTbarAODSIM
0174 #from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarGENSIMRECO
0175 #process.source.fileNames = filesRelValTTbarGENSIMRECO
0176 #                                         ##
0177 process.maxEvents.input = 10
0178 #                                         ##
0179 #   process.out.outputCommands = [ ... ]  ##  (e.g. taken from PhysicsTools/PatAlgos/python/patEventContent_cff.py)
0180 #                                         ##
0181 process.out.fileName = 'patTuple_addBTagging.root'
0182 #                                         ##
0183 process.options.wantSummary = False   ##  (to suppress the long output at the end of the job)