CMS 3D CMS Logo

reducedEgamma_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 reducedEgamma = cms.EDProducer("ReducedEGProducer",
7  keepPhotons = cms.string("hadTowOverEm()<0.15 && pt>10 && (pt>14 || chargedHadronIso()<10)"), #keep in output
8  slimRelinkPhotons = cms.string("hadTowOverEm()<0.15 && pt>10 && (pt>14 || chargedHadronIso()<10)"), #keep only slimmed SuperCluster plus seed cluster
9  relinkPhotons = cms.string("(r9()>0.8 || chargedHadronIso()<20 || chargedHadronIso()<0.3*pt())"), #keep all associated clusters/rechits/conversions
10  keepOOTPhotons = cms.string("pt>10"), #keep in output
11  slimRelinkOOTPhotons = cms.string("pt>10"), #keep only slimmed SuperCluster plus seed cluster
12  relinkOOTPhotons = cms.string("(r9()>0.8)"), #keep all associated clusters/rechits/conversions
13  keepGsfElectrons = cms.string(""), #keep in output
14  slimRelinkGsfElectrons = cms.string(""), #keep only slimmed SuperCluster plus seed cluster
15  relinkGsfElectrons = cms.string("pt>5"), #keep all associated clusters/rechits/conversions
16  photons = cms.InputTag("gedPhotons"),
17  ootPhotons = cms.InputTag("ootPhotons"),
18  gsfElectrons = cms.InputTag("gedGsfElectrons"),
19  conversions = cms.InputTag("allConversions"),
20  gsfTracks = cms.InputTag("electronGsfTracks"),
21  singleConversions = cms.InputTag("particleFlowEGamma"),
22  barrelEcalHits = cms.InputTag("reducedEcalRecHitsEB"),
23  endcapEcalHits = cms.InputTag("reducedEcalRecHitsEE"),
24  preshowerEcalHits = cms.InputTag("reducedEcalRecHitsES"),
25  hbheHits= cms.InputTag("reducedHcalRecHits","hbhereco"),
26  photonsPFValMap = cms.InputTag("particleBasedIsolation","gedPhotons"),
27  gsfElectronsPFValMap = cms.InputTag("particleBasedIsolation","gedGsfElectrons"),
28  photonIDSources = cms.VInputTag(),
29  photonIDOutput = cms.vstring(),
30  gsfElectronIDSources = cms.VInputTag(),
31  gsfElectronIDOutput = cms.vstring(),
32  photonFloatValueMapSources = cms.VInputTag(),
33  photonFloatValueMapOutput = cms.vstring(),
34  ootPhotonFloatValueMapSources = cms.VInputTag(),
35  ootPhotonFloatValueMapOutput = cms.vstring(),
36  hiPhotonIsolationMapInput = cms.InputTag(""),
37  hiPhotonIsolationMapOutput = cms.string(""),
38  gsfElectronFloatValueMapSources = cms.VInputTag(),
39  gsfElectronFloatValueMapOutput = cms.vstring(),
40  applyPhotonCalibOnData = cms.bool(False),
41  applyPhotonCalibOnMC = cms.bool(False),
42  applyGsfElectronCalibOnData = cms.bool(False),
43  applyGsfElectronCalibOnMC = cms.bool(False),
44  photonCalibEnergySource = cms.InputTag(""),
45  photonCalibEnergyErrSource = cms.InputTag(""),
46  gsfElectronCalibEnergySource = cms.InputTag(""),
47  gsfElectronCalibEnergyErrSource = cms.InputTag(""),
48  gsfElectronCalibEcalEnergySource = cms.InputTag(""),
49  gsfElectronCalibEcalEnergyErrSource = cms.InputTag(""),
50  hcalHitSel = interestingEgammaIsoHCALSel
51 )
52 
53 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
54 phase2_common.toModify(reducedEgamma,
55  preshowerEcalHits = "",
56 )
57 
58 from RecoEgamma.EgammaPhotonProducers.reducedEgamma_tools import calibrateReducedEgamma
59 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
60 modifyReducedEGammaRun2MiniAOD = (run2_miniAOD_UL).makeProcessModifier(calibrateReducedEgamma)
61 
62 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
63 
64 pp_on_AA.toModify(
65  reducedEgamma,
66  ootPhotons = "",
67  keepPhotons = "pt>15 && abs(eta)<2.5",
68  slimRelinkPhotons = "pt>15 && abs(eta)<2.5",
69  relinkPhotons = "pt>15 && abs(eta)<2.5",
70  hiPhotonIsolationMapInput = "photonIsolationHIProducerppGED",
71  hiPhotonIsolationMapOutput = "photonIsolationHIProducerppGED"
72 )
73 
74 from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
75 run2_miniAOD_pp_on_AA_103X.toModify(
76  reducedEgamma,
77  photonsPFValMap = "pfEGammaToCandidateRemapperCleaned:photons",
78  gsfElectronsPFValMap = "pfEGammaToCandidateRemapperCleaned:electrons"
79 )