Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:59:17

0001 ## import skeleton process
0002 from PhysicsTools.PatAlgos.patTemplate_cfg import *
0003 
0004 
0005 ## ------------------------------------------------------
0006 #  NOTE: you can use a bunch of core tools of PAT to
0007 #  taylor your PAT configuration; for a few examples
0008 #  uncomment the lines below
0009 ## ------------------------------------------------------
0010 from PhysicsTools.PatAlgos.tools.coreTools import *
0011 
0012 ## remove MC matching from the default sequence
0013 # removeMCMatching(process, ['Muons'])
0014 # runOnData(process)
0015 
0016 ## remove certain objects from the default sequence
0017 # removeAllPATObjectsBut(process, ['Muons'])
0018 # removeSpecificPATObjects(process, ['Electrons', 'Muons', 'Taus'])
0019 
0020 process.load('EgammaAnalysis.ElectronTools.electronIdMVAProducer_cfi')
0021 process.mvaID = cms.Sequence(  process.mvaTrigV0 + process.mvaTrigNoIPV0 + process.mvaNonTrigV0 )
0022 
0023 #Electron ID
0024 process.patElectrons.electronIDSources = cms.PSet(
0025     #MVA
0026     mvaTrigV0 = cms.InputTag("mvaTrigV0"),
0027     mvaNonTrigV0 = cms.InputTag("mvaNonTrigV0"),
0028     mvaTrigNoIPV0 = cms.InputTag("mvaTrigNoIPV0"),
0029     )
0030 
0031 #add pat conversions
0032 process.patConversions = cms.EDProducer("PATConversionProducer",
0033                                         # input collection
0034                                         #electronSource = cms.InputTag("gsfElectrons"),
0035                                         electronSource = cms.InputTag("cleanPatElectrons")  
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 
0039 ## let it run
0040 process.p = cms.Path(
0041     process.mvaID + 
0042     process.patDefaultSequence+
0043     process.patConversions
0044     )
0045 
0046 process.out.outputCommands +=[
0047    # 'keep *_patConversions*_*_*'
0048     ]
0049 ## ------------------------------------------------------
0050 #  In addition you usually want to change the following
0051 #  parameters:
0052 ## ------------------------------------------------------
0053 #
0054 #   process.GlobalTag.globaltag =  ...    ##  (according to https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions)
0055 #                                         ##
0056 process.source.fileNames = [          ##
0057     '/store/mc/Summer12_DR53X/DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/AODSIM/PU_S10_START53_V7A-v1/0001/FE4B9392-D8D3-E111-8789-0025B3E05D8C.root'
0058     ]                                     ##  (e.g. 'file:AOD.root')
0059 #                                         ##
0060 #   process.maxEvents.input = ...         ##  (e.g. -1 to run on all events)
0061 #                                         ##
0062 #   process.out.outputCommands = [ ... ]  ##  (e.g. taken from PhysicsTools/PatAlgos/python/patEventContent_cff.py)
0063 #                                         ##
0064 #   process.out.fileName = ...            ##  (e.g. 'myTuple.root')
0065 #                                         ##
0066 #   process.options.wantSummary = True    ##  (to suppress the long output at the end of the job)