Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:14:03

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 
0008 process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
0009 patAlgosToolsTask.add(process.selectedPatCandidatesTask)
0010 
0011 process.Tracer = cms.Service("Tracer")
0012 
0013 ## ------------------------------------------------------
0014 #  NOTE: you can use a bunch of core tools of PAT to
0015 #  taylor your PAT configuration; for a few examples
0016 #  uncomment the lines below
0017 ## ------------------------------------------------------
0018 #from PhysicsTools.PatAlgos.tools.coreTools import *
0019 
0020 ## remove MC matching from the default sequence
0021 # removeMCMatching(process, ['Muons'])
0022 # runOnData(process)
0023 
0024 ## remove certain objects from the default sequence
0025 # removeAllPATObjectsBut(process, ['Muons'])
0026 # removeSpecificPATObjects(process, ['Electrons', 'Muons', 'Taus'])
0027 
0028 
0029 
0030 
0031 #add pat conversions
0032 process.patConversions = cms.EDProducer("PATConversionProducer",
0033     # input collection
0034     #electronSource = cms.InputTag("gsfElectrons"),
0035     electronSource = cms.InputTag("selectedPatElectrons")
0036     # this should be your last selected electron collection name since currently index is used to match with electron later. We can fix this using reference pointer. ,
0037 )
0038 patAlgosToolsTask.add(process.patConversions)
0039 
0040 process.mvaTrigNoIPPAT = cms.EDProducer("ElectronPATIdMVAProducer",
0041                                     verbose = cms.untracked.bool(True),
0042                                     electronTag = cms.InputTag('selectedPatElectrons'),
0043                                     method = cms.string("BDT"),
0044                                     Rho = cms.InputTag("kt6PFJets", "rho"),
0045                                     mvaWeightFile = cms.vstring(
0046     "EgammaAnalysis/ElectronTools/data/Electrons_BDTG_TrigNoIPV0_2012_Cat1.weights.xml",
0047     "EgammaAnalysis/ElectronTools/data/Electrons_BDTG_TrigNoIPV0_2012_Cat2.weights.xml",
0048     "EgammaAnalysis/ElectronTools/data/Electrons_BDTG_TrigNoIPV0_2012_Cat3.weights.xml",
0049     "EgammaAnalysis/ElectronTools/data/Electrons_BDTG_TrigNoIPV0_2012_Cat4.weights.xml",
0050     "EgammaAnalysis/ElectronTools/data/Electrons_BDTG_TrigNoIPV0_2012_Cat5.weights.xml",
0051     "EgammaAnalysis/ElectronTools/data/Electrons_BDTG_TrigNoIPV0_2012_Cat6.weights.xml",
0052     ),
0053                                     Trig = cms.bool(True),
0054                                     NoIP = cms.bool(True),
0055                                     )
0056 patAlgosToolsTask.add(process.mvaTrigNoIPPAT)
0057 
0058 process.out.outputCommands.append( 'keep *_patConversions_*_*' )
0059 process.out.outputCommands.append( 'keep *_mvaTrigNoIPPAT_*_*' )
0060 
0061 ## ------------------------------------------------------
0062 #  In addition you usually want to change the following
0063 #  parameters:
0064 ## ------------------------------------------------------
0065 #
0066 #process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgradePLS1')
0067 #                                         ##
0068 #from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpGENSIMRECO
0069 #process.source.fileNames = filesRelValTTbarPileUpGENSIMRECO # currently not available at CERN
0070 from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValProdTTbarAODSIM
0071 process.source.fileNames = filesRelValProdTTbarAODSIM
0072 #                                         ##
0073 process.maxEvents.input = 100
0074 #                                         ##
0075 #   process.out.outputCommands = [ ... ]  ##  (e.g. taken from PhysicsTools/PatAlgos/python/patEventContent_cff.py)
0076 #                                         ##
0077 process.out.fileName = 'patToPat_electronId.root'
0078 #                                         ##
0079 #   process.options.wantSummary = True    ##  (to suppress the long output at the end of the job)