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  keepPfSuperclusterPtMin = cms.double(5.),
8  keepPfSuperclusterAbsetaMax = cms.double(2.5),
9  relinkSuperclusterPtMin = cms.double(99999.), # no SC linking
10  keepPhotons = cms.string("hadTowOverEm()<0.15 && pt>10 && (pt>14 || chargedHadronIso()<10)"), #keep in output
11  slimRelinkPhotons = cms.string("hadTowOverEm()<0.15 && pt>10 && (pt>14 || chargedHadronIso()<10)"), #keep only slimmed SuperCluster plus seed cluster
12  relinkPhotons = cms.string("(r9()>0.8 || chargedHadronIso()<20 || chargedHadronIso()<0.3*pt())"), #keep all associated clusters/rechits/conversions
13  keepOOTPhotons = cms.string("pt>10"), #keep in output
14  slimRelinkOOTPhotons = cms.string("pt>10"), #keep only slimmed SuperCluster plus seed cluster
15  relinkOOTPhotons = cms.string("(r9()>0.8)"), #keep all associated clusters/rechits/conversions
16  keepGsfElectrons = cms.string(""), #keep in output
17  slimRelinkGsfElectrons = cms.string(""), #keep only slimmed SuperCluster plus seed cluster
18  relinkGsfElectrons = cms.string("pt>5"), #keep all associated clusters/rechits/conversions
19  pflowSuperclusters = cms.InputTag("superClusterMerger"),
20  photons = cms.InputTag("gedPhotons"),
21  ootPhotons = cms.InputTag("ootPhotons"),
22  gsfElectrons = cms.InputTag("gedGsfElectrons"),
23  conversions = cms.InputTag("allConversions"),
24  gsfTracks = cms.InputTag("electronGsfTracks"),
25  singleConversions = cms.InputTag("particleFlowEGamma"),
26  barrelEcalHits = cms.InputTag("reducedEcalRecHitsEB"),
27  endcapEcalHits = cms.InputTag("reducedEcalRecHitsEE"),
28  preshowerEcalHits = cms.InputTag("reducedEcalRecHitsES"),
29  hbheHits= cms.InputTag("reducedHcalRecHits","hbhereco"),
30  photonsPFValMap = cms.InputTag("particleBasedIsolation","gedPhotons"),
31  gsfElectronsPFValMap = cms.InputTag("particleBasedIsolation","gedGsfElectrons"),
32  photonIDSources = cms.VInputTag(),
33  photonIDOutput = cms.vstring(),
34  gsfElectronIDSources = cms.VInputTag(),
35  gsfElectronIDOutput = cms.vstring(),
36  photonFloatValueMapSources = cms.VInputTag(),
37  photonFloatValueMapOutput = cms.vstring(),
38  ootPhotonFloatValueMapSources = cms.VInputTag(),
39  ootPhotonFloatValueMapOutput = cms.vstring(),
40  hiPhotonIsolationMapInput = cms.InputTag(""),
41  hiPhotonIsolationMapOutput = cms.string(""),
42  gsfElectronFloatValueMapSources = cms.VInputTag(),
43  gsfElectronFloatValueMapOutput = cms.vstring(),
44  applyPhotonCalibOnData = cms.bool(False),
45  applyPhotonCalibOnMC = cms.bool(False),
46  applyGsfElectronCalibOnData = cms.bool(False),
47  applyGsfElectronCalibOnMC = cms.bool(False),
48  photonCalibEnergySource = cms.InputTag(""),
49  photonCalibEnergyErrSource = cms.InputTag(""),
50  gsfElectronCalibEnergySource = cms.InputTag(""),
51  gsfElectronCalibEnergyErrSource = cms.InputTag(""),
52  gsfElectronCalibEcalEnergySource = cms.InputTag(""),
53  gsfElectronCalibEcalEnergyErrSource = cms.InputTag(""),
54  hcalHitSel = interestingEgammaIsoHCALSel
55 )
56 
57 superClusterMerger = cms.EDProducer("EgammaSuperClusterMerger",
58  src = cms.VInputTag(
59  cms.InputTag("particleFlowSuperClusterECAL:particleFlowSuperClusterECALBarrel"),
60  cms.InputTag("particleFlowSuperClusterECAL:particleFlowSuperClusterECALEndcapWithPreshower"),
61  )
62 )
63 
64 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
65 phase2_common.toModify(reducedEgamma,
66  preshowerEcalHits = "",
67 )
68 
69 from RecoEgamma.EgammaPhotonProducers.reducedEgamma_tools import calibrateReducedEgamma
70 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
71 modifyReducedEGammaRun2MiniAOD = (run2_miniAOD_UL).makeProcessModifier(calibrateReducedEgamma)
72 
73 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
74 
75 pp_on_AA.toModify(
76  reducedEgamma,
77  ootPhotons = "",
78  keepPhotons = "pt>15 && abs(eta)<2.5",
79  slimRelinkPhotons = "pt>15 && abs(eta)<2.5",
80  relinkPhotons = "pt>15 && abs(eta)<2.5",
81  hiPhotonIsolationMapInput = "photonIsolationHIProducerppGED",
82  hiPhotonIsolationMapOutput = "photonIsolationHIProducerppGED"
83 )
84 
85 from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
86 run2_miniAOD_pp_on_AA_103X.toModify(
87  reducedEgamma,
88  photonsPFValMap = "pfEGammaToCandidateRemapperCleaned:photons",
89  gsfElectronsPFValMap = "pfEGammaToCandidateRemapperCleaned:electrons"
90 )
91 
92 from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
93 egamma_lowPt_exclusive.toModify(reducedEgamma, keepPfSuperclusterPtMin = 1.0, keepPhotons = "", slimRelinkPhotons = "", relinkPhotons = "", relinkGsfElectrons = "")