CMS 3D CMS Logo

reducedEgamma_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 reducedEgamma = cms.EDProducer("ReducedEGProducer",
4  keepPhotons = cms.string("hadTowOverEm()<0.15 && pt>10 && (pt>14 || chargedHadronIso()<10)"), #keep in output
5  slimRelinkPhotons = cms.string("hadTowOverEm()<0.15 && pt>10 && (pt>14 || chargedHadronIso()<10)"), #keep only slimmed SuperCluster plus seed cluster
6  relinkPhotons = cms.string("(r9()>0.8 || chargedHadronIso()<20 || chargedHadronIso()<0.3*pt())"), #keep all associated clusters/rechits/conversions
7  keepOOTPhotons = cms.string("pt>10"), #keep in output
8  slimRelinkOOTPhotons = cms.string("pt>10"), #keep only slimmed SuperCluster plus seed cluster
9  relinkOOTPhotons = cms.string("(r9()>0.8)"), #keep all associated clusters/rechits/conversions
10  keepGsfElectrons = cms.string(""), #keep in output
11  slimRelinkGsfElectrons = cms.string(""), #keep only slimmed SuperCluster plus seed cluster
12  relinkGsfElectrons = cms.string("pt>5"), #keep all associated clusters/rechits/conversions
13  photons = cms.InputTag("gedPhotons"),
14  ootPhotons = cms.InputTag("ootPhotons"),
15  gsfElectrons = cms.InputTag("gedGsfElectrons"),
16  conversions = cms.InputTag("allConversions"),
17  gsfTracks = cms.InputTag("electronGsfTracks"),
18  singleConversions = cms.InputTag("particleFlowEGamma"),
19  barrelEcalHits = cms.InputTag("reducedEcalRecHitsEB"),
20  endcapEcalHits = cms.InputTag("reducedEcalRecHitsEE"),
21  preshowerEcalHits = cms.InputTag("reducedEcalRecHitsES"),
22  photonsPFValMap = cms.InputTag("particleBasedIsolation","gedPhotons"),
23  gsfElectronsPFValMap = cms.InputTag("particleBasedIsolation","gedGsfElectrons"),
24  photonIDSources = cms.VInputTag(),
25  photonIDOutput = cms.vstring(),
26  gsfElectronIDSources = cms.VInputTag(),
27  gsfElectronIDOutput = cms.vstring(),
28  photonFloatValueMapSources = cms.VInputTag(),
29  photonFloatValueMapOutput = cms.vstring(),
30  ootPhotonFloatValueMapSources = cms.VInputTag(),
31  ootPhotonFloatValueMapOutput = cms.vstring(),
32  gsfElectronFloatValueMapSources = cms.VInputTag(),
33  gsfElectronFloatValueMapOutput = cms.vstring(),
34  applyPhotonCalibOnData = cms.bool(False),
35  applyPhotonCalibOnMC = cms.bool(False),
36  applyGsfElectronCalibOnData = cms.bool(False),
37  applyGsfElectronCalibOnMC = cms.bool(False),
38  photonCalibEnergySource = cms.InputTag(""),
39  photonCalibEnergyErrSource = cms.InputTag(""),
40  gsfElectronCalibEnergySource = cms.InputTag(""),
41  gsfElectronCalibEnergyErrSource = cms.InputTag(""),
42  gsfElectronCalibEcalEnergySource = cms.InputTag(""),
43  gsfElectronCalibEcalEnergyErrSource = cms.InputTag("")
44 )
45 
46 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
47 phase2_common.toModify(reducedEgamma,
48  preshowerEcalHits = cms.InputTag(""),
49 )
50 
51 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
52 run2_miniAOD_80XLegacy.toModify(
53  reducedEgamma,
54  photonFloatValueMapSources = cms.VInputTag(
55  cms.InputTag("photonEcalPFClusterIsolationProducer"),
56  cms.InputTag("photonHcalPFClusterIsolationProducer"),
57  ),
58  photonFloatValueMapOutput = cms.vstring(
59  "phoEcalPFClusIso",
60  "phoHcalPFClusIso",
61  ),
62  ootPhotonFloatValueMapSources = cms.VInputTag(
63  cms.InputTag("ootPhotonEcalPFClusterIsolationProducer"),
64  ),
65  ootPhotonFloatValueMapOutput = cms.vstring(
66  "ootPhoEcalPFClusIso",
67  ),
68  gsfElectronFloatValueMapSources = cms.VInputTag(
69  cms.InputTag("electronEcalPFClusterIsolationProducer"),
70  cms.InputTag("electronHcalPFClusterIsolationProducer"),
71  ),
72  gsfElectronFloatValueMapOutput = cms.vstring(
73  "eleEcalPFClusIso",
74  "eleHcalPFClusIso",
75  )
76  )
77 
78 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
79 run2_miniAOD_94XFall17.toModify(
80  reducedEgamma,
81  photonFloatValueMapSources = cms.VInputTag(
82  cms.InputTag("photonEcalPFClusterIsolationProducer"),
83  cms.InputTag("photonHcalPFClusterIsolationProducer"),
84  ),
85  photonFloatValueMapOutput = cms.vstring(
86  "phoEcalPFClusIso",
87  "phoHcalPFClusIso",
88  ),
89  ootPhotonFloatValueMapSources = cms.VInputTag(
90  cms.InputTag("ootPhotonEcalPFClusterIsolationProducer"),
91  cms.InputTag("ootPhotonHcalPFClusterIsolationProducer"),
92  ),
93  ootPhotonFloatValueMapOutput = cms.vstring(
94  "ootPhoEcalPFClusIso",
95  "ootPhoHcalPFClusIso",
96  ),
97  gsfElectronFloatValueMapSources = cms.VInputTag(
98  cms.InputTag("electronEcalPFClusterIsolationProducer"),
99  cms.InputTag("electronHcalPFClusterIsolationProducer"),
100  ),
101  gsfElectronFloatValueMapOutput = cms.vstring(
102  "eleEcalPFClusIso",
103  "eleHcalPFClusIso",
104  )
105  )
106 
107 from RecoEgamma.EgammaPhotonProducers.reducedEgamma_tools import calibrateReducedEgamma
108 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
109 modifyReducedEGammaRun2MiniAOD9XFall17_ = run2_miniAOD_94XFall17.makeProcessModifier(calibrateReducedEgamma)