CMS 3D CMS Logo

HGCalHitValidation.cc
Go to the documentation of this file.
1 //
3 // Package: HGCalHitValidation
4 // Class: HGCalHitValidation
5 //
26 
34 
46 
52 
53 #include <cmath>
54 #include <memory>
55 #include <iostream>
56 #include <string>
57 #include <vector>
58 
59 //#define EDM_ML_DEBUG
60 
62 public:
63  explicit HGCalHitValidation(const edm::ParameterSet&);
64  ~HGCalHitValidation() override;
65  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
66 
67 protected:
68  typedef std::tuple<float, float, float, float> HGCHitTuple;
69 
70  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
71  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
72  void analyze(const edm::Event&, const edm::EventSetup&) override;
73  void analyzeHGCalSimHit(edm::Handle<std::vector<PCaloHit>> const& simHits,
74  int idet,
76  std::map<unsigned int, HGCHitTuple>&);
77  template <class T1>
78  void analyzeHGCalRecHit(T1 const& theHits, std::map<unsigned int, HGCHitTuple> const& hitRefs);
79 
80 private:
81  //HGC Geometry
82  std::vector<const HGCalDDDConstants*> hgcCons_;
83  std::vector<const HGCalGeometry*> hgcGeometry_;
87  std::vector<std::string> geometrySource_;
88  std::vector<int> ietaExcludeBH_;
89  bool ifHCAL_;
90  bool ifHCALsim_;
91 
100 
101  //histogram related stuff
105 
110 
114 };
115 
117  geometrySource_ = cfg.getUntrackedParameter<std::vector<std::string>>("geometrySource");
118  eeSimHitToken_ = consumes<std::vector<PCaloHit>>(cfg.getParameter<edm::InputTag>("eeSimHitSource"));
119  fhSimHitToken_ = consumes<std::vector<PCaloHit>>(cfg.getParameter<edm::InputTag>("fhSimHitSource"));
120  bhSimHitToken_ = consumes<std::vector<PCaloHit>>(cfg.getParameter<edm::InputTag>("bhSimHitSource"));
121  eeRecHitToken_ = consumes<HGCeeRecHitCollection>(cfg.getParameter<edm::InputTag>("eeRecHitSource"));
122  fhRecHitToken_ = consumes<HGChefRecHitCollection>(cfg.getParameter<edm::InputTag>("fhRecHitSource"));
123  ietaExcludeBH_ = cfg.getParameter<std::vector<int>>("ietaExcludeBH");
124  ifHCAL_ = cfg.getParameter<bool>("ifHCAL");
125  ifHCALsim_ = cfg.getParameter<bool>("ifHCALsim");
126  if (ifHCAL_)
127  bhRecHitTokenh_ = consumes<HBHERecHitCollection>(cfg.getParameter<edm::InputTag>("bhRecHitSource"));
128  else
129  bhRecHitTokeng_ = consumes<HGChebRecHitCollection>(cfg.getParameter<edm::InputTag>("bhRecHitSource"));
130 
131 #ifdef EDM_ML_DEBUG
132  edm::LogInfo("HGCalValid") << "Exclude the following " << ietaExcludeBH_.size() << " ieta values from BH plots (BH "
133  << ifHCAL_ << ") ";
134  for (unsigned int k = 0; k < ietaExcludeBH_.size(); ++k)
135  edm::LogInfo("HGCalValid") << " [" << k << "] " << ietaExcludeBH_[k];
136 #endif
137 }
138 
140 
142  //The following says we do not know what parameters are allowed so do no validation
143  // Please change this to state exactly what you do use, even if it is no parameters
145  desc.setUnknown();
146  descriptions.addDefault(desc);
147 }
148 
150  iB.setCurrentFolder("HGCAL/HGCalSimHitsV/HitValidation");
151 
152  //initiating histograms
153  heedzVsZ = iB.book2D("heedzVsZ", "", 7200, -360, 360, 100, -0.1, 0.1);
154  heedyVsY = iB.book2D("heedyVsY", "", 400, -200, 200, 100, -0.02, 0.02);
155  heedxVsX = iB.book2D("heedxVsX", "", 400, -200, 200, 100, -0.02, 0.02);
156  heeRecVsSimZ = iB.book2D("heeRecVsSimZ", "", 7200, -360, 360, 7200, -360, 360);
157  heeRecVsSimY = iB.book2D("heeRecVsSimY", "", 400, -200, 200, 400, -200, 200);
158  heeRecVsSimX = iB.book2D("heeRecVsSimX", "", 400, -200, 200, 400, -200, 200);
159 
160  hefdzVsZ = iB.book2D("hefdzVsZ", "", 8200, -410, 410, 100, -0.1, 0.1);
161  hefdyVsY = iB.book2D("hefdyVsY", "", 400, -200, 200, 100, -0.02, 0.02);
162  hefdxVsX = iB.book2D("hefdxVsX", "", 400, -200, 200, 100, -0.02, 0.02);
163  hefRecVsSimZ = iB.book2D("hefRecVsSimZ", "", 8200, -410, 410, 8200, -410, 410);
164  hefRecVsSimY = iB.book2D("hefRecVsSimY", "", 400, -200, 200, 400, -200, 200);
165  hefRecVsSimX = iB.book2D("hefRecVsSimX", "", 400, -200, 200, 400, -200, 200);
166 
167  hebdzVsZ = iB.book2D("hebdzVsZ", "", 1080, -540, 540, 100, -1.0, 1.0);
168  hebdPhiVsPhi = iB.book2D("hebdPhiVsPhi", "", M_PI * 100, -0.5, M_PI + 0.5, 200, -0.2, 0.2);
169  hebdEtaVsEta = iB.book2D("hebdEtaVsEta", "", 1000, -5, 5, 200, -0.1, 0.1);
170  hebRecVsSimZ = iB.book2D("hebRecVsSimZ", "", 1080, -540, 540, 1080, -540, 540);
171  hebRecVsSimY = iB.book2D("hebRecVsSimY", "", 400, -200, 200, 400, -200, 200);
172  hebRecVsSimX = iB.book2D("hebRecVsSimX", "", 400, -200, 200, 400, -200, 200);
173 
174  heeEnRec = iB.book1D("heeEnRec", "", 1000, 0, 10);
175  heeEnSim = iB.book1D("heeEnSim", "", 1000, 0, 0.01);
176  heeEnSimRec = iB.book2D("heeEnSimRec", "", 200, 0, 0.002, 200, 0, 0.2);
177 
178  hefEnRec = iB.book1D("hefEnRec", "", 1000, 0, 10);
179  hefEnSim = iB.book1D("hefEnSim", "", 1000, 0, 0.01);
180  hefEnSimRec = iB.book2D("hefEnSimRec", "", 200, 0, 0.001, 200, 0, 0.5);
181 
182  hebEnRec = iB.book1D("hebEnRec", "", 1000, 0, 15);
183  hebEnSim = iB.book1D("hebEnSim", "", 1000, 0, 0.01);
184  hebEnSimRec = iB.book2D("hebEnSimRec", "", 200, 0, 0.02, 200, 0, 4);
185 }
186 
187 void HGCalHitValidation::dqmBeginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) {
188  //initiating hgc Geometry
189  for (size_t i = 0; i < geometrySource_.size(); i++) {
190  if (geometrySource_[i].find("Hcal") != std::string::npos) {
192  iSetup.get<HcalSimNumberingRecord>().get(pHSNDC);
193  if (pHSNDC.isValid()) {
194  hcCons_ = pHSNDC.product();
195  hgcCons_.push_back(nullptr);
196  } else {
197  edm::LogWarning("HGCalValid") << "Cannot initiate HcalDDDSimConstants: " << geometrySource_[i] << std::endl;
198  }
200  iSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
201  if (pHRNDC.isValid()) {
202  hcConr_ = pHRNDC.product();
203  } else {
204  edm::LogWarning("HGCalValid") << "Cannot initiate HcalDDDRecConstants: " << geometrySource_[i] << std::endl;
205  }
207  iSetup.get<CaloGeometryRecord>().get(caloG);
208  if (caloG.isValid()) {
209  const CaloGeometry* geo = caloG.product();
211  hgcGeometry_.push_back(nullptr);
212  } else {
213  edm::LogWarning("HGCalValid") << "Cannot initiate HcalGeometry for " << geometrySource_[i] << std::endl;
214  }
215  } else {
217  iSetup.get<IdealGeometryRecord>().get(geometrySource_[i], hgcCons);
218  if (hgcCons.isValid()) {
219  hgcCons_.push_back(hgcCons.product());
220  } else {
221  edm::LogWarning("HGCalValid") << "Cannot initiate HGCalDDDConstants for " << geometrySource_[i] << std::endl;
222  }
224  iSetup.get<IdealGeometryRecord>().get(geometrySource_[i], hgcGeom);
225  if (hgcGeom.isValid()) {
226  hgcGeometry_.push_back(hgcGeom.product());
227  } else {
228  edm::LogWarning("HGCalValid") << "Cannot initiate HGCalGeometry for " << geometrySource_[i] << std::endl;
229  }
230  }
231  }
232 }
233 
235  std::map<unsigned int, HGCHitTuple> eeHitRefs, fhHitRefs, bhHitRefs;
236 
237  //Accesing ee simhits
239  iEvent.getByToken(eeSimHitToken_, eeSimHits);
240 
241  if (eeSimHits.isValid()) {
242  analyzeHGCalSimHit(eeSimHits, 0, heeEnSim, eeHitRefs);
243 #ifdef EDM_ML_DEBUG
244  for (std::map<unsigned int, HGCHitTuple>::iterator itr = eeHitRefs.begin(); itr != eeHitRefs.end(); ++itr) {
245  int idx = std::distance(eeHitRefs.begin(), itr);
246  edm::LogInfo("HGCalValid") << "EEHit[" << idx << "] " << std::hex << itr->first << std::dec << "; Energy "
247  << std::get<0>(itr->second) << "; Position (" << std::get<1>(itr->second) << ", "
248  << std::get<2>(itr->second) << ", " << std::get<3>(itr->second) << ")";
249  }
250 #endif
251  } else {
252  edm::LogVerbatim("HGCalValid") << "No EE SimHit Found ";
253  }
254 
255  //Accesing fh simhits
257  iEvent.getByToken(fhSimHitToken_, fhSimHits);
258  if (fhSimHits.isValid()) {
259  analyzeHGCalSimHit(fhSimHits, 1, hefEnSim, fhHitRefs);
260 #ifdef EDM_ML_DEBUG
261  for (std::map<unsigned int, HGCHitTuple>::iterator itr = fhHitRefs.begin(); itr != fhHitRefs.end(); ++itr) {
262  int idx = std::distance(fhHitRefs.begin(), itr);
263  edm::LogInfo("HGCalValid") << "FHHit[" << idx << "] " << std::hex << itr->first << std::dec << "; Energy "
264  << std::get<0>(itr->second) << "; Position (" << std::get<1>(itr->second) << ", "
265  << std::get<2>(itr->second) << ", " << std::get<3>(itr->second) << ")";
266  }
267 #endif
268  } else {
269  edm::LogVerbatim("HGCalValid") << "No FH SimHit Found ";
270  }
271 
272  //Accessing bh simhits
274  iEvent.getByToken(bhSimHitToken_, bhSimHits);
275  if (bhSimHits.isValid()) {
276  if (ifHCALsim_) {
277  for (std::vector<PCaloHit>::const_iterator simHit = bhSimHits->begin(); simHit != bhSimHits->end(); ++simHit) {
278  int subdet, z, depth, eta, phi, lay;
279  HcalTestNumbering::unpackHcalIndex(simHit->id(), subdet, z, depth, eta, phi, lay);
280 
281  if (subdet == static_cast<int>(HcalEndcap)) {
282  HcalCellType::HcalCell cell = hcCons_->cell(subdet, z, lay, eta, phi);
283  double zp = cell.rz / 10;
284 
285  HcalDDDRecConstants::HcalID idx = hcConr_->getHCID(subdet, eta, phi, lay, depth);
286  int sign = (z == 0) ? (-1) : (1);
287  zp *= sign;
288  HcalDetId id = HcalDetId(HcalEndcap, sign * idx.eta, idx.phi, idx.depth);
289 
290  float energy = simHit->energy();
291  float energySum(energy);
292  if (bhHitRefs.count(id.rawId()) != 0)
293  energySum += std::get<0>(bhHitRefs[id.rawId()]);
294  hebEnSim->Fill(energy);
295  if (std::find(ietaExcludeBH_.begin(), ietaExcludeBH_.end(), idx.eta) == ietaExcludeBH_.end()) {
296  bhHitRefs[id.rawId()] = std::make_tuple(energySum, cell.eta, cell.phi, zp);
297 #ifdef EDM_ML_DEBUG
298  edm::LogInfo("HGCalValid") << "Accept " << id << std::endl;
299  } else {
300  edm::LogInfo("HGCalValid") << "Reject " << id << std::endl;
301 #endif
302  }
303  }
304  }
305  } else {
306  analyzeHGCalSimHit(bhSimHits, 2, hebEnSim, bhHitRefs);
307  }
308 #ifdef EDM_ML_DEBUG
309  for (std::map<unsigned int, HGCHitTuple>::iterator itr = bhHitRefs.begin(); itr != bhHitRefs.end(); ++itr) {
310  int idx = std::distance(bhHitRefs.begin(), itr);
311  edm::LogInfo("HGCalValid") << "BHHit[" << idx << "] " << std::hex << itr->first << std::dec << "; Energy "
312  << std::get<0>(itr->second) << "; Position (" << std::get<1>(itr->second) << ", "
313  << std::get<2>(itr->second) << ", " << std::get<3>(itr->second) << ")";
314  }
315 #endif
316  } else {
317  edm::LogVerbatim("HGCalValid") << "No BH SimHit Found ";
318  }
319 
320  //accessing EE Rechit information
322  iEvent.getByToken(eeRecHitToken_, eeRecHit);
323  if (eeRecHit.isValid()) {
324  const HGCeeRecHitCollection* theHits = (eeRecHit.product());
325  for (auto it = theHits->begin(); it != theHits->end(); ++it) {
326  double energy = it->energy();
327  heeEnRec->Fill(energy);
328  std::map<unsigned int, HGCHitTuple>::const_iterator itr = eeHitRefs.find(it->id().rawId());
329  if (itr != eeHitRefs.end()) {
330  GlobalPoint xyz = hgcGeometry_[0]->getPosition(it->id());
331  heeRecVsSimX->Fill(std::get<1>(itr->second), xyz.x());
332  heeRecVsSimY->Fill(std::get<2>(itr->second), xyz.y());
333  heeRecVsSimZ->Fill(std::get<3>(itr->second), xyz.z());
334  heedxVsX->Fill(std::get<1>(itr->second), (xyz.x() - std::get<1>(itr->second)));
335  heedyVsY->Fill(std::get<2>(itr->second), (xyz.y() - std::get<2>(itr->second)));
336  heedzVsZ->Fill(std::get<3>(itr->second), (xyz.z() - std::get<3>(itr->second)));
337  heeEnSimRec->Fill(std::get<0>(itr->second), energy);
338 #ifdef EDM_ML_DEBUG
339  edm::LogInfo("HGCalValid") << "EEHit: " << std::hex << it->id().rawId() << std::dec << " Sim ("
340  << std::get<0>(itr->second) << ", " << std::get<1>(itr->second) << ", "
341  << std::get<2>(itr->second) << ", " << std::get<3>(itr->second) << ") Rec ("
342  << energy << ", " << xyz.x() << ", " << xyz.y() << ", " << xyz.z() << ")";
343 #endif
344  }
345  }
346  } else {
347  edm::LogVerbatim("HGCalValid") << "No EE RecHit Found ";
348  }
349 
350  //accessing FH Rechit information
352  iEvent.getByToken(fhRecHitToken_, fhRecHit);
353  if (fhRecHit.isValid()) {
354  const HGChefRecHitCollection* theHits = (fhRecHit.product());
355  for (auto it = theHits->begin(); it != theHits->end(); ++it) {
356  double energy = it->energy();
357  hefEnRec->Fill(energy);
358  std::map<unsigned int, HGCHitTuple>::const_iterator itr = fhHitRefs.find(it->id().rawId());
359  if (itr != fhHitRefs.end()) {
360  GlobalPoint xyz = hgcGeometry_[1]->getPosition(it->id());
361 
362  hefRecVsSimX->Fill(std::get<1>(itr->second), xyz.x());
363  hefRecVsSimY->Fill(std::get<2>(itr->second), xyz.y());
364  hefRecVsSimZ->Fill(std::get<3>(itr->second), xyz.z());
365  hefdxVsX->Fill(std::get<1>(itr->second), (xyz.x() - std::get<1>(itr->second)));
366  hefdyVsY->Fill(std::get<2>(itr->second), (xyz.y() - std::get<2>(itr->second)));
367  hefdzVsZ->Fill(std::get<3>(itr->second), (xyz.z() - std::get<3>(itr->second)));
368  hefEnSimRec->Fill(std::get<0>(itr->second), energy);
369 #ifdef EDM_ML_DEBUG
370  edm::LogInfo("HGCalValid") << "FHHit: " << std::hex << it->id().rawId() << std::dec << " Sim ("
371  << std::get<0>(itr->second) << ", " << std::get<1>(itr->second) << ", "
372  << std::get<2>(itr->second) << ", " << std::get<3>(itr->second) << ") Rec ("
373  << energy << "," << xyz.x() << ", " << xyz.y() << ", " << xyz.z() << ")";
374 #endif
375  }
376  }
377  } else {
378  edm::LogVerbatim("HGCalValid") << "No FH RecHit Found ";
379  }
380 
381  //accessing BH Rechit information
382  if (ifHCAL_) {
384  iEvent.getByToken(bhRecHitTokenh_, bhRecHit);
385  if (bhRecHit.isValid()) {
386  const HBHERecHitCollection* theHits = (bhRecHit.product());
387  analyzeHGCalRecHit(theHits, bhHitRefs);
388  } else {
389  edm::LogVerbatim("HGCalValid") << "No BH RecHit Found ";
390  }
391  } else {
393  iEvent.getByToken(bhRecHitTokeng_, bhRecHit);
394  if (bhRecHit.isValid()) {
395  const HGChebRecHitCollection* theHits = (bhRecHit.product());
396  analyzeHGCalRecHit(theHits, bhHitRefs);
397  } else {
398  edm::LogVerbatim("HGCalValid") << "No BH RecHit Found ";
399  }
400  }
401 }
402 
403 void HGCalHitValidation::analyzeHGCalSimHit(edm::Handle<std::vector<PCaloHit>> const& simHits,
404  int idet,
406  std::map<unsigned int, HGCHitTuple>& hitRefs) {
407  const HGCalTopology& hTopo = hgcGeometry_[idet]->topology();
408  for (std::vector<PCaloHit>::const_iterator simHit = simHits->begin(); simHit != simHits->end(); ++simHit) {
409  int subdet, zside, layer, wafer, celltype, cell;
410  HGCalTestNumbering::unpackHexagonIndex(simHit->id(), subdet, zside, layer, wafer, celltype, cell);
411  std::pair<float, float> xy = hgcCons_[idet]->locateCell(cell, layer, wafer, false);
412  float zp = hgcCons_[idet]->waferZ(layer, false);
413  if (zside < 0)
414  zp = -zp;
415  float xp = (zp < 0) ? -xy.first / 10 : xy.first / 10;
416  float yp = xy.second / 10.0;
417 
418  //skip this hit if after ganging it is not valid
419  std::pair<int, int> recoLayerCell = hgcCons_[idet]->simToReco(cell, layer, wafer, hTopo.detectorType());
420  cell = recoLayerCell.first;
421  layer = recoLayerCell.second;
422 
423  //skip this hit if after ganging it is not valid
424  if (layer < 0 || cell < 0) {
425  } else {
426  //assign the RECO DetId
427  HGCalDetId id = HGCalDetId((ForwardSubdetector)(subdet), zside, layer, celltype, wafer, cell);
428  float energy = simHit->energy();
429 
430  float energySum(energy);
431  if (hitRefs.count(id.rawId()) != 0)
432  energySum += std::get<0>(hitRefs[id.rawId()]);
433  hitRefs[id.rawId()] = std::make_tuple(energySum, xp, yp, zp);
434  hist->Fill(energy);
435  }
436  }
437 }
438 
439 template <class T1>
440 void HGCalHitValidation::analyzeHGCalRecHit(T1 const& theHits, std::map<unsigned int, HGCHitTuple> const& hitRefs) {
441  for (auto it = theHits->begin(); it != theHits->end(); ++it) {
442  DetId id = it->id();
443  if (id.det() == DetId::Hcal and id.subdetId() == (int)(HcalEndcap)) {
444  double energy = it->energy();
445  hebEnRec->Fill(energy);
446  GlobalPoint xyz = hcGeometry_->getGeometry(id)->getPosition();
447 
448  std::map<unsigned int, HGCHitTuple>::const_iterator itr = hitRefs.find(id.rawId());
449  if (itr != hitRefs.end()) {
450  float ang3 = xyz.phi().value(); // returns the phi in radians
451  double fac = sinh(std::get<1>(itr->second));
452  double pT = std::get<3>(itr->second) / fac;
453  double xp = pT * cos(std::get<2>(itr->second));
454  double yp = pT * sin(std::get<2>(itr->second));
455  hebRecVsSimX->Fill(xp, xyz.x());
456  hebRecVsSimY->Fill(yp, xyz.y());
457  hebRecVsSimZ->Fill(std::get<3>(itr->second), xyz.z());
458  hebdEtaVsEta->Fill(std::get<1>(itr->second), (xyz.eta() - std::get<1>(itr->second)));
459  hebdPhiVsPhi->Fill(std::get<2>(itr->second), (ang3 - std::get<2>(itr->second)));
460  hebdzVsZ->Fill(std::get<3>(itr->second), (xyz.z() - std::get<3>(itr->second)));
461  hebEnSimRec->Fill(std::get<0>(itr->second), energy);
462 
463 #ifdef EDM_ML_DEBUG
464  edm::LogInfo("HGCalValid") << "BHHit: " << std::hex << id.rawId() << std::dec << " Sim ("
465  << std::get<0>(itr->second) << ", " << std::get<1>(itr->second) << ", "
466  << std::get<2>(itr->second) << ", " << std::get<3>(itr->second) << ") Rec ("
467  << energy << ", " << xyz.x() << ", " << xyz.y() << ", " << xyz.z() << ")\n";
468 #endif
469  }
470  }
471  }
472 }
473 
474 //define this as a plug-in
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
Definition: DQMStore.cc:239
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
edm::EDGetTokenT< std::vector< PCaloHit > > fhSimHitToken_
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hebRecVsSimX
MonitorElement * hefRecVsSimY
MonitorElement * hefRecVsSimX
edm::InputTag bhSimHitSource
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * hebRecVsSimY
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:418
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T y() const
Definition: PV3DBase.h:60
T1 value() const
Explicit access to value in case implicit conversion not OK.
Definition: Phi.h:75
MonitorElement * hefEnSimRec
MonitorElement * heedzVsZ
bool detectorType() const
int zside(DetId const &)
MonitorElement * heeRecVsSimX
HcalCellType::HcalCell cell(const int &det, const int &zside, const int &depth, const int &etaR, const int &iphi) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
ForwardSubdetector
std::vector< const HGCalDDDConstants * > hgcCons_
MonitorElement * heeRecVsSimZ
const HcalDDDSimConstants * hcCons_
MonitorElement * heeRecVsSimY
MonitorElement * heeEnRec
std::vector< const HGCalGeometry * > hgcGeometry_
MonitorElement * hebEnRec
edm::EDGetTokenT< HGCeeRecHitCollection > eeRecHitToken_
void Fill(long long x)
edm::EDGetTokenT< std::vector< PCaloHit > > eeSimHitToken_
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void addDefault(ParameterSetDescription const &psetDescription)
MonitorElement * hebEnSim
MonitorElement * hefdyVsY
MonitorElement * heeEnSimRec
void analyzeHGCalRecHit(T1 const &theHits, std::map< unsigned int, HGCHitTuple > const &hitRefs)
std::vector< int > ietaExcludeBH_
MonitorElement * hefEnSim
HcalID getHCID(int subdet, int ieta, int iphi, int lay, int idepth) const
T z() const
Definition: PV3DBase.h:61
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
MonitorElement * hebRecVsSimZ
std::vector< std::string > geometrySource_
MonitorElement * hefEnRec
const CaloSubdetectorGeometry * hcGeometry_
MonitorElement * heedxVsX
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * heeEnSim
edm::EDGetTokenT< std::vector< PCaloHit > > bhSimHitToken_
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< HBHERecHitCollection > bhRecHitTokenh_
MonitorElement * hebdPhiVsPhi
edm::InputTag fhSimHitSource
#define M_PI
const_iterator end() const
MonitorElement * hebEnSimRec
Definition: DetId.h:17
edm::InputTag eeSimHitSource
HGCalHitValidation(const edm::ParameterSet &)
MonitorElement * hefdxVsX
T const * product() const
Definition: Handle.h:69
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T eta() const
Definition: PV3DBase.h:73
const HcalDDDRecConstants * hcConr_
edm::EDGetTokenT< HGChebRecHitCollection > bhRecHitTokeng_
void analyzeHGCalSimHit(edm::Handle< std::vector< PCaloHit >> const &simHits, int idet, MonitorElement *hist, std::map< unsigned int, HGCHitTuple > &)
MonitorElement * hefRecVsSimZ
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Definition: DQMStore.cc:266
T get() const
Definition: EventSetup.h:73
std::tuple< float, float, float, float > HGCHitTuple
MonitorElement * hefdzVsZ
double energySum(const DataFrame &df, int fs, int ls)
bool isValid() const
Definition: ESHandle.h:44
MonitorElement * hebdzVsZ
T x() const
Definition: PV3DBase.h:59
T const * product() const
Definition: ESHandle.h:86
MonitorElement * heedyVsY
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
const_iterator begin() const
Definition: Run.h:45
MonitorElement * hebdEtaVsEta
edm::EDGetTokenT< HGChefRecHitCollection > fhRecHitToken_