Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:00

0001 
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 process = cms.Process("PFISO")
0005 
0006 
0007 process.maxEvents = cms.untracked.PSet(
0008     input = cms.untracked.int32(-1)
0009 )
0010 
0011 process.source = cms.Source("PoolSource",
0012     fileNames = cms.untracked.vstring('/store/relval/CMSSW_7_1_0_pre1/RelValProdTTbar/GEN-SIM-RECO/START70_V5-v1/00000/14842A6B-2086-E311-B5CB-02163E00E8DA.root'))
0013 
0014 
0015 # Tae Jeong, could you please remove these from the PF2PAT sequence?
0016 # they are not used, and are creating problems in such kinds of manipulations:
0017 # process.pfElectronIsolationSequence.remove( process.pfElectronIsoDepositsSequence )
0018 # process.pfElectronIsolationSequence.remove( process.pfElectronIsolationFromDepositsSequence )
0019 
0020 # process.load("CommonTools.ParticleFlow.PFBRECO_cff")
0021 
0022 from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso, setupPFPhotonIso
0023 process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons')
0024 process.muIsoSequence = setupPFMuonIso(process, 'muons')
0025 process.phoIsoSequence = setupPFPhotonIso(process, 'photons')
0026 
0027 process.TFileService = cms.Service("TFileService", fileName = cms.string("histo.root") )
0028 
0029 process.pfIsoReader = cms.EDAnalyzer("PFIsoReaderDemo",
0030                                      Electrons = cms.InputTag('gsfElectrons'),
0031                                      Photons = cms.InputTag('photons'),
0032                                      PFCandidateMap = cms.InputTag('particleFlow:electrons'),
0033                                      PrintElectrons = cms.bool(True),
0034                                      PrintPhotons = cms.bool(True),
0035                                      IsoDepElectron = cms.VInputTag(cms.InputTag('elPFIsoDepositChargedPFIso'),
0036                                                                     cms.InputTag('elPFIsoDepositGammaPFIso'),
0037                                                                     cms.InputTag('elPFIsoDepositNeutralPFIso')),
0038                                      IsoValElectronPF = cms.VInputTag(cms.InputTag('elPFIsoValueCharged03PFIdPFIso'),
0039                                                                      cms.InputTag('elPFIsoValueGamma03PFIdPFIso'),
0040                                                                      cms.InputTag('elPFIsoValueNeutral03PFIdPFIso')),
0041                                      IsoDepPhoton = cms.VInputTag(cms.InputTag('phPFIsoDepositChargedPFIso'),
0042                                                                   cms.InputTag('phPFIsoDepositGammaPFIso'),
0043                                                                   cms.InputTag('phPFIsoDepositNeutralPFIso')),
0044                                      IsoValPhoton = cms.VInputTag(cms.InputTag('phPFIsoValueCharged03PFIdPFIso'),
0045                                                                   cms.InputTag('phPFIsoValueGamma03PFIdPFIso'),
0046                                                                   cms.InputTag('phPFIsoValueNeutral03PFIdPFIso'))
0047 
0048 )
0049 
0050 process.p = cms.Path(
0051     # process.pfNoPileUpSequence +
0052     process.pfParticleSelectionSequence +
0053     process.eleIsoSequence +
0054     process.muIsoSequence+
0055     process.phoIsoSequence+
0056     process.pfIsoReader
0057     )
0058 
0059 
0060 # output ------------------------------------------------------------
0061 
0062 process.out = cms.OutputModule("PoolOutputModule",
0063                                outputCommands = cms.untracked.vstring('keep *'),
0064                                fileName = cms.untracked.string('pfIsolation.root')
0065 )
0066 
0067 process.outpath = cms.EndPath(
0068     process.out
0069     )
0070 
0071 
0072 # other stuff
0073 
0074 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0075 process.MessageLogger.cerr.FwkReport.reportEvery = 10
0076