CMS 3D CMS Logo

HGCalSimHitValidation.cc
Go to the documentation of this file.
1 // system include files
2 #include <cmath>
3 #include <iostream>
4 #include <fstream>
5 #include <vector>
6 #include <map>
7 #include <string>
8 
14 
21 
24 
35 
42 
47 
48 #include "CLHEP/Geometry/Point3D.h"
49 #include "CLHEP/Geometry/Transform3D.h"
50 #include "CLHEP/Geometry/Vector3D.h"
51 #include "CLHEP/Units/GlobalSystemOfUnits.h"
52 #include "CLHEP/Units/GlobalPhysicalConstants.h"
53 
55 
56 public:
57 
58  struct energysum{
59  energysum() {etotal=0; for (int i=0; i<6; ++i) eTime[i] = 0.;}
60  double eTime[6], etotal;
61  };
62 
63  struct hitsinfo{
65  x=y=z=phi=eta=0.0;
66  cell=cell2=sector=sector2=type=layer=0;
67  }
68  double x, y, z, phi, eta;
69  int cell, cell2, sector, sector2, type, layer;
70  };
71 
72 
74  ~HGCalSimHitValidation() override {}
75 
76  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
77 
78 protected:
79 
80  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
81  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
82  void analyze(const edm::Event&, const edm::EventSetup&) override;
83 
84 private:
85 
86  void analyzeHits (std::vector<PCaloHit>& hits);
87  void fillOccupancyMap(std::map<int, int>& OccupancyMap, int layer);
88  void fillHitsInfo(std::pair<hitsinfo,energysum> hit_, unsigned int itimeslice, double esum);
90 
91  // ----------member data ---------------------------
95  std::vector<double> times_;
100  unsigned int layers_;
102  std::map<uint32_t, HepGeom::Transform3D> transMap_;
103 
104  std::vector<MonitorElement*> HitOccupancy_Plus_, HitOccupancy_Minus_;
105  std::vector<MonitorElement*> EtaPhi_Plus_, EtaPhi_Minus_;
107  static const unsigned int maxTime_=6;
108  std::vector<MonitorElement*> energy_[maxTime_];
109  unsigned int nTimes_;
110 };
111 
113  nameDetector_(iConfig.getParameter<std::string>("DetectorName")),
114  caloHitSource_(iConfig.getParameter<std::string>("CaloHitSource")),
115  times_(iConfig.getParameter<std::vector<double> >("TimeSlices")),
116  verbosity_(iConfig.getUntrackedParameter<int>("Verbosity",0)),
117  testNumber_(iConfig.getUntrackedParameter<bool>("TestNumber",true)),
118  symmDet_(true), firstLayer_(1) {
119 
120  heRebuild_ = (nameDetector_ == "HCal") ? true : false;
121  tok_hepMC_ = consumes<edm::HepMCProduct>(edm::InputTag("generatorSmeared"));
122  tok_hits_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",caloHitSource_));
123  nTimes_ = (times_.size() > maxTime_) ? maxTime_ : times_.size();
124 }
125 
128  std::vector<double> times = {25.0,1000.0};
129  desc.add<std::string>("DetectorName","HGCalEESensitive");
130  desc.add<std::string>("CaloHitSource","HGCHitsEE");
131  desc.add<std::vector<double> >("TimeSlices",times);
132  desc.addUntracked<int>("Verbosity",0);
133  desc.addUntracked<bool>("TestNumber",true);
134  descriptions.add("hgcalSimHitValidationEE",desc);
135 }
136 
138  const edm::EventSetup& iSetup) {
139 
140  //Generator input
141  if (verbosity_ > 0) {
143  iEvent.getByToken(tok_hepMC_,evtMC);
144  if (!evtMC.isValid()) {
145  edm::LogVerbatim("HGCalValidation") << "no HepMCProduct found";
146  } else {
147  const HepMC::GenEvent * myGenEvent = evtMC->GetEvent();
148  unsigned int k(0);
149  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin();
150  p != myGenEvent->particles_end(); ++p, ++k) {
151  edm::LogVerbatim("HGCalValidation") << "Particle[" << k << "] with pt "
152  << (*p)->momentum().perp()
153  << " eta "
154  << (*p)->momentum().eta()
155  << " phi "
156  << (*p)->momentum().phi();
157  }
158  }
159  }
160 
161  //Now the hits
162  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
163  iEvent.getByToken(tok_hits_, theCaloHitContainers);
164  if (theCaloHitContainers.isValid()) {
165  if (verbosity_>0)
166  edm::LogVerbatim("HGCalValidation") << " PcalohitItr = "
167  << theCaloHitContainers->size();
168  std::vector<PCaloHit> caloHits;
169  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
170  theCaloHitContainers->end());
171  if (heRebuild_ && testNumber_) {
172  for (unsigned int i=0; i<caloHits.size(); ++i) {
173  unsigned int id_ = caloHits[i].id();
175  if (hid.subdet()!=int(HcalEndcap))
176  hid = HcalDetId(HcalEmpty,hid.ieta(),hid.iphi(),hid.depth());
177  caloHits[i].setID(hid.rawId());
178  if (verbosity_>0)
179  edm::LogVerbatim("HGCalValidation") << "Hit[" << i << "] " << hid;
180  }
181  }
182  analyzeHits(caloHits);
183  } else if (verbosity_>0) {
184  edm::LogVerbatim("HGCalValidation") << "PCaloHitContainer does not exist!";
185  }
186 }
187 
188 void HGCalSimHitValidation::analyzeHits (std::vector<PCaloHit>& hits) {
189 
190  std::map<int, int> OccupancyMap_plus, OccupancyMap_minus;
191  OccupancyMap_plus.clear(); OccupancyMap_minus.clear();
192 
193  std::map<uint32_t,std::pair<hitsinfo,energysum> > map_hits;
194  map_hits.clear();
195 
196  if (verbosity_ > 0)
197  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with "
198  << hits.size() << " PcaloHit elements";
199  unsigned int nused(0);
200  for (unsigned int i=0; i<hits.size(); i++) {
201  double energy = hits[i].energy();
202  double time = hits[i].time();
203  uint32_t id_ = hits[i].id();
204  int cell, sector, subsector(0), layer, zside;
205  int subdet(0), cell2(0), type(0);
206  if (heRebuild_) {
207  HcalDetId detId = HcalDetId(id_);
208  subdet = detId.subdet();
209  if (subdet != static_cast<int>(HcalEndcap)) continue;
210  cell = detId.ietaAbs();
211  sector = detId.iphi();
212  subsector = 1;
213  layer = detId.depth();
214  zside = detId.zside();
215  } else if ((hgcons_->geomMode() == HGCalGeometryMode::Hexagon8) ||
217  HGCSiliconDetId detId = HGCSiliconDetId(id_);
218  subdet = ForwardEmpty;
219  cell = detId.cellU();
220  cell2 = detId.cellV();
221  sector = detId.waferU();
222  subsector = detId.waferV();
223  type = detId.type();
224  layer = detId.layer();
225  zside = detId.zside();
226  } else if (hgcons_->geomMode() == HGCalGeometryMode::Square) {
227  HGCalTestNumbering::unpackSquareIndex(id_, zside, layer, sector, subsector, cell);
228  } else if (hgcons_->geomMode() == HGCalGeometryMode::Trapezoid) {
230  subdet = ForwardEmpty;
231  sector = detId.ietaAbs();
232  cell = detId.iphi();
233  subsector = 1;
234  type = detId.type();
235  layer = detId.layer();
236  zside = detId.zside();
237  } else {
238  HGCalTestNumbering::unpackHexagonIndex(id_, subdet, zside, layer, sector, type, cell);
239  }
240  nused++;
241  if (verbosity_>1)
242  edm::LogVerbatim("HGCalValidation") << "Detector " << nameDetector_
243  << " zside = " << zside
244  << " sector|wafer = " << sector
245  << ":" << subsector
246  << " type = " << type
247  << " layer = " << layer
248  << " cell = " << cell
249  << ":" << cell2
250  << " energy = " << energy
251  << " energyem = " << hits[i].energyEM()
252  << " energyhad = " << hits[i].energyHad()
253  << " time = " << time;
254 
255  HepGeom::Point3D<float> gcoord;
256  if (heRebuild_) {
257  std::pair<double,double> etaphi = hcons_->getEtaPhi(subdet,zside*cell,
258  sector);
259  double rz = hcons_->getRZ(subdet,zside*cell,layer);
260  if (verbosity_>2)
261  edm::LogVerbatim("HGCalValidation") << "i/p " << subdet << ":"
262  << zside << ":" << cell << ":"
263  << sector << ":" << layer <<" o/p "
264  << etaphi.first << ":"
265  << etaphi.second << ":" << rz;
266  gcoord = HepGeom::Point3D<float>(rz*cos(etaphi.second)/cosh(etaphi.first),
267  rz*sin(etaphi.second)/cosh(etaphi.first),
268  rz*tanh(etaphi.first));
269  } else if (hgcons_->geomMode() == HGCalGeometryMode::Square) {
270  std::pair<float,float> xy = hgcons_->locateCell(cell,layer,subsector,false);
271  const HepGeom::Point3D<float> lcoord(xy.first,xy.second,0);
272  int subs = (symmDet_ ? 0 : subsector);
273  id_ = HGCalTestNumbering::packSquareIndex(zside,layer,sector,subs,0);
274  gcoord = (transMap_[id_]*lcoord);
275  } else {
276  std::pair<float,float> xy;
279  xy = hgcons_->locateCell(layer,sector,subsector,cell,cell2,false,true);
280  } else if (hgcons_->geomMode() == HGCalGeometryMode::Trapezoid) {
281  xy = hgcons_->locateCellTrap(layer,sector,cell,false);
282  } else {
283  xy = hgcons_->locateCell(cell,layer,sector,false);
284  }
285  double zp = hgcons_->waferZ(layer,false);
286  if (zside < 0) zp = -zp;
287  float xp = (zp < 0) ? -xy.first : xy.first;
288  gcoord = HepGeom::Point3D<float>(xp,xy.second,zp);
289  }
290  double tof = (gcoord.mag()*CLHEP::mm)/CLHEP::c_light;
291  if (verbosity_>1)
292  edm::LogVerbatim("HGCalValidation") << std::hex << id_ << std::dec
293  << " global coordinate " << gcoord
294  << " time " << time << ":" << tof;
295  time -= tof;
296 
297  energysum esum;
298  hitsinfo hinfo;
299  if (map_hits.count(id_) != 0) {
300  hinfo = map_hits[id_].first;
301  esum = map_hits[id_].second;
302  } else {
303  hinfo.x = gcoord.x();
304  hinfo.y = gcoord.y();
305  hinfo.z = gcoord.z();
306  hinfo.sector = sector;
307  hinfo.sector2= subsector;
308  hinfo.cell = cell;
309  hinfo.cell2 = cell;
310  hinfo.type = type;
311  hinfo.layer = layer-firstLayer_;
312  hinfo.phi = gcoord.getPhi();
313  hinfo.eta = gcoord.getEta();
314  }
315  esum.etotal += energy;
316  for (unsigned int k=0; k<nTimes_; ++k) {
317  if (time > 0 && time < times_[k]) esum.eTime[k] += energy;
318  }
319 
320  if (verbosity_>1)
321  edm::LogVerbatim("HGCalValidation") << " ----------------------- gx = "
322  << hinfo.x << " gy = " << hinfo.y
323  << " gz = " << hinfo.z << " phi = "
324  << hinfo.phi << " eta = "
325  << hinfo.eta;
326  map_hits[id_] = std::pair<hitsinfo,energysum>(hinfo,esum);
327  }
328  if (verbosity_>0)
329  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with "
330  << map_hits.size()
331  << " detector elements being hit";
332 
333  std::map<uint32_t,std::pair<hitsinfo,energysum> >::iterator itr;
334  for (itr = map_hits.begin() ; itr != map_hits.end(); ++itr) {
335  hitsinfo hinfo = (*itr).second.first;
336  energysum esum = (*itr).second.second;
337  int layer = hinfo.layer;
338  double eta = hinfo.eta;
339 
340  for (unsigned int itimeslice = 0; itimeslice < nTimes_; itimeslice++ ) {
341  fillHitsInfo((*itr).second, itimeslice, esum.eTime[itimeslice]);
342  }
343 
344  if (eta > 0.0) fillOccupancyMap(OccupancyMap_plus, layer);
345  else fillOccupancyMap(OccupancyMap_minus,layer);
346  }
347  if (verbosity_ > 0)
348  edm::LogVerbatim("HGCalValidation") << "With map:used:total "
349  << hits.size() << "|" << nused << "|"
350  << map_hits.size() << " hits";
351 
352  for (auto const & itr : OccupancyMap_plus) {
353  int layer = itr.first;
354  int occupancy = itr.second;
355  HitOccupancy_Plus_.at(layer)->Fill(occupancy);
356  }
357  for (auto const & itr : OccupancyMap_minus) {
358  int layer = itr.first;
359  int occupancy = itr.second;
360  HitOccupancy_Minus_.at(layer)->Fill(occupancy);
361  }
362 }
363 
364 void HGCalSimHitValidation::fillOccupancyMap(std::map<int, int>& OccupancyMap,
365  int layer) {
366  if (OccupancyMap.find(layer) != OccupancyMap.end()) {
367  ++OccupancyMap[layer];
368  } else {
369  OccupancyMap[layer] = 1;
370  }
371 }
372 
373 void HGCalSimHitValidation::fillHitsInfo(std::pair<hitsinfo,energysum> hits,
374  unsigned int itimeslice, double esum){
375 
376  unsigned int ilayer = hits.first.layer;
377  if (ilayer < layers_) {
378  energy_[itimeslice].at(ilayer)->Fill(esum);
379  if (itimeslice==0) {
380  EtaPhi_Plus_.at(ilayer) ->Fill(hits.first.eta , hits.first.phi);
381  EtaPhi_Minus_.at(ilayer)->Fill(hits.first.eta , hits.first.phi);
382  }
383  } else {
384  if (verbosity_>0)
385  edm::LogVerbatim("HGCalValidation") << "Problematic Hit for "
386  << nameDetector_ << " at sector "
387  << hits.first.sector << ":"
388  << hits.first.sector2 << " layer "
389  << hits.first.layer << " cell "
390  << hits.first.cell << ":"
391  << hits.first.cell2 << " energy "
392  << hits.second.etotal;
393  }
394 }
395 
397  if (verbosity_>0)
398  edm::LogVerbatim("HGCalValidation") << "Initialize HGCalDDDConstants for "
399  << nameDetector_ << " : " << hgcons_;
400 
401  if (hgcons_->geomMode() == HGCalGeometryMode::Square) {
402  const DDCompactView & cview = *ddViewH;
403  std::string attribute = "Volume";
405 
406  DDSpecificsMatchesValueFilter filter{DDValue(attribute, value, 0)};
407  DDFilteredView fv(cview,filter);
408  bool dodet = fv.firstChild();
409 
410  while (dodet) {
411  const DDSolid & sol = fv.logicalPart().solid();
412  const std::string & name = sol.name().fullname();
413  int isd = (name.find(nameDetector_) == std::string::npos) ? -1 : 1;
414  if (isd > 0) {
415  std::vector<int> copy = fv.copyNumbers();
416  int nsiz = (int)(copy.size());
417  int lay = (nsiz > 0) ? copy[nsiz-1] : -1;
418  int sec = (nsiz > 1) ? copy[nsiz-2] : -1;
419  int zp = (nsiz > 3) ? copy[nsiz-4] : -1;
420  if (zp !=1 ) zp = -1;
421  const DDTrap & trp = static_cast<DDTrap>(sol);
422  int subs = (trp.alpha1()>0 ? 1 : 0);
423  symmDet_ = (trp.alpha1()==0 ? true : false);
424  uint32_t id = HGCalTestNumbering::packSquareIndex(zp,lay,sec,subs,0);
425  DD3Vector x, y, z;
426  fv.rotation().GetComponents( x, y, z ) ;
427  const CLHEP::HepRep3x3 rotation ( x.X(), y.X(), z.X(),
428  x.Y(), y.Y(), z.Y(),
429  x.Z(), y.Z(), z.Z() );
430  const CLHEP::HepRotation hr ( rotation );
431  const CLHEP::Hep3Vector h3v ( fv.translation().X(),
432  fv.translation().Y(),
433  fv.translation().Z() ) ;
434  const HepGeom::Transform3D ht3d (hr, h3v);
435  transMap_.insert(std::make_pair(id,ht3d));
436  if (verbosity_>2)
437  edm::LogVerbatim("HGCalValidation") << HGCalDetId(id)
438  << " Transform using " << h3v
439  << " and " << hr;
440  }
441  dodet = fv.next();
442  }
443  if (verbosity_>0)
444  edm::LogVerbatim("HGCalValidation") << "Finds " << transMap_.size()
445  << " elements and SymmDet_ = "
446  << symmDet_;
447  }
448  return true;
449 }
450 
451 // ------------ method called when starting to processes a run ------------
453  const edm::EventSetup& iSetup) {
454  if (heRebuild_) {
456  iSetup.get<HcalRecNumberingRecord>().get( pHRNDC );
457  hcons_ = &(*pHRNDC);
458  layers_ = hcons_->getMaxDepth(1);
459  } else {
461  iSetup.get<IdealGeometryRecord>().get(nameDetector_, pHGDC);
462  hgcons_ = &(*pHGDC);
463  layers_ = hgcons_->layers(false);
466  iSetup.get<IdealGeometryRecord>().get( pDD );
467  defineGeometry(pDD);
468  }
469  if (verbosity_>0)
470  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " defined with "
471  << layers_ << " Layers with first at "
472  << firstLayer_;
473 }
474 
476  edm::Run const&,
477  edm::EventSetup const&) {
478 
479  iB.setCurrentFolder("HGCAL/HGCalSimHitsV/"+nameDetector_);
480 
481  std::ostringstream histoname;
482  for (unsigned int il=0; il < layers_; ++il) {
483  int ilayer = firstLayer_ + (int)(il);
484  histoname.str(""); histoname << "HitOccupancy_Plus_layer_" << ilayer;
485  HitOccupancy_Plus_.push_back(iB.book1D(histoname.str().c_str(), "HitOccupancy_Plus", 501, -0.5, 500.5));
486  histoname.str(""); histoname << "HitOccupancy_Minus_layer_" << ilayer;
487  HitOccupancy_Minus_.push_back(iB.book1D(histoname.str().c_str(), "HitOccupancy_Minus", 501, -0.5, 500.5));
488 
489  histoname.str(""); histoname << "EtaPhi_Plus_" << "layer_" << ilayer;
490  EtaPhi_Plus_.push_back(iB.book2D(histoname.str().c_str(), "Occupancy", 31, 1.45, 3.0, 72, -CLHEP::pi, CLHEP::pi));
491  histoname.str(""); histoname << "EtaPhi_Minus_" << "layer_" << ilayer;
492  EtaPhi_Minus_.push_back(iB.book2D(histoname.str().c_str(), "Occupancy", 31, -3.0, -1.45, 72, -CLHEP::pi, CLHEP::pi));
493 
494  for (unsigned int itimeslice = 0; itimeslice < nTimes_ ; itimeslice++ ) {
495  histoname.str(""); histoname << "energy_time_"<< itimeslice << "_layer_" << ilayer;
496  energy_[itimeslice].push_back(iB.book1D(histoname.str().c_str(),"energy_",100,0,0.1));
497  }
498  }
499 
500  MeanHitOccupancy_Plus_ = iB.book1D("MeanHitOccupancy_Plus", "MeanHitOccupancy_Plus", layers_, 0.5, layers_ + 0.5);
501  MeanHitOccupancy_Minus_ = iB.book1D("MeanHitOccupancy_Minus", "MeanHitOccupancy_Minus", layers_, 0.5, layers_ + 0.5);
502 }
503 
505 //define this as a plug-in
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * MeanHitOccupancy_Plus_
type
Definition: HCALResponse.h:21
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:74
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
std::pair< double, double > getEtaPhi(const int &subdet, const int &ieta, const int &iphi) const
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::vector< MonitorElement * > HitOccupancy_Plus_
void analyze(const edm::Event &, const edm::EventSetup &) override
def copy(args, dbName)
ProductID id() const
Definition: HandleBase.cc:15
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
nav_type copyNumbers() const
return the stack of copy numbers
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:149
int waferU() const
int cellV() const
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
int type() const
get the type
void analyzeHits(std::vector< PCaloHit > &hits)
int zside() const
get the z-side of the cell (1/-1)
int zside(DetId const &)
std::vector< MonitorElement * > HitOccupancy_Minus_
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
int cellU() const
get the cell #&#39;s in u,v or in x,y
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
MonitorElement * MeanHitOccupancy_Minus_
const Double_t pi
bool defineGeometry(edm::ESTransientHandle< DDCompactView > &ddViewH)
int depth() const
get the tower depth
Definition: HcalDetId.h:166
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
unsigned int layers(bool reco) const
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
Definition: DDTranslation.h:6
bool next()
set current node to the next node in the filtered tree
const HcalDDDRecConstants * hcons_
int type() const
get the type
susybsm::HSCParticleRef hr
Definition: classes.h:26
int layer() const
get the layer #
std::pair< float, float > locateCellTrap(int lay, int ieta, int iphi, bool reco) const
double getRZ(const int &subdet, const int &ieta, const int &depth) const
int waferV() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static const unsigned int maxTime_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
int ieta() const
get the cell ieta
Definition: HcalDetId.h:159
const std::string fullname() const
Definition: DDName.h:43
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
Interface to a Trapezoid.
Definition: DDSolid.h:78
std::pair< T, T > etaphi(T x, T y, T z)
Definition: FastMath.h:128
int iphi() const
get the phi index
HGCalGeometryMode::GeometryMode geomMode() const
Definition: value.py:1
std::vector< MonitorElement * > EtaPhi_Plus_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isValid() const
Definition: HandleBase.h:74
HGCalSimHitValidation(const edm::ParameterSet &)
double waferZ(int layer, bool reco) const
int k[5][pyjets_maxn]
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:154
int iphi() const
get the cell iphi
Definition: HcalDetId.h:161
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:38
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
int getMaxDepth(const int &type) const
static void unpackSquareIndex(const uint32_t &idx, int &z, int &lay, int &sec, int &subsec, int &cell)
double alpha1(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy1 to the centre at y=+pDy1 of t...
Definition: DDSolid.cc:177
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< MonitorElement * > energy_[maxTime_]
int layer() const
get the layer #
int zside() const
get the z-side of the cell (1/-1)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
T get() const
Definition: EventSetup.h:71
std::map< uint32_t, HepGeom::Transform3D > transMap_
bool firstChild()
set the current node to the first child ...
const HGCalDDDConstants * hgcons_
int firstLayer() const
std::vector< MonitorElement * > EtaPhi_Minus_
const DDTranslation & translation() const
The absolute translation of the current node.
DetId relabel(const uint32_t testId) const
static uint32_t packSquareIndex(int z, int lay, int sec, int subsec, int cell)
void fillHitsInfo(std::pair< hitsinfo, energysum > hit_, unsigned int itimeslice, double esum)
std::vector< double > times_
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
Definition: Run.h:45