CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
PhotonProducer.cc
Go to the documentation of this file.
1 
42 
43 #include <vector>
44 
45 // PhotonProducer inherits from EDProducer, so it can be a module:
47 public:
49 
50  void produce(edm::Event& evt, const edm::EventSetup& es) override;
51 
52 private:
54  edm::EventSetup const& es,
55  const edm::Handle<reco::PhotonCoreCollection>& photonCoreHandle,
56  const CaloTopology* topology,
57  const EcalRecHitCollection* ecalBarrelHits,
58  const EcalRecHitCollection* ecalEndcapHits,
60  reco::VertexCollection& pvVertices,
61  reco::PhotonCollection& outputCollection,
62  int& iSC,
63  const EcalSeverityLevelAlgo* sevLv);
64 
65  // std::string PhotonCoreCollection_;
72 
73  //AA
74  //Flags and severities to be excluded from calculations
75 
76  std::vector<int> flagsexclEB_;
77  std::vector<int> flagsexclEE_;
78  std::vector<int> severitiesexclEB_;
79  std::vector<int> severitiesexclEE_;
80 
82  double maxHOverE_;
83  double minSCEt_;
84  double highEt_;
85  double minR9Barrel_;
86  double minR9Endcap_;
88 
90 
92 
94 
97 
98  //MIP
100 
101  std::vector<double> preselCutValuesBarrel_;
102  std::vector<double> preselCutValuesEndcap_;
103 
106 };
107 
110 
111 PhotonProducer::PhotonProducer(const edm::ParameterSet& config) : photonEnergyCorrector_(config, consumesCollector()) {
112  // use onfiguration file to setup input/output collection names
113 
114  photonCoreProducer_ = consumes<reco::PhotonCoreCollection>(config.getParameter<edm::InputTag>("photonCoreProducer"));
115  barrelEcalHits_ = consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("barrelEcalHits"));
116  endcapEcalHits_ = consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("endcapEcalHits"));
117  vertexProducer_ = consumes<reco::VertexCollection>(config.getParameter<edm::InputTag>("primaryVertexProducer"));
118  hcalTowers_ = consumes<CaloTowerCollection>(config.getParameter<edm::InputTag>("hcalTowers"));
119  hOverEConeSize_ = config.getParameter<double>("hOverEConeSize");
120  highEt_ = config.getParameter<double>("highEt");
121  // R9 value to decide converted/unconverted
122  minR9Barrel_ = config.getParameter<double>("minR9Barrel");
123  minR9Endcap_ = config.getParameter<double>("minR9Endcap");
124  usePrimaryVertex_ = config.getParameter<bool>("usePrimaryVertex");
125  runMIPTagger_ = config.getParameter<bool>("runMIPTagger");
126 
127  candidateP4type_ = config.getParameter<std::string>("candidateP4type");
128 
129  edm::ParameterSet posCalcParameters = config.getParameter<edm::ParameterSet>("posCalcParameters");
131 
132  //AA
133  //Flags and Severities to be excluded from photon calculations
134  const std::vector<std::string> flagnamesEB =
135  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEB");
136 
137  const std::vector<std::string> flagnamesEE =
138  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEE");
139 
140  flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
141 
142  flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
143 
144  const std::vector<std::string> severitynamesEB =
145  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEB");
146 
147  severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
148 
149  const std::vector<std::string> severitynamesEE =
150  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEE");
151 
152  severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
153 
154  //AA
155 
156  //
157 
158  // Parameters for the position calculation:
159  // std::map<std::string,double> providedParameters;
160  // providedParameters.insert(std::make_pair("LogWeighted",config.getParameter<bool>("posCalc_logweight")));
161  //providedParameters.insert(std::make_pair("T0_barl",config.getParameter<double>("posCalc_t0_barl")));
162  //providedParameters.insert(std::make_pair("T0_endc",config.getParameter<double>("posCalc_t0_endc")));
163  //providedParameters.insert(std::make_pair("T0_endcPresh",config.getParameter<double>("posCalc_t0_endcPresh")));
164  //providedParameters.insert(std::make_pair("W0",config.getParameter<double>("posCalc_w0")));
165  //providedParameters.insert(std::make_pair("X0",config.getParameter<double>("posCalc_x0")));
166  //posCalculator_ = PositionCalc(providedParameters);
167  // cut values for pre-selection
168  preselCutValuesBarrel_.push_back(config.getParameter<double>("minSCEtBarrel"));
169  preselCutValuesBarrel_.push_back(config.getParameter<double>("maxHoverEBarrel"));
170  preselCutValuesBarrel_.push_back(config.getParameter<double>("ecalRecHitSumEtOffsetBarrel"));
171  preselCutValuesBarrel_.push_back(config.getParameter<double>("ecalRecHitSumEtSlopeBarrel"));
172  preselCutValuesBarrel_.push_back(config.getParameter<double>("hcalTowerSumEtOffsetBarrel"));
173  preselCutValuesBarrel_.push_back(config.getParameter<double>("hcalTowerSumEtSlopeBarrel"));
174  preselCutValuesBarrel_.push_back(config.getParameter<double>("nTrackSolidConeBarrel"));
175  preselCutValuesBarrel_.push_back(config.getParameter<double>("nTrackHollowConeBarrel"));
176  preselCutValuesBarrel_.push_back(config.getParameter<double>("trackPtSumSolidConeBarrel"));
177  preselCutValuesBarrel_.push_back(config.getParameter<double>("trackPtSumHollowConeBarrel"));
178  preselCutValuesBarrel_.push_back(config.getParameter<double>("sigmaIetaIetaCutBarrel"));
179  //
180  preselCutValuesEndcap_.push_back(config.getParameter<double>("minSCEtEndcap"));
181  preselCutValuesEndcap_.push_back(config.getParameter<double>("maxHoverEEndcap"));
182  preselCutValuesEndcap_.push_back(config.getParameter<double>("ecalRecHitSumEtOffsetEndcap"));
183  preselCutValuesEndcap_.push_back(config.getParameter<double>("ecalRecHitSumEtSlopeEndcap"));
184  preselCutValuesEndcap_.push_back(config.getParameter<double>("hcalTowerSumEtOffsetEndcap"));
185  preselCutValuesEndcap_.push_back(config.getParameter<double>("hcalTowerSumEtSlopeEndcap"));
186  preselCutValuesEndcap_.push_back(config.getParameter<double>("nTrackSolidConeEndcap"));
187  preselCutValuesEndcap_.push_back(config.getParameter<double>("nTrackHollowConeEndcap"));
188  preselCutValuesEndcap_.push_back(config.getParameter<double>("trackPtSumSolidConeEndcap"));
189  preselCutValuesEndcap_.push_back(config.getParameter<double>("trackPtSumHollowConeEndcap"));
190  preselCutValuesEndcap_.push_back(config.getParameter<double>("sigmaIetaIetaCutEndcap"));
191  //
192 
193  edm::ParameterSet isolationSumsCalculatorSet = config.getParameter<edm::ParameterSet>("isolationSumsCalculatorSet");
196 
197  edm::ParameterSet mipVariableSet = config.getParameter<edm::ParameterSet>("mipVariableSet");
198  photonMIPHaloTagger_.setup(mipVariableSet, consumesCollector());
199 
200  // Register the product
201  produces<reco::PhotonCollection>(PhotonCollection_);
202 }
203 
204 void PhotonProducer::produce(edm::Event& theEvent, const edm::EventSetup& theEventSetup) {
205  using namespace edm;
206  // nEvt_++;
207 
209  auto outputPhotonCollection_p = std::make_unique<reco::PhotonCollection>();
210 
211  // Get the PhotonCore collection
212  bool validPhotonCoreHandle = true;
213  Handle<reco::PhotonCoreCollection> photonCoreHandle;
214  theEvent.getByToken(photonCoreProducer_, photonCoreHandle);
215  if (!photonCoreHandle.isValid()) {
216  edm::LogError("PhotonProducer") << "Error! Can't get the photonCoreProducer";
217  validPhotonCoreHandle = false;
218  }
219 
220  // Get EcalRecHits
221  bool validEcalRecHits = true;
222  Handle<EcalRecHitCollection> barrelHitHandle;
224  theEvent.getByToken(barrelEcalHits_, barrelHitHandle);
225  if (!barrelHitHandle.isValid()) {
226  edm::LogError("PhotonProducer") << "Error! Can't get the barrelEcalHits";
227  validEcalRecHits = false;
228  }
229  if (validEcalRecHits)
230  barrelRecHits = *(barrelHitHandle.product());
231 
232  Handle<EcalRecHitCollection> endcapHitHandle;
233  theEvent.getByToken(endcapEcalHits_, endcapHitHandle);
235  if (!endcapHitHandle.isValid()) {
236  edm::LogError("PhotonProducer") << "Error! Can't get the endcapEcalHits";
237  validEcalRecHits = false;
238  }
239  if (validEcalRecHits)
240  endcapRecHits = *(endcapHitHandle.product());
241 
242  //AA
243  //Get the severity level object
245  theEventSetup.get<EcalSeverityLevelAlgoRcd>().get(sevLv);
246  //
247 
248  // get Hcal towers collection
249  auto const& hcalTowers = theEvent.get(hcalTowers_);
250 
251  edm::ESHandle<CaloTopology> pTopology;
252  theEventSetup.get<CaloTopologyRecord>().get(pTopology);
253  const CaloTopology* topology = pTopology.product();
254 
255  // Get the primary event vertex
256  Handle<reco::VertexCollection> vertexHandle;
258  bool validVertex = true;
259  if (usePrimaryVertex_) {
260  theEvent.getByToken(vertexProducer_, vertexHandle);
261  if (!vertexHandle.isValid()) {
262  edm::LogWarning("PhotonProducer") << "Error! Can't get the product primary Vertex Collection "
263  << "\n";
264  validVertex = false;
265  }
266  if (validVertex)
267  vertexCollection = *(vertexHandle.product());
268  }
269 
270  int iSC = 0; // index in photon collection
271  // Loop over barrel and endcap SC collections and fill the photon collection
272  if (validPhotonCoreHandle)
273  fillPhotonCollection(theEvent,
274  theEventSetup,
275  photonCoreHandle,
276  topology,
277  &barrelRecHits,
278  &endcapRecHits,
279  hcalTowers,
282  iSC,
283  sevLv.product());
284 
285  // put the product in the event
286  edm::LogInfo("PhotonProducer") << " Put in the event " << iSC << " Photon Candidates \n";
287  outputPhotonCollection_p->assign(outputPhotonCollection.begin(), outputPhotonCollection.end());
288  theEvent.put(std::move(outputPhotonCollection_p), PhotonCollection_);
289 }
290 
292  edm::EventSetup const& es,
293  const edm::Handle<reco::PhotonCoreCollection>& photonCoreHandle,
294  const CaloTopology* topology,
295  const EcalRecHitCollection* ecalBarrelHits,
296  const EcalRecHitCollection* ecalEndcapHits,
300  int& iSC,
301  const EcalSeverityLevelAlgo* sevLv) {
302  // get the geometry from the event setup:
303  edm::ESHandle<CaloGeometry> caloGeomHandle;
304  es.get<CaloGeometryRecord>().get(caloGeomHandle);
305 
306  const CaloGeometry* geometry = caloGeomHandle.product();
307  const CaloSubdetectorGeometry* subDetGeometry = nullptr;
308  const CaloSubdetectorGeometry* geometryES = caloGeomHandle->getSubdetectorGeometry(DetId::Ecal, EcalPreshower);
309  const EcalRecHitCollection* hits = nullptr;
310  std::vector<double> preselCutValues;
311  float minR9 = 0;
312 
314 
315  std::vector<int> flags_, severitiesexcl_;
316 
317  for (unsigned int lSC = 0; lSC < photonCoreHandle->size(); lSC++) {
318  reco::PhotonCoreRef coreRef(reco::PhotonCoreRef(photonCoreHandle, lSC));
319  reco::SuperClusterRef scRef = coreRef->superCluster();
320  iSC++;
321 
322  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
323  subDetGeometry = caloGeomHandle->getSubdetectorGeometry(DetId::Ecal, subdet);
324 
325  if (subdet == EcalBarrel) {
326  preselCutValues = preselCutValuesBarrel_;
328  hits = ecalBarrelHits;
329  flags_ = flagsexclEB_;
330  severitiesexcl_ = severitiesexclEB_;
331  } else if (subdet == EcalEndcap) {
332  preselCutValues = preselCutValuesEndcap_;
334  hits = ecalEndcapHits;
335  flags_ = flagsexclEE_;
336  severitiesexcl_ = severitiesexclEE_;
337  } else {
338  edm::LogWarning("") << "PhotonProducer: do not know if it is a barrel or endcap SuperCluster";
339  }
340  if (hits == nullptr)
341  continue;
342 
343  // SC energy preselection
344  if (scRef->energy() / cosh(scRef->eta()) <= preselCutValues[0])
345  continue;
346  // calculate HoE
347 
348  EgammaTowerIsolation towerIso1(hOverEConeSize_, 0., 0., 1, &hcalTowers);
349  EgammaTowerIsolation towerIso2(hOverEConeSize_, 0., 0., 2, &hcalTowers);
350  double HoE1 = towerIso1.getTowerESum(&(*scRef)) / scRef->energy();
351  double HoE2 = towerIso2.getTowerESum(&(*scRef)) / scRef->energy();
352 
354  es.get<CaloGeometryRecord>().get(ctmaph);
355 
356  auto towersBehindCluster = egamma::towersOf(*scRef, *ctmaph);
357  float hcalDepth1OverEcalBc = egamma::depth1HcalESum(towersBehindCluster, hcalTowers) / scRef->energy();
358  float hcalDepth2OverEcalBc = egamma::depth2HcalESum(towersBehindCluster, hcalTowers) / scRef->energy();
359 
360  // recalculate position of seed BasicCluster taking shower depth for unconverted photon
361  math::XYZPoint unconvPos =
362  posCalculator_.Calculate_Location(scRef->seed()->hitsAndFractions(), hits, subDetGeometry, geometryES);
363 
364  float maxXtal = EcalClusterTools::eMax(*(scRef->seed()), &(*hits));
365  //AA
366  //Change these to consider severity level of hits
367  float e1x5 = EcalClusterTools::e1x5(*(scRef->seed()), &(*hits), &(*topology));
368  float e2x5 = EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology));
369  float e3x3 = EcalClusterTools::e3x3(*(scRef->seed()), &(*hits), &(*topology));
370  float e5x5 = EcalClusterTools::e5x5(*(scRef->seed()), &(*hits), &(*topology));
371  const auto& cov = EcalClusterTools::covariances(*(scRef->seed()), &(*hits), &(*topology), geometry);
372  const auto& locCov = EcalClusterTools::localCovariances(*(scRef->seed()), &(*hits), &(*topology));
373 
374  float sigmaEtaEta = sqrt(cov[0]);
375  float sigmaIetaIeta = sqrt(locCov[0]);
376  float r9 = e3x3 / (scRef->rawEnergy());
377 
378  float full5x5_maxXtal = noZS::EcalClusterTools::eMax(*(scRef->seed()), &(*hits));
379  //AA
380  //Change these to consider severity level of hits
381  float full5x5_e1x5 = noZS::EcalClusterTools::e1x5(*(scRef->seed()), &(*hits), &(*topology));
382  float full5x5_e2x5 = noZS::EcalClusterTools::e2x5Max(*(scRef->seed()), &(*hits), &(*topology));
383  float full5x5_e3x3 = noZS::EcalClusterTools::e3x3(*(scRef->seed()), &(*hits), &(*topology));
384  float full5x5_e5x5 = noZS::EcalClusterTools::e5x5(*(scRef->seed()), &(*hits), &(*topology));
385  const auto& full5x5_cov = noZS::EcalClusterTools::covariances(*(scRef->seed()), &(*hits), &(*topology), geometry);
386  const auto& full5x5_locCov = noZS::EcalClusterTools::localCovariances(*(scRef->seed()), &(*hits), &(*topology));
387 
388  float full5x5_sigmaEtaEta = sqrt(full5x5_cov[0]);
389  float full5x5_sigmaIetaIeta = sqrt(full5x5_locCov[0]);
390 
391  // compute position of ECAL shower
392  math::XYZPoint caloPosition;
393  if (r9 > minR9) {
394  caloPosition = unconvPos;
395  } else {
396  caloPosition = scRef->position();
397  }
398 
400  double photonEnergy = 1.;
401  math::XYZPoint vtx(0., 0., 0.);
402  if (!vertexCollection.empty())
403  vtx = vertexCollection.begin()->position();
404  // compute momentum vector of photon from primary vertex and cluster position
405  math::XYZVector direction = caloPosition - vtx;
406  math::XYZVector momentum = direction.unit();
407 
408  // Create dummy candidate with unit momentum and zero energy to allow setting of all variables. The energy is set for last.
409  math::XYZTLorentzVectorD p4(momentum.x(), momentum.y(), momentum.z(), photonEnergy);
410  reco::Photon newCandidate(p4, caloPosition, coreRef, vtx);
411 
412  // Calculate fiducial flags and isolation variable. Blocked are filled from the isolationCalculator
413  reco::Photon::FiducialFlags fiducialFlags;
414  reco::Photon::IsolationVariables isolVarR03, isolVarR04;
415  photonIsolationCalculator_.calculate(&newCandidate, evt, es, fiducialFlags, isolVarR04, isolVarR03);
416  newCandidate.setFiducialVolumeFlags(fiducialFlags);
417  newCandidate.setIsolationVariables(isolVarR04, isolVarR03);
418 
420  reco::Photon::ShowerShape showerShape;
421  showerShape.e1x5 = e1x5;
422  showerShape.e2x5 = e2x5;
423  showerShape.e3x3 = e3x3;
424  showerShape.e5x5 = e5x5;
425  showerShape.maxEnergyXtal = maxXtal;
426  showerShape.sigmaEtaEta = sigmaEtaEta;
427  showerShape.sigmaIetaIeta = sigmaIetaIeta;
428  showerShape.hcalDepth1OverEcal = HoE1;
429  showerShape.hcalDepth2OverEcal = HoE2;
430  showerShape.hcalDepth1OverEcalBc = hcalDepth1OverEcalBc;
431  showerShape.hcalDepth2OverEcalBc = hcalDepth2OverEcalBc;
432  showerShape.hcalTowersBehindClusters = towersBehindCluster;
433  newCandidate.setShowerShapeVariables(showerShape);
434 
436  reco::Photon::ShowerShape full5x5_showerShape;
437  full5x5_showerShape.e1x5 = full5x5_e1x5;
438  full5x5_showerShape.e2x5 = full5x5_e2x5;
439  full5x5_showerShape.e3x3 = full5x5_e3x3;
440  full5x5_showerShape.e5x5 = full5x5_e5x5;
441  full5x5_showerShape.maxEnergyXtal = full5x5_maxXtal;
442  full5x5_showerShape.sigmaEtaEta = full5x5_sigmaEtaEta;
443  full5x5_showerShape.sigmaIetaIeta = full5x5_sigmaIetaIeta;
444  newCandidate.full5x5_setShowerShapeVariables(full5x5_showerShape);
445 
448  // Photon candidate takes by default (set in photons_cfi.py) a 4-momentum derived from the ecal photon-specific corrections.
449  photonEnergyCorrector_.calculate(evt, newCandidate, subdet, vertexCollection, es);
450  if (candidateP4type_ == "fromEcalEnergy") {
451  newCandidate.setP4(newCandidate.p4(reco::Photon::ecal_photons));
452  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
453  } else if (candidateP4type_ == "fromRegression") {
454  newCandidate.setP4(newCandidate.p4(reco::Photon::regression1));
455  newCandidate.setCandidateP4type(reco::Photon::regression1);
456  }
457 
458  // fill MIP Vairables for Halo: Block for MIP are filled from PhotonMIPHaloTagger
460  if (subdet == EcalBarrel && runMIPTagger_) {
461  photonMIPHaloTagger_.MIPcalculate(&newCandidate, evt, es, mipVar);
462  newCandidate.setMIPVariables(mipVar);
463  }
464 
466  bool isLooseEM = true;
467  if (newCandidate.pt() < highEt_) {
468  if (newCandidate.hadronicOverEm() >= preselCutValues[1])
469  isLooseEM = false;
470  if (newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2] + preselCutValues[3] * newCandidate.pt())
471  isLooseEM = false;
472  if (newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4] + preselCutValues[5] * newCandidate.pt())
473  isLooseEM = false;
474  if (newCandidate.nTrkSolidConeDR04() > int(preselCutValues[6]))
475  isLooseEM = false;
476  if (newCandidate.nTrkHollowConeDR04() > int(preselCutValues[7]))
477  isLooseEM = false;
478  if (newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8])
479  isLooseEM = false;
480  if (newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9])
481  isLooseEM = false;
482  if (newCandidate.sigmaIetaIeta() > preselCutValues[10])
483  isLooseEM = false;
484  }
485 
486  if (isLooseEM)
487  outputPhotonCollection.push_back(newCandidate);
488  }
489 }
EgHLTOffHistBins_cfi.e1x5
e1x5
Definition: EgHLTOffHistBins_cfi.py:22
reco::Photon::ShowerShape::maxEnergyXtal
float maxEnergyXtal
Definition: Photon.h:144
PhotonIsolationCalculator.h
PhotonProducer::minR9Endcap_
double minR9Endcap_
Definition: PhotonProducer.cc:86
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalSeverityLevelAlgo
Definition: EcalSeverityLevelAlgo.h:33
reco::Photon::ShowerShape::hcalDepth2OverEcalBc
float hcalDepth2OverEcalBc
Definition: Photon.h:148
electrons_cff.r9
r9
Definition: electrons_cff.py:360
PhotonMIPHaloTagger::setup
void setup(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Definition: PhotonMIPHaloTagger.cc:17
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:34
Handle.h
PhotonProducer::hcalTowers_
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
Definition: PhotonProducer.cc:70
PositionCalc.h
PhotonProducer::flagsexclEE_
std::vector< int > flagsexclEE_
Definition: PhotonProducer.cc:77
reco::Photon::ShowerShape::sigmaEtaEta
float sigmaEtaEta
Definition: Photon.h:138
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:140
PhotonProducer::photonCoreProducer_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducer_
Definition: PhotonProducer.cc:67
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, CaloTowerCollection const &hcalTowers, reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC, const EcalSeverityLevelAlgo *sevLv)
Definition: PhotonProducer.cc:291
PhotonProducer::hOverEConeSize_
double hOverEConeSize_
Definition: PhotonProducer.cc:81
EcalSeverityLevelAlgoRcd.h
BasicCluster.h
HLT_FULL_cff.endcapRecHits
endcapRecHits
Definition: HLT_FULL_cff.py:14920
edm::EDGetTokenT< reco::PhotonCoreCollection >
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
gedPhotons_cfi.mipVariableSet
mipVariableSet
Definition: gedPhotons_cfi.py:36
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:14923
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:87
EDProducer.h
edm::SortedCollection< EcalRecHit >
relativeConstraints.geometry
geometry
Definition: relativeConstraints.py:39
PhotonProducer::minR9Barrel_
double minR9Barrel_
Definition: PhotonProducer.cc:85
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
egamma::depth2HcalESum
double depth2HcalESum(std::vector< CaloTowerDetId > const &towers, CaloTowerCollection const &)
Definition: EgammaHadTower.cc:83
PhotonProducer::preselCutValuesBarrel_
std::vector< double > preselCutValuesBarrel_
Definition: PhotonProducer.cc:101
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
CaloTopology
Definition: CaloTopology.h:19
EcalBarrel
Definition: EcalSubdetector.h:10
EgammaHadTower.h
PhotonIsolationCalculator
Definition: PhotonIsolationCalculator.h:16
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:27
PhotonProducer::photonEnergyCorrector_
PhotonEnergyCorrector photonEnergyCorrector_
Definition: PhotonProducer.cc:104
PhotonProducer::endcapEcalHits_
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
Definition: PhotonProducer.cc:69
config
Definition: config.py:1
PhotonEnergyCorrector.h
MakerMacros.h
Photon.h
CaloGeometry
Definition: CaloGeometry.h:21
EgammaTowerIsolation::getTowerESum
double getTowerESum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=nullptr) const
Definition: EgammaTowerIsolation.h:209
reco::Photon::ecal_photons
Definition: Photon.h:273
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
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:91
edm::ESHandle< EcalSeverityLevelAlgo >
EcalSeverityLevelAlgoRcd
Definition: EcalSeverityLevelAlgoRcd.h:12
PhotonProducer::maxHOverE_
double maxHOverE_
Definition: PhotonProducer.cc:82
PhotonProducer::minSCEt_
double minSCEt_
Definition: PhotonProducer.cc:83
PhotonProducer::PhotonProducer
PhotonProducer(const edm::ParameterSet &ps)
Definition: PhotonProducer.cc:111
StringToEnumValue.h
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:535
EgammaTowerIsolation.h
reco::Photon::ShowerShape::hcalDepth1OverEcalBc
float hcalDepth1OverEcalBc
Definition: Photon.h:147
PhotonProducer::candidateP4type_
std::string candidateP4type_
Definition: PhotonProducer.cc:105
EcalSeverityLevelAlgo.h
CaloGeometryRecord.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
EcalEndcap
Definition: EcalSubdetector.h:10
ClusterShape.h
egamma::towersOf
std::vector< CaloTowerDetId > towersOf(reco::SuperCluster const &sc, CaloTowerConstituentsMap const &towerMap, HoeMode mode=HoeMode::SingleTower)
Definition: EgammaHadTower.cc:25
PhotonProducer::highEt_
double highEt_
Definition: PhotonProducer.cc:84
PhotonProducer::validPixelSeeds_
bool validPixelSeeds_
Definition: PhotonProducer.cc:95
CaloSubdetectorGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::Photon::ShowerShape::hcalDepth2OverEcal
float hcalDepth2OverEcal
Definition: Photon.h:146
PhotonProducer::produce
void produce(edm::Event &evt, const edm::EventSetup &es) override
Definition: PhotonProducer.cc:204
PhotonMIPHaloTagger
Definition: PhotonMIPHaloTagger.h:13
Event.h
PhotonProducer::PhotonCollection_
std::string PhotonCollection_
Definition: PhotonProducer.cc:66
reco::Photon::ShowerShape::sigmaIetaIeta
float sigmaIetaIeta
Definition: Photon.h:139
cosmicPhotonAnalyzer_cfi.eMax
eMax
Definition: cosmicPhotonAnalyzer_cfi.py:10
EcalClusterTools.h
PhotonProducer
Definition: PhotonProducer.cc:46
reco::Photon::ShowerShape::e2x5
float e2x5
Definition: Photon.h:141
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
CaloTopologyRecord.h
reco::Photon::FiducialFlags
Definition: Photon.h:93
EgammaTowerIsolation
Definition: EgammaTowerIsolation.h:197
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:38
edm::EventSetup
Definition: EventSetup.h:58
PhotonProducer::preselCutValuesEndcap_
std::vector< double > preselCutValuesEndcap_
Definition: PhotonProducer.cc:102
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
gedPhotons_cfi.isolationSumsCalculatorSet
isolationSumsCalculatorSet
Definition: gedPhotons_cfi.py:34
get
#define get
reco::Photon::IsolationVariables
Definition: Photon.h:358
conversions_cfi.hcalTowers
hcalTowers
Definition: conversions_cfi.py:21
CaloTopology.h
CaloTowerCollection.h
PhotonProducer::severitiesexclEE_
std::vector< int > severitiesexclEE_
Definition: PhotonProducer.cc:79
PhotonProducer::photonIsolationCalculator_
PhotonIsolationCalculator photonIsolationCalculator_
Definition: PhotonProducer.cc:96
EcalClusterToolsT::e3x3
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: EcalClusterTools.h:519
reco::Photon
Definition: Photon.h:21
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:71
reco::Photon::ShowerShape::hcalTowersBehindClusters
std::vector< CaloTowerDetId > hcalTowersBehindClusters
Definition: Photon.h:149
reco::Photon::ShowerShape
Definition: Photon.h:137
PhotonEnergyCorrector
Definition: PhotonEnergyCorrector.h:25
eostools.move
def move(src, dest)
Definition: eostools.py:511
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
gedPhotons_cfi.outputPhotonCollection
outputPhotonCollection
Definition: gedPhotons_cfi.py:30
PhotonEnergyCorrector::calculate
void calculate(edm::Event &evt, reco::Photon &, int subdet, const reco::VertexCollection &vtxcol, const edm::EventSetup &iSetup)
Definition: PhotonEnergyCorrector.cc:80
spclusmultinvestigator_cfi.vertexCollection
vertexCollection
Definition: spclusmultinvestigator_cfi.py:4
SuperCluster.h
PhotonProducer::validConversions_
bool validConversions_
Definition: PhotonProducer.cc:89
CaloGeometry.h
EcalClusterToolsT::e1x5
static float e1x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: EcalClusterTools.h:625
egamma::depth1HcalESum
double depth1HcalESum(std::vector< CaloTowerDetId > const &towers, CaloTowerCollection const &)
Definition: EgammaHadTower.cc:73
HLT_FULL_cff.full5x5_sigmaIetaIeta
full5x5_sigmaIetaIeta
Definition: HLT_FULL_cff.py:13706
reco::Photon::ShowerShape::hcalDepth1OverEcal
float hcalDepth1OverEcal
Definition: Photon.h:145
reco::Photon::regression1
Definition: Photon.h:273
EventSetup.h
EcalClusterToolsT::e5x5
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: EcalClusterTools.h:539
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
Exception.h
reco::Photon::MIPVariables
Definition: Photon.h:324
reco::Photon::ShowerShape::e3x3
float e3x3
Definition: Photon.h:142
electronIdCutBasedExt_cfi.sigmaEtaEta
sigmaEtaEta
Definition: electronIdCutBasedExt_cfi.py:123
PhotonProducer::posCalculator_
PositionCalc posCalculator_
Definition: PhotonProducer.cc:93
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:170
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:78
ParameterSet.h
EgHLTOffHistBins_cfi.e2x5
e2x5
Definition: EgHLTOffHistBins_cfi.py:21
PhotonProducer::barrelEcalHits_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
Definition: PhotonProducer.cc:68
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
PhotonProducer::photonMIPHaloTagger_
PhotonMIPHaloTagger photonMIPHaloTagger_
Definition: PhotonProducer.cc:99
PhotonProducer::flagsexclEB_
std::vector< int > flagsexclEB_
Definition: PhotonProducer.cc:76
edm::Event::get
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:342
edm::InputTag
Definition: InputTag.h:15
BasicClusterShapeAssociation.h
reco::Photon::ShowerShape::e5x5
float e5x5
Definition: Photon.h:143
Conversion.h