CMS 3D CMS Logo

PhotonProducer.cc
Go to the documentation of this file.
1 
40 
41 #include <vector>
42 
43 // PhotonProducer inherits from EDProducer, so it can be a module:
45 public:
47 
48  void produce(edm::Event& evt, const edm::EventSetup& es) override;
49 
50 private:
52  edm::EventSetup const& es,
53  const edm::Handle<reco::PhotonCoreCollection>& photonCoreHandle,
54  const CaloTopology* topology,
55  const EcalRecHitCollection* ecalBarrelHits,
56  const EcalRecHitCollection* ecalEndcapHits,
57  ElectronHcalHelper const& hcalHelperCone,
58  ElectronHcalHelper const& hcalHelperBc,
59  reco::VertexCollection& pvVertices,
60  reco::PhotonCollection& outputCollection,
61  int& iSC,
62  const EcalSeverityLevelAlgo* sevLv);
63 
64  // std::string PhotonCoreCollection_;
71 
72  //AA
73  //Flags and severities to be excluded from calculations
74 
75  std::vector<int> flagsexclEB_;
76  std::vector<int> flagsexclEE_;
77  std::vector<int> severitiesexclEB_;
78  std::vector<int> severitiesexclEE_;
79 
81  double highEt_;
82  double minR9Barrel_;
83  double minR9Endcap_;
85 
87 
89 
91 
94 
95  //MIP
97 
98  std::vector<double> preselCutValuesBarrel_;
99  std::vector<double> preselCutValuesEndcap_;
100 
103 
104  // additional configuration and helpers
105  std::unique_ptr<ElectronHcalHelper> hcalHelperCone_;
106  std::unique_ptr<ElectronHcalHelper> hcalHelperBc_;
108 };
109 
112 
113 PhotonProducer::PhotonProducer(const edm::ParameterSet& config) : photonEnergyCorrector_(config, consumesCollector()) {
114  // use configuration file to setup input/output collection names
115 
116  photonCoreProducer_ = consumes<reco::PhotonCoreCollection>(config.getParameter<edm::InputTag>("photonCoreProducer"));
117  barrelEcalHits_ = consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("barrelEcalHits"));
118  endcapEcalHits_ = consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("endcapEcalHits"));
119  vertexProducer_ = consumes<reco::VertexCollection>(config.getParameter<edm::InputTag>("primaryVertexProducer"));
120  hbheRecHits_ = consumes<HBHERecHitCollection>(config.getParameter<edm::InputTag>("hbheRecHits"));
121  hOverEConeSize_ = config.getParameter<double>("hOverEConeSize");
122  highEt_ = config.getParameter<double>("highEt");
123  // R9 value to decide converted/unconverted
124  minR9Barrel_ = config.getParameter<double>("minR9Barrel");
125  minR9Endcap_ = config.getParameter<double>("minR9Endcap");
126  usePrimaryVertex_ = config.getParameter<bool>("usePrimaryVertex");
127  runMIPTagger_ = config.getParameter<bool>("runMIPTagger");
128 
129  candidateP4type_ = config.getParameter<std::string>("candidateP4type");
130 
131  edm::ParameterSet posCalcParameters = config.getParameter<edm::ParameterSet>("posCalcParameters");
133 
134  //AA
135  //Flags and Severities to be excluded from photon calculations
136  const std::vector<std::string> flagnamesEB =
137  config.getParameter<std::vector<std::string>>("RecHitFlagToBeExcludedEB");
138 
139  const std::vector<std::string> flagnamesEE =
140  config.getParameter<std::vector<std::string>>("RecHitFlagToBeExcludedEE");
141 
142  flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
143 
144  flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
145 
146  const std::vector<std::string> severitynamesEB =
147  config.getParameter<std::vector<std::string>>("RecHitSeverityToBeExcludedEB");
148 
149  severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
150 
151  const std::vector<std::string> severitynamesEE =
152  config.getParameter<std::vector<std::string>>("RecHitSeverityToBeExcludedEE");
153 
154  severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
155 
156  ElectronHcalHelper::Configuration cfgCone, cfgBc;
158  if (cfgCone.hOverEConeSize > 0) {
159  cfgCone.onlyBehindCluster = false;
160  cfgCone.checkHcalStatus = false;
161 
162  cfgCone.hbheRecHits = hbheRecHits_;
163 
164  cfgCone.eThresHB = config.getParameter<EgammaHcalIsolation::arrayHB>("recHitEThresholdHB");
165  cfgCone.maxSeverityHB = config.getParameter<int>("maxHcalRecHitSeverity");
166  cfgCone.eThresHE = config.getParameter<EgammaHcalIsolation::arrayHE>("recHitEThresholdHE");
167  cfgCone.maxSeverityHE = cfgCone.maxSeverityHB;
168  }
169 
170  cfgBc.hOverEConeSize = 0.;
171  cfgBc.onlyBehindCluster = true;
172  cfgBc.checkHcalStatus = false;
173 
174  cfgBc.hbheRecHits = hbheRecHits_;
175 
176  cfgBc.eThresHB = config.getParameter<EgammaHcalIsolation::arrayHB>("recHitEThresholdHB");
177  cfgBc.maxSeverityHB = config.getParameter<int>("maxHcalRecHitSeverity");
178  cfgBc.eThresHE = config.getParameter<EgammaHcalIsolation::arrayHE>("recHitEThresholdHE");
179  cfgBc.maxSeverityHE = cfgBc.maxSeverityHB;
180 
181  hcalHelperCone_ = std::make_unique<ElectronHcalHelper>(cfgCone, consumesCollector());
182  hcalHelperBc_ = std::make_unique<ElectronHcalHelper>(cfgBc, consumesCollector());
183 
184  hcalRun2EffDepth_ = config.getParameter<bool>("hcalRun2EffDepth");
185 
186  //AA
187 
188  //
189 
190  // Parameters for the position calculation:
191  // std::map<std::string,double> providedParameters;
192  // providedParameters.insert(std::make_pair("LogWeighted",config.getParameter<bool>("posCalc_logweight")));
193  //providedParameters.insert(std::make_pair("T0_barl",config.getParameter<double>("posCalc_t0_barl")));
194  //providedParameters.insert(std::make_pair("T0_endc",config.getParameter<double>("posCalc_t0_endc")));
195  //providedParameters.insert(std::make_pair("T0_endcPresh",config.getParameter<double>("posCalc_t0_endcPresh")));
196  //providedParameters.insert(std::make_pair("W0",config.getParameter<double>("posCalc_w0")));
197  //providedParameters.insert(std::make_pair("X0",config.getParameter<double>("posCalc_x0")));
198  //posCalculator_ = PositionCalc(providedParameters);
199  // cut values for pre-selection
200  preselCutValuesBarrel_.push_back(config.getParameter<double>("minSCEtBarrel"));
201  preselCutValuesBarrel_.push_back(config.getParameter<double>("maxHoverEBarrel"));
202  preselCutValuesBarrel_.push_back(config.getParameter<double>("ecalRecHitSumEtOffsetBarrel"));
203  preselCutValuesBarrel_.push_back(config.getParameter<double>("ecalRecHitSumEtSlopeBarrel"));
204  preselCutValuesBarrel_.push_back(config.getParameter<double>("hcalRecHitSumEtOffsetBarrel"));
205  preselCutValuesBarrel_.push_back(config.getParameter<double>("hcalRecHitSumEtSlopeBarrel"));
206  preselCutValuesBarrel_.push_back(config.getParameter<double>("nTrackSolidConeBarrel"));
207  preselCutValuesBarrel_.push_back(config.getParameter<double>("nTrackHollowConeBarrel"));
208  preselCutValuesBarrel_.push_back(config.getParameter<double>("trackPtSumSolidConeBarrel"));
209  preselCutValuesBarrel_.push_back(config.getParameter<double>("trackPtSumHollowConeBarrel"));
210  preselCutValuesBarrel_.push_back(config.getParameter<double>("sigmaIetaIetaCutBarrel"));
211  //
212  preselCutValuesEndcap_.push_back(config.getParameter<double>("minSCEtEndcap"));
213  preselCutValuesEndcap_.push_back(config.getParameter<double>("maxHoverEEndcap"));
214  preselCutValuesEndcap_.push_back(config.getParameter<double>("ecalRecHitSumEtOffsetEndcap"));
215  preselCutValuesEndcap_.push_back(config.getParameter<double>("ecalRecHitSumEtSlopeEndcap"));
216  preselCutValuesEndcap_.push_back(config.getParameter<double>("hcalRecHitSumEtOffsetEndcap"));
217  preselCutValuesEndcap_.push_back(config.getParameter<double>("hcalRecHitSumEtSlopeEndcap"));
218  preselCutValuesEndcap_.push_back(config.getParameter<double>("nTrackSolidConeEndcap"));
219  preselCutValuesEndcap_.push_back(config.getParameter<double>("nTrackHollowConeEndcap"));
220  preselCutValuesEndcap_.push_back(config.getParameter<double>("trackPtSumSolidConeEndcap"));
221  preselCutValuesEndcap_.push_back(config.getParameter<double>("trackPtSumHollowConeEndcap"));
222  preselCutValuesEndcap_.push_back(config.getParameter<double>("sigmaIetaIetaCutEndcap"));
223  //
224 
225  edm::ParameterSet isolationSumsCalculatorSet = config.getParameter<edm::ParameterSet>("isolationSumsCalculatorSet");
228 
229  edm::ParameterSet mipVariableSet = config.getParameter<edm::ParameterSet>("mipVariableSet");
230  photonMIPHaloTagger_.setup(mipVariableSet, consumesCollector());
231 
232  // Register the product
233  produces<reco::PhotonCollection>(PhotonCollection_);
234 }
235 
236 void PhotonProducer::produce(edm::Event& theEvent, const edm::EventSetup& theEventSetup) {
237  using namespace edm;
238  // nEvt_++;
239 
241  auto outputPhotonCollection_p = std::make_unique<reco::PhotonCollection>();
242 
243  // Get the PhotonCore collection
244  bool validPhotonCoreHandle = true;
245  Handle<reco::PhotonCoreCollection> photonCoreHandle;
246  theEvent.getByToken(photonCoreProducer_, photonCoreHandle);
247  if (!photonCoreHandle.isValid()) {
248  edm::LogError("PhotonProducer") << "Error! Can't get the photonCoreProducer";
249  validPhotonCoreHandle = false;
250  }
251 
252  // Get EcalRecHits
253  bool validEcalRecHits = true;
254  Handle<EcalRecHitCollection> barrelHitHandle;
256  theEvent.getByToken(barrelEcalHits_, barrelHitHandle);
257  if (!barrelHitHandle.isValid()) {
258  edm::LogError("PhotonProducer") << "Error! Can't get the barrelEcalHits";
259  validEcalRecHits = false;
260  }
261  if (validEcalRecHits)
262  barrelRecHits = *(barrelHitHandle.product());
263 
264  Handle<EcalRecHitCollection> endcapHitHandle;
265  theEvent.getByToken(endcapEcalHits_, endcapHitHandle);
267  if (!endcapHitHandle.isValid()) {
268  edm::LogError("PhotonProducer") << "Error! Can't get the endcapEcalHits";
269  validEcalRecHits = false;
270  }
271  if (validEcalRecHits)
272  endcapRecHits = *(endcapHitHandle.product());
273 
274  //AA
275  //Get the severity level object
277  theEventSetup.get<EcalSeverityLevelAlgoRcd>().get(sevLv);
278  //
279 
280  edm::ESHandle<CaloTopology> pTopology;
281  theEventSetup.get<CaloTopologyRecord>().get(pTopology);
282  const CaloTopology* topology = pTopology.product();
283 
284  // prepare access to hcal data
285  hcalHelperCone_->beginEvent(theEvent, theEventSetup);
286  hcalHelperBc_->beginEvent(theEvent, theEventSetup);
287 
288  // Get the primary event vertex
289  Handle<reco::VertexCollection> vertexHandle;
291  bool validVertex = true;
292  if (usePrimaryVertex_) {
293  theEvent.getByToken(vertexProducer_, vertexHandle);
294  if (!vertexHandle.isValid()) {
295  edm::LogWarning("PhotonProducer") << "Error! Can't get the product primary Vertex Collection "
296  << "\n";
297  validVertex = false;
298  }
299  if (validVertex)
300  vertexCollection = *(vertexHandle.product());
301  }
302 
303  int iSC = 0; // index in photon collection
304  // Loop over barrel and endcap SC collections and fill the photon collection
305  if (validPhotonCoreHandle)
306  fillPhotonCollection(theEvent,
307  theEventSetup,
308  photonCoreHandle,
309  topology,
310  &barrelRecHits,
311  &endcapRecHits,
313  *hcalHelperBc_,
316  iSC,
317  sevLv.product());
318 
319  // put the product in the event
320  edm::LogInfo("PhotonProducer") << " Put in the event " << iSC << " Photon Candidates \n";
321  outputPhotonCollection_p->assign(outputPhotonCollection.begin(), outputPhotonCollection.end());
322 
323  // go back to run2-like 2 effective depths if desired - depth 1 is the normal depth 1, depth 2 is the sum over the rest
324  if (hcalRun2EffDepth_) {
325  for (auto& pho : *outputPhotonCollection_p)
326  pho.hcalToRun2EffDepth();
327  }
328 
329  theEvent.put(std::move(outputPhotonCollection_p), PhotonCollection_);
330 }
331 
333  edm::EventSetup const& es,
334  const edm::Handle<reco::PhotonCoreCollection>& photonCoreHandle,
335  const CaloTopology* topology,
336  const EcalRecHitCollection* ecalBarrelHits,
337  const EcalRecHitCollection* ecalEndcapHits,
338  ElectronHcalHelper const& hcalHelperCone,
339  ElectronHcalHelper const& hcalHelperBc,
342  int& iSC,
343  const EcalSeverityLevelAlgo* sevLv) {
344  // get the geometry from the event setup:
345  edm::ESHandle<CaloGeometry> caloGeomHandle;
346  es.get<CaloGeometryRecord>().get(caloGeomHandle);
347 
348  const CaloGeometry* geometry = caloGeomHandle.product();
349  const CaloSubdetectorGeometry* subDetGeometry = nullptr;
350  const CaloSubdetectorGeometry* geometryES = caloGeomHandle->getSubdetectorGeometry(DetId::Ecal, EcalPreshower);
351  const EcalRecHitCollection* hits = nullptr;
352  std::vector<double> preselCutValues;
353  float minR9 = 0;
354 
356 
357  std::vector<int> flags_, severitiesexcl_;
358 
359  for (unsigned int lSC = 0; lSC < photonCoreHandle->size(); lSC++) {
360  reco::PhotonCoreRef coreRef(reco::PhotonCoreRef(photonCoreHandle, lSC));
361  reco::SuperClusterRef scRef = coreRef->superCluster();
362  iSC++;
363 
364  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
365  subDetGeometry = caloGeomHandle->getSubdetectorGeometry(DetId::Ecal, subdet);
366 
367  if (subdet == EcalBarrel) {
368  preselCutValues = preselCutValuesBarrel_;
370  hits = ecalBarrelHits;
371  flags_ = flagsexclEB_;
372  severitiesexcl_ = severitiesexclEB_;
373  } else if (subdet == EcalEndcap) {
374  preselCutValues = preselCutValuesEndcap_;
376  hits = ecalEndcapHits;
377  flags_ = flagsexclEE_;
378  severitiesexcl_ = severitiesexclEE_;
379  } else {
380  edm::LogWarning("") << "PhotonProducer: do not know if it is a barrel or endcap SuperCluster";
381  }
382  if (hits == nullptr)
383  continue;
384 
385  // SC energy preselection
386  if (scRef->energy() / cosh(scRef->eta()) <= preselCutValues[0])
387  continue;
388 
389  // recalculate position of seed BasicCluster taking shower depth for unconverted photon
390  math::XYZPoint unconvPos =
391  posCalculator_.Calculate_Location(scRef->seed()->hitsAndFractions(), hits, subDetGeometry, geometryES);
392 
393  float maxXtal = EcalClusterTools::eMax(*(scRef->seed()), &(*hits));
394  //AA
395  //Change these to consider severity level of hits
396  float e1x5 = EcalClusterTools::e1x5(*(scRef->seed()), &(*hits), &(*topology));
397  float e2x5 = EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology));
398  float e3x3 = EcalClusterTools::e3x3(*(scRef->seed()), &(*hits), &(*topology));
399  float e5x5 = EcalClusterTools::e5x5(*(scRef->seed()), &(*hits), &(*topology));
400  const auto& cov = EcalClusterTools::covariances(*(scRef->seed()), &(*hits), &(*topology), geometry);
401  const auto& locCov = EcalClusterTools::localCovariances(*(scRef->seed()), &(*hits), &(*topology));
402 
403  float sigmaEtaEta = sqrt(cov[0]);
404  float sigmaIetaIeta = sqrt(locCov[0]);
405  float r9 = e3x3 / (scRef->rawEnergy());
406 
407  float full5x5_maxXtal = noZS::EcalClusterTools::eMax(*(scRef->seed()), &(*hits));
408  //AA
409  //Change these to consider severity level of hits
410  float full5x5_e1x5 = noZS::EcalClusterTools::e1x5(*(scRef->seed()), &(*hits), &(*topology));
411  float full5x5_e2x5 = noZS::EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology));
412  float full5x5_e3x3 = noZS::EcalClusterTools::e3x3(*(scRef->seed()), &(*hits), &(*topology));
413  float full5x5_e5x5 = noZS::EcalClusterTools::e5x5(*(scRef->seed()), &(*hits), &(*topology));
414  const auto& full5x5_cov = noZS::EcalClusterTools::covariances(*(scRef->seed()), &(*hits), &(*topology), geometry);
415  const auto& full5x5_locCov = noZS::EcalClusterTools::localCovariances(*(scRef->seed()), &(*hits), &(*topology));
416 
417  float full5x5_sigmaEtaEta = sqrt(full5x5_cov[0]);
418  float full5x5_sigmaIetaIeta = sqrt(full5x5_locCov[0]);
419 
420  // compute position of ECAL shower
421  math::XYZPoint caloPosition;
422  if (r9 > minR9) {
423  caloPosition = unconvPos;
424  } else {
425  caloPosition = scRef->position();
426  }
427 
429  double photonEnergy = 1.;
430  math::XYZPoint vtx(0., 0., 0.);
431  if (!vertexCollection.empty())
432  vtx = vertexCollection.begin()->position();
433  // compute momentum vector of photon from primary vertex and cluster position
434  math::XYZVector direction = caloPosition - vtx;
435  math::XYZVector momentum = direction.unit();
436 
437  // Create dummy candidate with unit momentum and zero energy to allow setting of all variables. The energy is set for last.
438  math::XYZTLorentzVectorD p4(momentum.x(), momentum.y(), momentum.z(), photonEnergy);
439  reco::Photon newCandidate(p4, caloPosition, coreRef, vtx);
440 
441  // Calculate fiducial flags and isolation variable. Blocked are filled from the isolationCalculator
442  reco::Photon::FiducialFlags fiducialFlags;
443  reco::Photon::IsolationVariables isolVarR03, isolVarR04;
444  photonIsolationCalculator_.calculate(&newCandidate, evt, es, fiducialFlags, isolVarR04, isolVarR03);
445  newCandidate.setFiducialVolumeFlags(fiducialFlags);
446  newCandidate.setIsolationVariables(isolVarR04, isolVarR03);
447 
449  reco::Photon::ShowerShape showerShape;
450  showerShape.e1x5 = e1x5;
451  showerShape.e2x5 = e2x5;
452  showerShape.e3x3 = e3x3;
453  showerShape.e5x5 = e5x5;
454  showerShape.maxEnergyXtal = maxXtal;
455  showerShape.sigmaEtaEta = sigmaEtaEta;
456  showerShape.sigmaIetaIeta = sigmaIetaIeta;
457  for (uint id = 0; id < showerShape.hcalOverEcal.size(); ++id) {
458  showerShape.hcalOverEcal[id] = hcalHelperCone.hcalESum(*scRef, id + 1) / scRef->energy();
459  showerShape.hcalOverEcalBc[id] = hcalHelperBc.hcalESum(*scRef, id + 1) / scRef->energy();
460  }
461  showerShape.hcalTowersBehindClusters = hcalHelperBc.hcalTowersBehindClusters(*scRef);
462  showerShape.pre7DepthHcal = false;
463  newCandidate.setShowerShapeVariables(showerShape);
464 
466  reco::Photon::ShowerShape full5x5_showerShape;
467  full5x5_showerShape.e1x5 = full5x5_e1x5;
468  full5x5_showerShape.e2x5 = full5x5_e2x5;
469  full5x5_showerShape.e3x3 = full5x5_e3x3;
470  full5x5_showerShape.e5x5 = full5x5_e5x5;
471  full5x5_showerShape.maxEnergyXtal = full5x5_maxXtal;
472  full5x5_showerShape.sigmaEtaEta = full5x5_sigmaEtaEta;
473  full5x5_showerShape.sigmaIetaIeta = full5x5_sigmaIetaIeta;
474  for (uint id = 0; id < full5x5_showerShape.hcalOverEcal.size(); ++id) {
475  full5x5_showerShape.hcalOverEcal[id] = hcalHelperCone.hcalESum(*scRef, id + 1) / full5x5_e5x5;
476  full5x5_showerShape.hcalOverEcalBc[id] = hcalHelperBc.hcalESum(*scRef, id + 1) / full5x5_e5x5;
477  }
478  full5x5_showerShape.hcalTowersBehindClusters = hcalHelperBc.hcalTowersBehindClusters(*scRef);
479  full5x5_showerShape.pre7DepthHcal = false;
480  newCandidate.full5x5_setShowerShapeVariables(full5x5_showerShape);
481 
484  // Photon candidate takes by default (set in photons_cfi.py) a 4-momentum derived from the ecal photon-specific corrections.
485  photonEnergyCorrector_.calculate(evt, newCandidate, subdet, vertexCollection, es);
486  if (candidateP4type_ == "fromEcalEnergy") {
487  newCandidate.setP4(newCandidate.p4(reco::Photon::ecal_photons));
488  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
489  } else if (candidateP4type_ == "fromRegression") {
490  newCandidate.setP4(newCandidate.p4(reco::Photon::regression1));
491  newCandidate.setCandidateP4type(reco::Photon::regression1);
492  }
493 
494  // fill MIP Vairables for Halo: Block for MIP are filled from PhotonMIPHaloTagger
496  if (subdet == EcalBarrel && runMIPTagger_) {
497  photonMIPHaloTagger_.MIPcalculate(&newCandidate, evt, es, mipVar);
498  newCandidate.setMIPVariables(mipVar);
499  }
500 
502  bool isLooseEM = true;
503  if (newCandidate.pt() < highEt_) {
504  if (newCandidate.hadronicOverEm() >= preselCutValues[1])
505  isLooseEM = false;
506  if (newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2] + preselCutValues[3] * newCandidate.pt())
507  isLooseEM = false;
508  if (newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4] + preselCutValues[5] * newCandidate.pt())
509  isLooseEM = false;
510  if (newCandidate.nTrkSolidConeDR04() > int(preselCutValues[6]))
511  isLooseEM = false;
512  if (newCandidate.nTrkHollowConeDR04() > int(preselCutValues[7]))
513  isLooseEM = false;
514  if (newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8])
515  isLooseEM = false;
516  if (newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9])
517  isLooseEM = false;
518  if (newCandidate.sigmaIetaIeta() > preselCutValues[10])
519  isLooseEM = false;
520  }
521 
522  if (isLooseEM)
523  outputPhotonCollection.push_back(newCandidate);
524  }
525 }
EgHLTOffHistBins_cfi.e1x5
e1x5
Definition: EgHLTOffHistBins_cfi.py:22
ElectronHcalHelper::Configuration::hbheRecHits
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHits
Definition: ElectronHcalHelper.h:33
reco::Photon::ShowerShape::maxEnergyXtal
float maxEnergyXtal
Definition: Photon.h:145
ElectronHcalHelper::hcalTowersBehindClusters
auto hcalTowersBehindClusters(const reco::SuperCluster &sc) const
Definition: ElectronHcalHelper.h:45
PhotonIsolationCalculator.h
PhotonProducer::minR9Endcap_
double minR9Endcap_
Definition: PhotonProducer.cc:83
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalSeverityLevelAlgo
Definition: EcalSeverityLevelAlgo.h:33
electrons_cff.r9
r9
Definition: electrons_cff.py:360
PhotonMIPHaloTagger::setup
void setup(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Definition: PhotonMIPHaloTagger.cc:15
PhotonIsolationCalculator::setup
void setup(const edm::ParameterSet &conf, std::vector< int > const &flagsEB_, std::vector< int > const &flagsEE_, std::vector< int > const &severitiesEB_, std::vector< int > const &severitiesEE_, edm::ConsumesCollector &&iC)
Definition: PhotonIsolationCalculator.cc:29
Handle.h
PositionCalc.h
PhotonProducer::flagsexclEE_
std::vector< int > flagsexclEE_
Definition: PhotonProducer.cc:76
reco::Photon::ShowerShape::sigmaEtaEta
float sigmaEtaEta
Definition: Photon.h:139
MessageLogger.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
ESHandle.h
reco::Photon::ShowerShape::e1x5
float e1x5
Definition: Photon.h:141
PhotonProducer::photonCoreProducer_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducer_
Definition: PhotonProducer.cc:66
PhotonProducer::hOverEConeSize_
double hOverEConeSize_
Definition: PhotonProducer.cc:80
EcalSeverityLevelAlgoRcd.h
BasicCluster.h
EgammaHcalIsolation::arrayHB
std::array< double, 4 > arrayHB
Definition: EgammaHcalIsolation.h:41
HLT_FULL_cff.endcapRecHits
endcapRecHits
Definition: HLT_FULL_cff.py:14947
edm::EDGetTokenT< reco::PhotonCoreCollection >
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
reco::Photon::ShowerShape::pre7DepthHcal
bool pre7DepthHcal
Definition: Photon.h:155
edm
HLT enums.
Definition: AlignableModifier.h:19
gedPhotons_cfi.mipVariableSet
mipVariableSet
Definition: gedPhotons_cfi.py:37
math::XYZTLorentzVectorD
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
geometry
Definition: geometry.py:1
EcalFunctionParameters.h
HLT_FULL_cff.barrelRecHits
barrelRecHits
Definition: HLT_FULL_cff.py:14946
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
EcalClusterToolsT::eMax
static float eMax(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
Definition: EcalClusterTools.h:555
PhotonProducer::runMIPTagger_
bool runMIPTagger_
Definition: PhotonProducer.cc:84
EDProducer.h
edm::SortedCollection< EcalRecHit >
relativeConstraints.geometry
geometry
Definition: relativeConstraints.py:39
PhotonProducer::minR9Barrel_
double minR9Barrel_
Definition: PhotonProducer.cc:82
CaloTopologyRecord
Definition: CaloTopologyRecord.h:10
PhotonCore.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
PhotonMIPHaloTagger.h
EcalClusterToolsT::localCovariances
static std::array< float, 3 > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=EgammaLocalCovParamDefaults::kRelEnCut, const EcalPFRecHitThresholds *thresholds=nullptr, float multEB=0.0, float multEE=0.0)
Definition: EcalClusterTools.h:1036
MonitorAlCaEcalPi0_cfi.posCalcParameters
posCalcParameters
Definition: MonitorAlCaEcalPi0_cfi.py:72
PhotonProducer::preselCutValuesBarrel_
std::vector< double > preselCutValuesBarrel_
Definition: PhotonProducer.cc:98
edm::Handle
Definition: AssociativeIterator.h:50
parallelization.uint
uint
Definition: parallelization.py:124
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
CaloTopology
Definition: CaloTopology.h:19
EcalBarrel
Definition: EcalSubdetector.h:10
PhotonIsolationCalculator
Definition: PhotonIsolationCalculator.h:28
edm::Ref< PhotonCoreCollection >
CaloConeSelector.h
PhotonMIPHaloTagger::MIPcalculate
void MIPcalculate(const reco::Photon *, const edm::Event &, const edm::EventSetup &es, reco::Photon::MIPVariables &mipId)
Definition: PhotonMIPHaloTagger.cc:25
PhotonProducer::photonEnergyCorrector_
PhotonEnergyCorrector photonEnergyCorrector_
Definition: PhotonProducer.cc:101
PhotonProducer::hbheRecHits_
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHits_
Definition: PhotonProducer.cc:69
PhotonProducer::endcapEcalHits_
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
Definition: PhotonProducer.cc:68
config
Definition: config.py:1
PhotonEnergyCorrector.h
MakerMacros.h
ElectronHcalHelper::Configuration::maxSeverityHB
int maxSeverityHB
Definition: ElectronHcalHelper.h:36
Photon.h
CaloGeometry
Definition: CaloGeometry.h:21
reco::Photon::ecal_photons
Definition: Photon.h:314
EcalClusterToolsT::e2x5Max
static float e2x5Max(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: EcalClusterTools.h:608
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
PhotonProducer::hcalHelperCone_
std::unique_ptr< ElectronHcalHelper > hcalHelperCone_
Definition: PhotonProducer.cc:105
ElectronHcalHelper::Configuration::onlyBehindCluster
bool onlyBehindCluster
Definition: ElectronHcalHelper.h:30
PositionCalc::Calculate_Location
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=nullptr)
Definition: PositionCalc.h:65
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
EcalClusterToolsT::covariances
static std::array< float, 3 > covariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry, float w0=4.7)
Definition: EcalClusterTools.h:962
PhotonProducer::usePrimaryVertex_
bool usePrimaryVertex_
Definition: PhotonProducer.cc:88
edm::ESHandle< EcalSeverityLevelAlgo >
EcalSeverityLevelAlgoRcd
Definition: EcalSeverityLevelAlgoRcd.h:12
PhotonProducer::hcalHelperBc_
std::unique_ptr< ElectronHcalHelper > hcalHelperBc_
Definition: PhotonProducer.cc:106
reco::Photon::ShowerShape::hcalOverEcal
std::array< float, 7 > hcalOverEcal
Definition: Photon.h:150
ElectronHcalHelper::Configuration::hOverEConeSize
double hOverEConeSize
Definition: ElectronHcalHelper.h:27
PhotonProducer::PhotonProducer
PhotonProducer(const edm::ParameterSet &ps)
Definition: PhotonProducer.cc:113
StringToEnumValue.h
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
PhotonProducer::candidateP4type_
std::string candidateP4type_
Definition: PhotonProducer.cc:102
ElectronHcalHelper::hcalESum
double hcalESum(const reco::SuperCluster &, int depth) const
Definition: ElectronHcalHelper.cc:73
EcalSeverityLevelAlgo.h
ElectronHcalHelper::Configuration
Definition: ElectronHcalHelper.h:25
CaloGeometryRecord.h
EcalEndcap
Definition: EcalSubdetector.h:10
ClusterShape.h
PhotonProducer::highEt_
double highEt_
Definition: PhotonProducer.cc:81
PhotonProducer::validPixelSeeds_
bool validPixelSeeds_
Definition: PhotonProducer.cc:92
CaloSubdetectorGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
PhotonProducer::produce
void produce(edm::Event &evt, const edm::EventSetup &es) override
Definition: PhotonProducer.cc:236
PhotonMIPHaloTagger
Definition: PhotonMIPHaloTagger.h:13
Event.h
PhotonProducer::PhotonCollection_
std::string PhotonCollection_
Definition: PhotonProducer.cc:65
reco::Photon::ShowerShape::sigmaIetaIeta
float sigmaIetaIeta
Definition: Photon.h:140
cosmicPhotonAnalyzer_cfi.eMax
eMax
Definition: cosmicPhotonAnalyzer_cfi.py:10
EcalClusterTools.h
PhotonProducer
Definition: PhotonProducer.cc:44
reco::Photon::ShowerShape::e2x5
float e2x5
Definition: Photon.h:142
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
reco::Photon::FiducialFlags
Definition: Photon.h:94
PositionCalc
Definition: PositionCalc.h:29
createfilelist.int
int
Definition: createfilelist.py:10
EgHLTOffEleSelection_cfi.minR9
minR9
Definition: EgHLTOffEleSelection_cfi.py:22
p4
double p4[4]
Definition: TauolaWrapper.h:92
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::stream::EDProducer
Definition: EDProducer.h:36
ElectronHcalHelper::Configuration::maxSeverityHE
int maxSeverityHE
Definition: ElectronHcalHelper.h:38
edm::EventSetup
Definition: EventSetup.h:58
PhotonProducer::preselCutValuesEndcap_
std::vector< double > preselCutValuesEndcap_
Definition: PhotonProducer.cc:99
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
PhotonProducer::fillPhotonCollection
void fillPhotonCollection(edm::Event &evt, edm::EventSetup const &es, const edm::Handle< reco::PhotonCoreCollection > &photonCoreHandle, const CaloTopology *topology, const EcalRecHitCollection *ecalBarrelHits, const EcalRecHitCollection *ecalEndcapHits, ElectronHcalHelper const &hcalHelperCone, ElectronHcalHelper const &hcalHelperBc, reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC, const EcalSeverityLevelAlgo *sevLv)
Definition: PhotonProducer.cc:332
gedPhotons_cfi.isolationSumsCalculatorSet
isolationSumsCalculatorSet
Definition: gedPhotons_cfi.py:35
get
#define get
reco::Photon::IsolationVariables
Definition: Photon.h:399
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PhotonProducer::hcalRun2EffDepth_
bool hcalRun2EffDepth_
Definition: PhotonProducer.cc:107
CaloTopology.h
PhotonProducer::severitiesexclEE_
std::vector< int > severitiesexclEE_
Definition: PhotonProducer.cc:78
PhotonProducer::photonIsolationCalculator_
PhotonIsolationCalculator photonIsolationCalculator_
Definition: PhotonProducer.cc:93
EcalClusterToolsT::e3x3
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: EcalClusterTools.h:519
reco::Photon
Definition: Photon.h:22
EcalPreshower
Definition: EcalSubdetector.h:10
PhotonEnergyCorrector::init
void init(const edm::EventSetup &theEventSetup)
Definition: PhotonEnergyCorrector.cc:60
PhotonProducer::vertexProducer_
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
Definition: PhotonProducer.cc:70
reco::Photon::ShowerShape::hcalTowersBehindClusters
std::vector< CaloTowerDetId > hcalTowersBehindClusters
Definition: Photon.h:153
CaloTopologyRecord.h
reco::Photon::ShowerShape::hcalOverEcalBc
std::array< float, 7 > hcalOverEcalBc
Definition: Photon.h:152
reco::Photon::ShowerShape
Definition: Photon.h:138
PhotonEnergyCorrector
Definition: PhotonEnergyCorrector.h:25
eostools.move
def move(src, dest)
Definition: eostools.py:511
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:19
ElectronHcalHelper::Configuration::eThresHB
EgammaHcalIsolation::arrayHB eThresHB
Definition: ElectronHcalHelper.h:35
Vertex.h
gedPhotons_cfi.outputPhotonCollection
outputPhotonCollection
Definition: gedPhotons_cfi.py:31
PhotonEnergyCorrector::calculate
void calculate(edm::Event &evt, reco::Photon &, int subdet, const reco::VertexCollection &vtxcol, const edm::EventSetup &iSetup)
Definition: PhotonEnergyCorrector.cc:80
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
ElectronHcalHelper::Configuration::checkHcalStatus
bool checkHcalStatus
Definition: ElectronHcalHelper.h:30
spclusmultinvestigator_cfi.vertexCollection
vertexCollection
Definition: spclusmultinvestigator_cfi.py:4
SuperCluster.h
PhotonProducer::validConversions_
bool validConversions_
Definition: PhotonProducer.cc:86
CaloGeometry.h
EcalClusterToolsT::e1x5
static float e1x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: EcalClusterTools.h:625
HLT_FULL_cff.full5x5_sigmaIetaIeta
full5x5_sigmaIetaIeta
Definition: HLT_FULL_cff.py:13698
ElectronHcalHelper.h
reco::Photon::regression1
Definition: Photon.h:314
EventSetup.h
EcalClusterToolsT::e5x5
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: EcalClusterTools.h:539
ElectronHcalHelper
Definition: ElectronHcalHelper.h:23
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
Exception.h
reco::Photon::MIPVariables
Definition: Photon.h:365
reco::Photon::ShowerShape::e3x3
float e3x3
Definition: Photon.h:143
electronIdCutBasedExt_cfi.sigmaEtaEta
sigmaEtaEta
Definition: electronIdCutBasedExt_cfi.py:123
PhotonProducer::posCalculator_
PositionCalc posCalculator_
Definition: PhotonProducer.cc:90
PhotonIsolationCalculator::calculate
void calculate(const reco::Photon *, const edm::Event &, const edm::EventSetup &es, reco::Photon::FiducialFlags &phofid, reco::Photon::IsolationVariables &phoisolR03, reco::Photon::IsolationVariables &phoisolR04) const
Definition: PhotonIsolationCalculator.cc:144
reco::PhotonCollection
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
MaterialEffects_cfi.photonEnergy
photonEnergy
Definition: MaterialEffects_cfi.py:26
PhotonProducer::severitiesexclEB_
std::vector< int > severitiesexclEB_
Definition: PhotonProducer.cc:77
ParameterSet.h
EgHLTOffHistBins_cfi.e2x5
e2x5
Definition: EgHLTOffHistBins_cfi.py:21
PhotonProducer::barrelEcalHits_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
Definition: PhotonProducer.cc:67
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
PhotonProducer::photonMIPHaloTagger_
PhotonMIPHaloTagger photonMIPHaloTagger_
Definition: PhotonProducer.cc:96
PhotonProducer::flagsexclEB_
std::vector< int > flagsexclEB_
Definition: PhotonProducer.cc:75
ElectronHcalHelper::Configuration::eThresHE
EgammaHcalIsolation::arrayHE eThresHE
Definition: ElectronHcalHelper.h:37
edm::InputTag
Definition: InputTag.h:15
BasicClusterShapeAssociation.h
EgammaHcalIsolation::arrayHE
std::array< double, 7 > arrayHE
Definition: EgammaHcalIsolation.h:42
reco::Photon::ShowerShape::e5x5
float e5x5
Definition: Photon.h:144
Conversion.h