CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
photons_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
7 from RecoEgamma.EgammaIsolationAlgos.egammaHBHERecHitThreshold_cff import egammaHBHERecHit
8 
9 from RecoEgamma.EgammaIsolationAlgos.egammaEcalPFClusterIsolationProducerRecoPhoton_cfi import egammaEcalPFClusterIsolationProducerRecoPhoton
10 from RecoEgamma.EgammaIsolationAlgos.egammaHcalPFClusterIsolationProducerRecoPhoton_cfi import egammaHcalPFClusterIsolationProducerRecoPhoton
11 
12 #
13 # producer for photons
14 #
15 photons = cms.EDProducer("GEDPhotonProducer",
16  photonProducer = cms.InputTag("photonCore"),
17  reconstructionStep = cms.string("tmp"),
18  outputPhotonCollection = cms.string(""),
19  pfEgammaCandidates = cms.InputTag(""),
20  valueMapPhotons = cms.string(""),
21  # photonCollection = cms.string(''),
22  regressionWeightsFromDB = cms.bool(True),
23  energyRegressionWeightsFileLocation = cms.string('/afs/cern.ch/user/b/bendavid/cmspublic/regweights/gbrph.root'),
24  energyRegressionWeightsDBLocation = cms.string('wgbrph'),
25  superClusterEnergyCorrFunction = cms.string("EcalClusterEnergyCorrection"),
26  superClusterEnergyErrorFunction = cms.string("EcalClusterEnergyUncertainty"),
27  superClusterCrackEnergyCorrFunction = cms.string("EcalClusterCrackCorrection"),
28  photonEcalEnergyCorrFunction = cms.string("EcalClusterEnergyCorrectionObjectSpecific"),
29  #candidateP4type = cms.string("fromRegression"),
30  candidateP4type = cms.string("fromEcalEnergy"),
31  isolationSumsCalculatorSet = cms.PSet(isolationSumsCalculator),
32  mipVariableSet = cms.PSet(mipVariable),
33  usePrimaryVertex = cms.bool(True),
34  primaryVertexProducer = cms.InputTag('offlinePrimaryVerticesWithBS'),
35  posCalc_t0_endcPresh = cms.double(3.6),
36  posCalc_logweight = cms.bool(True),
37  posCalc_w0 = cms.double(4.2),
38  hbheInstance = cms.string(''),
39  posCalc_t0_endc = cms.double(6.3),
40  barrelEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
41  hbheModule = cms.string('hbhereco'),
42  endcapEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
43  preshowerHits = cms.InputTag("ecalPreshowerRecHit","EcalRecHitsES"),
44  runMIPTagger = cms.bool(True),
45  highEt = cms.double(100.),
46  minR9Barrel = cms.double(0.94),
47  minR9Endcap = cms.double(0.95),
48  multThresEB = cms.double(1.00),
49  multThresEE = cms.double(1.25),
50  hOverEConeSize = cms.double(0.15),
51  hbheRecHits = egammaHBHERecHit.hbheRecHits,
52  recHitEThresholdHB = egammaHBHERecHit.recHitEThresholdHB,
53  recHitEThresholdHE = egammaHBHERecHit.recHitEThresholdHE,
54  maxHcalRecHitSeverity = egammaHBHERecHit.maxHcalRecHitSeverity,
55  hcalRun2EffDepth = cms.bool(False),
56  posCalc_x0 = cms.double(0.89),
57  posCalc_t0_barl = cms.double(7.7),
58  minSCEtBarrel = cms.double(10.0),
59  minSCEtEndcap = cms.double(10.0),
60  maxHoverEBarrel = cms.double(0.5),
61  maxHoverEEndcap = cms.double(0.5),
62  ecalRecHitSumEtOffsetBarrel = cms.double(999999999),
63  ecalRecHitSumEtSlopeBarrel = cms.double(0.),
64  ecalRecHitSumEtOffsetEndcap = cms.double(999999999),
65  ecalRecHitSumEtSlopeEndcap = cms.double(0.),
66  hcalRecHitSumEtOffsetBarrel = cms.double(999999999),
67  hcalRecHitSumEtSlopeBarrel = cms.double(0.),
68  hcalRecHitSumEtOffsetEndcap = cms.double(999999999),
69  hcalRecHitSumEtSlopeEndcap = cms.double(0.),
70  nTrackSolidConeBarrel =cms.double(999999999),
71  nTrackSolidConeEndcap =cms.double(999999999),
72  nTrackHollowConeBarrel =cms.double(999999999),
73  nTrackHollowConeEndcap =cms.double(999999999),
74  trackPtSumSolidConeBarrel =cms.double(999999999),
75  trackPtSumSolidConeEndcap =cms.double(999999999),
76  trackPtSumHollowConeBarrel =cms.double(999999999),
77  trackPtSumHollowConeEndcap =cms.double(999999999),
78  sigmaIetaIetaCutBarrel=cms.double(999999999),
79  sigmaIetaIetaCutEndcap=cms.double(999999999),
80  posCalcParameters = cms.PSet( T0_barl = cms.double(7.4),
81  T0_endc = cms.double(6.3),
82  T0_endcPresh = cms.double(3.6),
83  LogWeighted = cms.bool(True),
84  W0 = cms.double(4.2),
85  X0 = cms.double(0.89)
86  ),
87 
88  RecHitFlagToBeExcludedEB = cleanedHybridSuperClusters.RecHitFlagToBeExcluded,
89  RecHitSeverityToBeExcludedEB = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
90  RecHitFlagToBeExcludedEE = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded,
91  RecHitSeverityToBeExcludedEE = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
92  checkHcalStatus = cms.bool(True),
93  PhotonDNNPFid = cms.PSet(
94  enabled = cms.bool(False),
95  inputTensorName = cms.string("FirstLayer_input"),
96  outputTensorName = cms.string("sequential/FinalLayer/Sigmoid"),
97  modelsFiles = cms.vstring(
98  'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EB/EB_modelDNN.pb',
99  'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EE/EE_modelDNN.pb'),
100  scalersFiles = cms.vstring(
101  'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EB/EB_scaler.txt',
102  'RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/v1/EE/EE_scaler.txt'
103  ),
104  outputDim = cms.uint32(1),
105  useEBModelInGap = cms.bool(True)
106  ),
107  pfECALClusIsolCfg = cms.PSet(
108  pfClusterProducer = egammaEcalPFClusterIsolationProducerRecoPhoton.pfClusterProducer,
109  drMax = egammaEcalPFClusterIsolationProducerRecoPhoton.drMax,
110  drVetoBarrel = egammaEcalPFClusterIsolationProducerRecoPhoton.drVetoBarrel,
111  drVetoEndcap = egammaEcalPFClusterIsolationProducerRecoPhoton.drVetoEndcap,
112  etaStripBarrel = egammaEcalPFClusterIsolationProducerRecoPhoton.etaStripBarrel,
113  etaStripEndcap = egammaEcalPFClusterIsolationProducerRecoPhoton.etaStripEndcap,
114  energyBarrel = egammaEcalPFClusterIsolationProducerRecoPhoton.energyBarrel,
115  energyEndcap = egammaEcalPFClusterIsolationProducerRecoPhoton.energyEndcap
116  ),
117 
118  pfHCALClusIsolCfg = cms.PSet(
119 
120  pfClusterProducerHCAL = egammaHcalPFClusterIsolationProducerRecoPhoton.pfClusterProducerHCAL,
121  useHF = egammaHcalPFClusterIsolationProducerRecoPhoton.useHF,
122  pfClusterProducerHFEM = egammaHcalPFClusterIsolationProducerRecoPhoton.pfClusterProducerHFEM,
123  pfClusterProducerHFHAD = egammaHcalPFClusterIsolationProducerRecoPhoton.pfClusterProducerHFHAD,
124  drMax = egammaHcalPFClusterIsolationProducerRecoPhoton.drMax,
125  drVetoBarrel = egammaHcalPFClusterIsolationProducerRecoPhoton.drVetoBarrel,
126  drVetoEndcap = egammaHcalPFClusterIsolationProducerRecoPhoton.drVetoEndcap,
127  etaStripBarrel = egammaHcalPFClusterIsolationProducerRecoPhoton.etaStripBarrel,
128  etaStripEndcap = egammaHcalPFClusterIsolationProducerRecoPhoton.etaStripEndcap,
129  energyBarrel = egammaHcalPFClusterIsolationProducerRecoPhoton.energyBarrel,
130  energyEndcap = egammaHcalPFClusterIsolationProducerRecoPhoton.energyEndcap,
131  useEt = egammaHcalPFClusterIsolationProducerRecoPhoton.useEt,
132 
133  )
134 
135 )
136 
137 photonsHGC = photons.clone(
138  photonProducer = 'photonCoreHGC'
139 )
140 
141 islandPhotons = cms.EDProducer("PhotonProducer",
142  photonCoreProducer = cms.InputTag("islandPhotonCore"),
143  regressionWeightsFromDB = cms.bool(True),
144  energyRegressionWeightsFileLocation = cms.string('/afs/cern.ch/user/b/bendavid/cmspublic/regweights/gbrph.root'),
145  energyRegressionWeightsDBLocation = cms.string('wgbrph'),
146  superClusterEnergyCorrFunction = cms.string("EcalClusterEnergyCorrection"),
147  superClusterEnergyErrorFunction = cms.string("EcalClusterEnergyUncertainty"),
148  superClusterCrackEnergyCorrFunction = cms.string("EcalClusterCrackCorrection"),
149  photonEcalEnergyCorrFunction = cms.string("EcalClusterEnergyCorrectionObjectSpecific"),
150  candidateP4type = cms.string("fromEcalEnergy"),
151  isolationSumsCalculatorSet = cms.PSet(isolationSumsCalculator),
152  mipVariableSet = cms.PSet(mipVariable),
153  usePrimaryVertex = cms.bool(True),
154  primaryVertexProducer = cms.InputTag('offlinePrimaryVerticesWithBS'),
155  posCalc_t0_endcPresh = cms.double(3.6),
156  posCalc_logweight = cms.bool(True),
157  posCalc_w0 = cms.double(4.2),
158  hbheInstance = cms.string(''),
159  posCalc_t0_endc = cms.double(6.3),
160  barrelEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
161  hbheModule = cms.string('hbhereco'),
162  endcapEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
163  runMIPTagger = cms.bool(True),
164  highEt = cms.double(100.),
165  minR9Barrel = cms.double(10.0),
166  minR9Endcap = cms.double(10.0),
167  hOverEConeSize = cms.double(0.15),
168  hbheRecHits = egammaHBHERecHit.hbheRecHits,
169  recHitEThresholdHB = egammaHBHERecHit.recHitEThresholdHB,
170  recHitEThresholdHE = egammaHBHERecHit.recHitEThresholdHE,
171  maxHcalRecHitSeverity = egammaHBHERecHit.maxHcalRecHitSeverity,
172  hcalRun2EffDepth = cms.bool(False),
173  posCalc_x0 = cms.double(0.89),
174  posCalc_t0_barl = cms.double(7.7),
175  minSCEtBarrel = cms.double(5.0),
176  minSCEtEndcap = cms.double(15.0),
177  maxHoverEBarrel = cms.double(0.99),
178  maxHoverEEndcap = cms.double(0.5),
179  ecalRecHitSumEtOffsetBarrel = cms.double(999999999),
180  ecalRecHitSumEtSlopeBarrel = cms.double(0.),
181  ecalRecHitSumEtOffsetEndcap = cms.double(999999999),
182  ecalRecHitSumEtSlopeEndcap = cms.double(0.),
183  hcalRecHitSumEtOffsetBarrel = cms.double(999999999),
184  hcalRecHitSumEtSlopeBarrel = cms.double(0.),
185  hcalRecHitSumEtOffsetEndcap = cms.double(999999999),
186  hcalRecHitSumEtSlopeEndcap = cms.double(0.),
187  nTrackSolidConeBarrel =cms.double(999999999),
188  nTrackSolidConeEndcap =cms.double(999999999),
189  nTrackHollowConeBarrel =cms.double(999999999),
190  nTrackHollowConeEndcap =cms.double(999999999),
191  trackPtSumSolidConeBarrel =cms.double(999999999),
192  trackPtSumSolidConeEndcap =cms.double(999999999),
193  trackPtSumHollowConeBarrel =cms.double(999999999),
194  trackPtSumHollowConeEndcap =cms.double(999999999),
195  sigmaIetaIetaCutBarrel=cms.double(999999999),
196  sigmaIetaIetaCutEndcap=cms.double(999999999),
197  posCalcParameters = cms.PSet( T0_barl = cms.double(7.4),
198  T0_endc = cms.double(6.3),
199  T0_endcPresh = cms.double(3.6),
200  LogWeighted = cms.bool(True),
201  W0 = cms.double(4.2),
202  X0 = cms.double(0.89)
203  ),
204 
205  RecHitFlagToBeExcludedEB = cleanedHybridSuperClusters.RecHitFlagToBeExcluded,
206  RecHitSeverityToBeExcludedEB = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
207  RecHitFlagToBeExcludedEE = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded,
208  RecHitSeverityToBeExcludedEE = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
209 )
210 
211 from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
212 egamma_lowPt_exclusive.toModify(photons,
213  minSCEtBarrel = 1.0, #default 10
214  minSCEtEndcap = 1.0) #default 10