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
142  iEvent.getByToken(tok_hepMC_,evtMC);
143  if (!evtMC.isValid()) {
144  edm::LogVerbatim("HGCalValidation") << "no HepMCProduct found";
145  } else {
146  const HepMC::GenEvent * myGenEvent = evtMC->GetEvent();
147  unsigned int k(0);
148  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin();
149  p != myGenEvent->particles_end(); ++p, ++k) {
150  edm::LogVerbatim("HGCalValidation") << "Particle[" << k << "] with pt "
151  << (*p)->momentum().perp() << " eta "
152  << (*p)->momentum().eta() << " phi "
153  << (*p)->momentum().phi();
154  }
155  }
156 
157  //Now the hits
158  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
159  iEvent.getByToken(tok_hits_, theCaloHitContainers);
160  if (theCaloHitContainers.isValid()) {
161  if (verbosity_>0)
162  edm::LogVerbatim("HGCalValidation") << " PcalohitItr = "
163  << theCaloHitContainers->size();
164  std::vector<PCaloHit> caloHits;
165  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
166  theCaloHitContainers->end());
167  if (heRebuild_ && testNumber_) {
168  for (unsigned int i=0; i<caloHits.size(); ++i) {
169  unsigned int id_ = caloHits[i].id();
171  if (hid.subdet()!=int(HcalEndcap))
172  hid = HcalDetId(HcalEmpty,hid.ieta(),hid.iphi(),hid.depth());
173  caloHits[i].setID(hid.rawId());
174  if (verbosity_>0)
175  edm::LogVerbatim("HGCalValidation") << "Hit[" << i << "] " << hid;
176  }
177  }
178  analyzeHits(caloHits);
179  } else if (verbosity_>0) {
180  edm::LogVerbatim("HGCalValidation") << "PCaloHitContainer does not exist!";
181  }
182 }
183 
184 void HGCalSimHitValidation::analyzeHits (std::vector<PCaloHit>& hits) {
185 
186  std::map<int, int> OccupancyMap_plus, OccupancyMap_minus;
187  OccupancyMap_plus.clear(); OccupancyMap_minus.clear();
188 
189  std::map<uint32_t,std::pair<hitsinfo,energysum> > map_hits;
190  map_hits.clear();
191 
192  if (verbosity_ > 0)
193  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with "
194  << hits.size() << " PcaloHit elements";
195  unsigned int nused(0);
196  for (unsigned int i=0; i<hits.size(); i++) {
197  double energy = hits[i].energy();
198  double time = hits[i].time();
199  uint32_t id_ = hits[i].id();
200  int cell, sector, subsector(0), layer, zside;
201  int subdet(0), cell2(0), type(0);
202  if (heRebuild_) {
203  HcalDetId detId = HcalDetId(id_);
204  subdet = detId.subdet();
205  if (subdet != static_cast<int>(HcalEndcap)) continue;
206  cell = detId.ietaAbs();
207  sector = detId.iphi();
208  subsector = 1;
209  layer = detId.depth();
210  zside = detId.zside();
211  } else if ((hgcons_->geomMode() == HGCalGeometryMode::Hexagon8) ||
213  HGCSiliconDetId detId = HGCSiliconDetId(id_);
214  subdet = ForwardEmpty;
215  cell = detId.cellU();
216  cell2 = detId.cellV();
217  sector = detId.waferU();
218  subsector = detId.waferV();
219  type = detId.type();
220  layer = detId.layer();
221  zside = detId.zside();
222  } else if (hgcons_->geomMode() == HGCalGeometryMode::Square) {
223  HGCalTestNumbering::unpackSquareIndex(id_, zside, layer, sector, subsector, cell);
224  } else if (hgcons_->geomMode() == HGCalGeometryMode::Trapezoid) {
226  subdet = ForwardEmpty;
227  cell = detId.ietaAbs();
228  sector = detId.iphi();
229  subsector = 1;
230  type = detId.type();
231  layer = detId.layer();
232  zside = detId.zside();
233  } else {
234  HGCalTestNumbering::unpackHexagonIndex(id_, subdet, zside, layer, sector, type, cell);
235  }
236  nused++;
237  if (verbosity_>1)
238  edm::LogVerbatim("HGCalValidation") << "Detector " << nameDetector_
239  << " zside = " << zside
240  << " sector|wafer = " << sector
241  << ":" << subsector
242  << " type = " << type
243  << " layer = " << layer
244  << " cell = " << cell
245  << ":" << cell2
246  << " energy = " << energy
247  << " energyem = " << hits[i].energyEM()
248  << " energyhad = " << hits[i].energyHad()
249  << " time = " << time;
250 
251  HepGeom::Point3D<float> gcoord;
252  if (heRebuild_) {
253  std::pair<double,double> etaphi = hcons_->getEtaPhi(subdet,zside*cell,
254  sector);
255  double rz = hcons_->getRZ(subdet,zside*cell,layer);
256  if (verbosity_>2)
257  edm::LogVerbatim("HGCalValidation") << "i/p " << subdet << ":"
258  << zside << ":" << cell << ":"
259  << sector << ":" << layer <<" o/p "
260  << etaphi.first << ":"
261  << etaphi.second << ":" << rz;
262  gcoord = HepGeom::Point3D<float>(rz*cos(etaphi.second)/cosh(etaphi.first),
263  rz*sin(etaphi.second)/cosh(etaphi.first),
264  rz*tanh(etaphi.first));
265  } else if (hgcons_->geomMode() == HGCalGeometryMode::Square) {
266  std::pair<float,float> xy = hgcons_->locateCell(cell,layer,subsector,false);
267  const HepGeom::Point3D<float> lcoord(xy.first,xy.second,0);
268  int subs = (symmDet_ ? 0 : subsector);
269  id_ = HGCalTestNumbering::packSquareIndex(zside,layer,sector,subs,0);
270  gcoord = (transMap_[id_]*lcoord);
271  } else {
272  std::pair<float,float> xy;
275  xy = hgcons_->locateCell(layer,sector,subsector,cell,cell2,false,true);
276  } else if (hgcons_->geomMode() == HGCalGeometryMode::Trapezoid) {
277  xy = hgcons_->locateCellTrap(layer,sector,cell,false);
278  } else {
279  xy = hgcons_->locateCell(cell,layer,sector,false);
280  }
281  double zp = hgcons_->waferZ(layer,false);
282  if (zside < 0) zp = -zp;
283  float xp = (zp < 0) ? -xy.first : xy.first;
284  gcoord = HepGeom::Point3D<float>(xp,xy.second,zp);
285  }
286  double tof = (gcoord.mag()*CLHEP::mm)/CLHEP::c_light;
287  if (verbosity_>1)
288  edm::LogVerbatim("HGCalValidation") << std::hex << id_ << std::dec
289  << " global coordinate " << gcoord
290  << " time " << time << ":" << tof;
291  time -= tof;
292 
293  energysum esum;
294  hitsinfo hinfo;
295  if (map_hits.count(id_) != 0) {
296  hinfo = map_hits[id_].first;
297  esum = map_hits[id_].second;
298  } else {
299  hinfo.x = gcoord.x();
300  hinfo.y = gcoord.y();
301  hinfo.z = gcoord.z();
302  hinfo.sector = sector;
303  hinfo.sector2= subsector;
304  hinfo.cell = cell;
305  hinfo.cell2 = cell;
306  hinfo.type = type;
307  hinfo.layer = layer-firstLayer_;
308  hinfo.phi = gcoord.getPhi();
309  hinfo.eta = gcoord.getEta();
310  }
311  esum.etotal += energy;
312  for (unsigned int k=0; k<nTimes_; ++k) {
313  if (time > 0 && time < times_[k]) esum.eTime[k] += energy;
314  }
315 
316  if (verbosity_>1)
317  edm::LogVerbatim("HGCalValidation") << " ----------------------- gx = "
318  << hinfo.x << " gy = " << hinfo.y
319  << " gz = " << hinfo.z << " phi = "
320  << hinfo.phi << " eta = "
321  << hinfo.eta;
322  map_hits[id_] = std::pair<hitsinfo,energysum>(hinfo,esum);
323  }
324  if (verbosity_>0)
325  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with "
326  << map_hits.size()
327  << " detector elements being hit";
328 
329  std::map<uint32_t,std::pair<hitsinfo,energysum> >::iterator itr;
330  for (itr = map_hits.begin() ; itr != map_hits.end(); ++itr) {
331  hitsinfo hinfo = (*itr).second.first;
332  energysum esum = (*itr).second.second;
333  int layer = hinfo.layer;
334  double eta = hinfo.eta;
335 
336  for (unsigned int itimeslice = 0; itimeslice < nTimes_; itimeslice++ ) {
337  fillHitsInfo((*itr).second, itimeslice, esum.eTime[itimeslice]);
338  }
339 
340  if (eta > 0.0) fillOccupancyMap(OccupancyMap_plus, layer);
341  else fillOccupancyMap(OccupancyMap_minus,layer);
342  }
343  edm::LogVerbatim("HGCalValidation") << "With map:used:total " << hits.size()
344  << "|" << nused << "|" << map_hits.size()
345  << " hits";
346 
347  for (auto const & itr : OccupancyMap_plus) {
348  int layer = itr.first;
349  int occupancy = itr.second;
350  HitOccupancy_Plus_.at(layer)->Fill(occupancy);
351  }
352  for (auto const & itr : OccupancyMap_minus) {
353  int layer = itr.first;
354  int occupancy = itr.second;
355  HitOccupancy_Minus_.at(layer)->Fill(occupancy);
356  }
357 }
358 
359 void HGCalSimHitValidation::fillOccupancyMap(std::map<int, int>& OccupancyMap,
360  int layer) {
361  if (OccupancyMap.find(layer) != OccupancyMap.end()) {
362  ++OccupancyMap[layer];
363  } else {
364  OccupancyMap[layer] = 1;
365  }
366 }
367 
368 void HGCalSimHitValidation::fillHitsInfo(std::pair<hitsinfo,energysum> hits,
369  unsigned int itimeslice, double esum){
370 
371  unsigned int ilayer = hits.first.layer;
372  if (ilayer < layers_) {
373  energy_[itimeslice].at(ilayer)->Fill(esum);
374  if (itimeslice==0) {
375  EtaPhi_Plus_.at(ilayer) ->Fill(hits.first.eta , hits.first.phi);
376  EtaPhi_Minus_.at(ilayer)->Fill(hits.first.eta , hits.first.phi);
377  }
378  } else {
379  if (verbosity_>0)
380  edm::LogVerbatim("HGCalValidation") << "Problematic Hit for "
381  << nameDetector_ << " at sector "
382  << hits.first.sector << ":"
383  << hits.first.sector2 << " layer "
384  << hits.first.layer << " cell "
385  << hits.first.cell << ":"
386  << hits.first.cell2 << " energy "
387  << hits.second.etotal;
388  }
389 }
390 
392  if (verbosity_>0)
393  edm::LogVerbatim("HGCalValidation") << "Initialize HGCalDDDConstants for "
394  << nameDetector_ << " : " << hgcons_;
395 
396  if (hgcons_->geomMode() == HGCalGeometryMode::Square) {
397  const DDCompactView & cview = *ddViewH;
398  std::string attribute = "Volume";
400 
401  DDSpecificsMatchesValueFilter filter{DDValue(attribute, value, 0)};
402  DDFilteredView fv(cview,filter);
403  bool dodet = fv.firstChild();
404 
405  while (dodet) {
406  const DDSolid & sol = fv.logicalPart().solid();
407  const std::string & name = sol.name().fullname();
408  int isd = (name.find(nameDetector_) == std::string::npos) ? -1 : 1;
409  if (isd > 0) {
410  std::vector<int> copy = fv.copyNumbers();
411  int nsiz = (int)(copy.size());
412  int lay = (nsiz > 0) ? copy[nsiz-1] : -1;
413  int sec = (nsiz > 1) ? copy[nsiz-2] : -1;
414  int zp = (nsiz > 3) ? copy[nsiz-4] : -1;
415  if (zp !=1 ) zp = -1;
416  const DDTrap & trp = static_cast<DDTrap>(sol);
417  int subs = (trp.alpha1()>0 ? 1 : 0);
418  symmDet_ = (trp.alpha1()==0 ? true : false);
419  uint32_t id = HGCalTestNumbering::packSquareIndex(zp,lay,sec,subs,0);
420  DD3Vector x, y, z;
421  fv.rotation().GetComponents( x, y, z ) ;
422  const CLHEP::HepRep3x3 rotation ( x.X(), y.X(), z.X(),
423  x.Y(), y.Y(), z.Y(),
424  x.Z(), y.Z(), z.Z() );
425  const CLHEP::HepRotation hr ( rotation );
426  const CLHEP::Hep3Vector h3v ( fv.translation().X(),
427  fv.translation().Y(),
428  fv.translation().Z() ) ;
429  const HepGeom::Transform3D ht3d (hr, h3v);
430  transMap_.insert(std::make_pair(id,ht3d));
431  if (verbosity_>2)
432  edm::LogVerbatim("HGCalValidation") << HGCalDetId(id)
433  << " Transform using " << h3v
434  << " and " << hr;
435  }
436  dodet = fv.next();
437  }
438  if (verbosity_>0)
439  edm::LogVerbatim("HGCalValidation") << "Finds " << transMap_.size()
440  << " elements and SymmDet_ = "
441  << symmDet_;
442  }
443  return true;
444 }
445 
446 // ------------ method called when starting to processes a run ------------
448  const edm::EventSetup& iSetup) {
449  if (heRebuild_) {
451  iSetup.get<HcalRecNumberingRecord>().get( pHRNDC );
452  hcons_ = &(*pHRNDC);
453  layers_ = hcons_->getMaxDepth(1);
454  } else {
456  iSetup.get<IdealGeometryRecord>().get(nameDetector_, pHGDC);
457  hgcons_ = &(*pHGDC);
458  layers_ = hgcons_->layers(false);
461  iSetup.get<IdealGeometryRecord>().get( pDD );
462  defineGeometry(pDD);
463  }
464  if (verbosity_>0)
465  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " defined with "
466  << layers_ << " Layers with first at "
467  << firstLayer_;
468 }
469 
471  edm::Run const&,
472  edm::EventSetup const&) {
473 
474  iB.setCurrentFolder("HGCAL/HGCalSimHitsV/"+nameDetector_);
475 
476  std::ostringstream histoname;
477  for (unsigned int il=0; il < layers_; ++il) {
478  int ilayer = firstLayer_ + (int)(il);
479  histoname.str(""); histoname << "HitOccupancy_Plus_layer_" << ilayer;
480  HitOccupancy_Plus_.push_back(iB.book1D(histoname.str().c_str(), "HitOccupancy_Plus", 501, -0.5, 500.5));
481  histoname.str(""); histoname << "HitOccupancy_Minus_layer_" << ilayer;
482  HitOccupancy_Minus_.push_back(iB.book1D(histoname.str().c_str(), "HitOccupancy_Minus", 501, -0.5, 500.5));
483 
484  histoname.str(""); histoname << "EtaPhi_Plus_" << "layer_" << ilayer;
485  EtaPhi_Plus_.push_back(iB.book2D(histoname.str().c_str(), "Occupancy", 31, 1.45, 3.0, 72, -CLHEP::pi, CLHEP::pi));
486  histoname.str(""); histoname << "EtaPhi_Minus_" << "layer_" << ilayer;
487  EtaPhi_Minus_.push_back(iB.book2D(histoname.str().c_str(), "Occupancy", 31, -3.0, -1.45, 72, -CLHEP::pi, CLHEP::pi));
488 
489  for (unsigned int itimeslice = 0; itimeslice < nTimes_ ; itimeslice++ ) {
490  histoname.str(""); histoname << "energy_time_"<< itimeslice << "_layer_" << ilayer;
491  energy_[itimeslice].push_back(iB.book1D(histoname.str().c_str(),"energy_",100,0,0.1));
492  }
493  }
494 
495  MeanHitOccupancy_Plus_ = iB.book1D("MeanHitOccupancy_Plus", "MeanHitOccupancy_Plus", layers_, 0.5, layers_ + 0.5);
496  MeanHitOccupancy_Minus_ = iB.book1D("MeanHitOccupancy_Minus", "MeanHitOccupancy_Minus", layers_, 0.5, layers_ + 0.5);
497 }
498 
500 //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:142
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:579
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:145
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
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:47
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:162
int iEvent
Definition: GenABIO.cc:230
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:155
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:150
int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
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:62
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:44