CMS 3D CMS Logo

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