CMS 3D CMS Logo

reducedEgamma_tools.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 def calibrateReducedEgamma(process):
4  process.load("RecoEgamma.EgammaTools.calibratedEgammas_cff")
5  process.calibratedPhotons.produceCalibratedObjs = False
6  process.calibratedElectrons.produceCalibratedObjs = False
7  process.slimmingTask.add(process.calibratedPhotons)
8  process.slimmingTask.add(process.calibratedElectrons)
9  process.reducedEgamma.applyPhotonCalibOnData = False
10  process.reducedEgamma.applyPhotonCalibOnMC = False
11  process.reducedEgamma.applyGsfElectronCalibOnData = False
12  process.reducedEgamma.applyGsfElectronCalibOnMC = False
13  process.reducedEgamma.photonCalibEnergySource = cms.InputTag("calibratedPhotons","ecalEnergyPostCorr")
14  process.reducedEgamma.photonCalibEnergyErrSource = cms.InputTag("calibratedPhotons","ecalEnergyErrPostCorr")
15  process.reducedEgamma.gsfElectronCalibEnergySource = cms.InputTag("calibratedElectrons","ecalTrkEnergyPostCorr")
16  process.reducedEgamma.gsfElectronCalibEnergyErrSource = cms.InputTag("calibratedElectrons","ecalTrkEnergyErrPostCorr")
17 
18  process.reducedEgamma.gsfElectronCalibEcalEnergySource = cms.InputTag("calibratedElectrons","ecalEnergyPostCorr")
19  process.reducedEgamma.gsfElectronCalibEcalEnergyErrSource = cms.InputTag("calibratedElectrons","ecalEnergyErrPostCorr")
20  from RecoEgamma.EgammaTools.calibratedEgammas_cff import prefixName
21  import RecoEgamma.EgammaTools.calibratedElectronProducerTRecoGsfElectron_cfi
22  for valueMapName in RecoEgamma.EgammaTools.calibratedElectronProducerTRecoGsfElectron_cfi.calibratedElectronProducerTRecoGsfElectron.valueMapsStored:
23  process.reducedEgamma.gsfElectronFloatValueMapSources.append(cms.InputTag("calibratedElectrons",valueMapName))
24  process.reducedEgamma.gsfElectronFloatValueMapOutput.append(prefixName("calibEle",valueMapName))
25  import RecoEgamma.EgammaTools.calibratedPhotonProducerTRecoPhoton_cfi
26  for valueMapName in RecoEgamma.EgammaTools.calibratedPhotonProducerTRecoPhoton_cfi.calibratedPhotonProducerTRecoPhoton.valueMapsStored:
27  process.reducedEgamma.photonFloatValueMapSources.append(cms.InputTag("calibratedPhotons",valueMapName))
28  process.reducedEgamma.photonFloatValueMapOutput.append(prefixName("calibPho",valueMapName))
29 
def calibrateReducedEgamma(process)
def prefixName(prefix, name)