CMS 3D CMS Logo

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