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 
13 
21 
24 
34 
38 
43 
44 #include "CLHEP/Geometry/Point3D.h"
45 #include "CLHEP/Geometry/Transform3D.h"
46 #include "CLHEP/Geometry/Vector3D.h"
47 #include "CLHEP/Units/GlobalSystemOfUnits.h"
48 #include "CLHEP/Units/GlobalPhysicalConstants.h"
49 
51 public:
52  struct energysum {
54  etotal = 0;
55  for (int i = 0; i < 6; ++i)
56  eTime[i] = 0.;
57  }
58  double eTime[6], etotal;
59  };
60 
61  struct hitsinfo {
63  x = y = z = phi = eta = 0.0;
64  cell = cell2 = sector = sector2 = type = layer = 0;
65  }
66  double x, y, z, phi, eta;
68  };
69 
71  ~HGCalSimHitValidation() override {}
72 
73  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
74 
75 protected:
76  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
77  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
78  void analyze(const edm::Event&, const edm::EventSetup&) override;
79 
80 private:
81  void analyzeHits(std::vector<PCaloHit>& hits);
82  void fillOccupancyMap(std::map<int, int>& OccupancyMap, int layer);
83  void fillHitsInfo(std::pair<hitsinfo, energysum> hit_, unsigned int itimeslice, double esum);
84  bool defineGeometry(const DDCompactView* ddViewH);
85  bool defineGeometry(const cms::DDCompactView* ddViewH);
86 
87  // ----------member data ---------------------------
90  const std::vector<double> times_;
91  const int verbosity_;
92  const bool fromDDD_;
98  bool symmDet_;
99  unsigned int layers_;
101  std::map<uint32_t, HepGeom::Transform3D> transMap_;
102 
103  std::vector<MonitorElement*> HitOccupancy_Plus_, HitOccupancy_Minus_;
104  std::vector<MonitorElement*> EtaPhi_Plus_, EtaPhi_Minus_;
106  static const unsigned int maxTime_ = 6;
107  std::vector<MonitorElement*> energy_[maxTime_];
108  unsigned int nTimes_;
109 };
110 
112  : nameDetector_(iConfig.getParameter<std::string>("DetectorName")),
113  caloHitSource_(iConfig.getParameter<std::string>("CaloHitSource")),
114  times_(iConfig.getParameter<std::vector<double> >("TimeSlices")),
115  verbosity_(iConfig.getUntrackedParameter<int>("Verbosity", 0)),
116  fromDDD_(iConfig.getUntrackedParameter<bool>("fromDDD", true)),
118  edm::ESInputTag{"", nameDetector_})),
119  tok_cpv_(esConsumes<DDCompactView, IdealGeometryRecord, edm::Transition::BeginRun>()),
120  tok_cpvc_(esConsumes<cms::DDCompactView, IdealGeometryRecord, edm::Transition::BeginRun>()),
121  symmDet_(true),
122  firstLayer_(1) {
123  tok_hepMC_ = consumes<edm::HepMCProduct>(edm::InputTag("generatorSmeared"));
124  tok_hits_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", caloHitSource_));
125  nTimes_ = (times_.size() > maxTime_) ? maxTime_ : times_.size();
126 }
127 
130  std::vector<double> times = {25.0, 1000.0};
131  desc.add<std::string>("DetectorName", "HGCalEESensitive");
132  desc.add<std::string>("CaloHitSource", "HGCHitsEE");
133  desc.add<std::vector<double> >("TimeSlices", times);
134  desc.addUntracked<int>("Verbosity", 0);
135  desc.addUntracked<bool>("TestNumber", true);
136  desc.addUntracked<bool>("fromDDD", true);
137  descriptions.add("hgcalSimHitValidationEE", desc);
138 }
139 
141  //Generator input
142  if (verbosity_ > 0) {
144  iEvent.getByToken(tok_hepMC_, evtMC);
145  if (!evtMC.isValid()) {
146  edm::LogVerbatim("HGCalValidation") << "no HepMCProduct found";
147  } else {
148  const HepMC::GenEvent* myGenEvent = evtMC->GetEvent();
149  unsigned int k(0);
150  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
151  ++p, ++k) {
152  edm::LogVerbatim("HGCalValidation") << "Particle[" << k << "] with pt " << (*p)->momentum().perp() << " eta "
153  << (*p)->momentum().eta() << " phi " << (*p)->momentum().phi();
154  }
155  }
156  }
157 
158  //Now the hits
159  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
160  iEvent.getByToken(tok_hits_, theCaloHitContainers);
161  if (theCaloHitContainers.isValid()) {
162  if (verbosity_ > 0)
163  edm::LogVerbatim("HGCalValidation") << " PcalohitItr = " << theCaloHitContainers->size();
164  std::vector<PCaloHit> caloHits;
165  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
166  analyzeHits(caloHits);
167  } else if (verbosity_ > 0) {
168  edm::LogVerbatim("HGCalValidation") << "PCaloHitContainer does not exist!";
169  }
170 }
171 
172 void HGCalSimHitValidation::analyzeHits(std::vector<PCaloHit>& hits) {
173  std::map<int, int> OccupancyMap_plus, OccupancyMap_minus;
174  OccupancyMap_plus.clear();
175  OccupancyMap_minus.clear();
176 
177  std::map<uint32_t, std::pair<hitsinfo, energysum> > map_hits;
178  map_hits.clear();
179 
180  if (verbosity_ > 0)
181  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with " << hits.size() << " PcaloHit elements";
182  unsigned int nused(0);
183  for (unsigned int i = 0; i < hits.size(); i++) {
184  double energy = hits[i].energy();
185  double time = hits[i].time();
186  uint32_t id_ = hits[i].id();
187  int cell, sector, subsector(0), layer, zside;
188  int subdet(0), cell2(0), type(0);
189  if (hgcons_->waferHexagon8()) {
190  HGCSiliconDetId detId = HGCSiliconDetId(id_);
191  subdet = ForwardEmpty;
192  cell = detId.cellU();
193  cell2 = detId.cellV();
194  sector = detId.waferU();
195  subsector = detId.waferV();
196  type = detId.type();
197  layer = detId.layer();
198  zside = detId.zside();
199  } else if (hgcons_->tileTrapezoid()) {
201  subdet = ForwardEmpty;
202  sector = detId.ietaAbs();
203  cell = detId.iphi();
204  subsector = 1;
205  type = detId.type();
206  layer = detId.layer();
207  zside = detId.zside();
208  } else {
209  HGCalTestNumbering::unpackHexagonIndex(id_, subdet, zside, layer, sector, type, cell);
210  }
211  nused++;
212  if (verbosity_ > 1)
213  edm::LogVerbatim("HGCalValidation")
214  << "Detector " << nameDetector_ << " zside = " << zside << " sector|wafer = " << sector << ":" << subsector
215  << " type = " << type << " layer = " << layer << " cell = " << cell << ":" << cell2 << " energy = " << energy
216  << " energyem = " << hits[i].energyEM() << " energyhad = " << hits[i].energyHad() << " time = " << time;
217 
218  HepGeom::Point3D<float> gcoord;
219  std::pair<float, float> xy;
220  if (hgcons_->waferHexagon8()) {
221  xy = hgcons_->locateCell(layer, sector, subsector, cell, cell2, false, true);
222  } else if (hgcons_->tileTrapezoid()) {
223  xy = hgcons_->locateCellTrap(layer, sector, cell, false);
224  } else {
225  xy = hgcons_->locateCell(cell, layer, sector, false);
226  }
227  double zp = hgcons_->waferZ(layer, false);
228  if (zside < 0)
229  zp = -zp;
230  float xp = (zp < 0) ? -xy.first : xy.first;
231  gcoord = HepGeom::Point3D<float>(xp, xy.second, zp);
232  double tof = (gcoord.mag() * CLHEP::mm) / CLHEP::c_light;
233  if (verbosity_ > 1)
234  edm::LogVerbatim("HGCalValidation")
235  << std::hex << id_ << std::dec << " global coordinate " << gcoord << " time " << time << ":" << tof;
236  time -= tof;
237 
238  energysum esum;
239  hitsinfo hinfo;
240  if (map_hits.count(id_) != 0) {
241  hinfo = map_hits[id_].first;
242  esum = map_hits[id_].second;
243  } else {
244  hinfo.x = gcoord.x();
245  hinfo.y = gcoord.y();
246  hinfo.z = gcoord.z();
247  hinfo.sector = sector;
248  hinfo.sector2 = subsector;
249  hinfo.cell = cell;
250  hinfo.cell2 = cell2;
251  hinfo.type = type;
252  hinfo.layer = layer - firstLayer_;
253  hinfo.phi = gcoord.getPhi();
254  hinfo.eta = gcoord.getEta();
255  }
256  esum.etotal += energy;
257  for (unsigned int k = 0; k < nTimes_; ++k) {
258  if (time > 0 && time < times_[k])
259  esum.eTime[k] += energy;
260  }
261 
262  if (verbosity_ > 1)
263  edm::LogVerbatim("HGCalValidation") << " ----------------------- gx = " << hinfo.x << " gy = " << hinfo.y
264  << " gz = " << hinfo.z << " phi = " << hinfo.phi << " eta = " << hinfo.eta;
265  map_hits[id_] = std::pair<hitsinfo, energysum>(hinfo, esum);
266  }
267  if (verbosity_ > 0)
268  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with " << map_hits.size()
269  << " detector elements being hit";
270 
271  std::map<uint32_t, std::pair<hitsinfo, energysum> >::iterator itr;
272  for (itr = map_hits.begin(); itr != map_hits.end(); ++itr) {
273  hitsinfo hinfo = (*itr).second.first;
274  energysum esum = (*itr).second.second;
275  int layer = hinfo.layer;
276  double eta = hinfo.eta;
277 
278  for (unsigned int itimeslice = 0; itimeslice < nTimes_; itimeslice++) {
279  fillHitsInfo((*itr).second, itimeslice, esum.eTime[itimeslice]);
280  }
281 
282  if (eta > 0.0)
283  fillOccupancyMap(OccupancyMap_plus, layer);
284  else
285  fillOccupancyMap(OccupancyMap_minus, layer);
286  }
287  if (verbosity_ > 0)
288  edm::LogVerbatim("HGCalValidation") << "With map:used:total " << hits.size() << "|" << nused << "|"
289  << map_hits.size() << " hits";
290 
291  for (auto const& itr : OccupancyMap_plus) {
292  int layer = itr.first;
293  int occupancy = itr.second;
294  HitOccupancy_Plus_.at(layer)->Fill(occupancy);
295  }
296  for (auto const& itr : OccupancyMap_minus) {
297  int layer = itr.first;
298  int occupancy = itr.second;
299  HitOccupancy_Minus_.at(layer)->Fill(occupancy);
300  }
301 }
302 
303 void HGCalSimHitValidation::fillOccupancyMap(std::map<int, int>& OccupancyMap, int layer) {
304  if (OccupancyMap.find(layer) != OccupancyMap.end()) {
305  ++OccupancyMap[layer];
306  } else {
307  OccupancyMap[layer] = 1;
308  }
309 }
310 
311 void HGCalSimHitValidation::fillHitsInfo(std::pair<hitsinfo, energysum> hits, unsigned int itimeslice, double esum) {
312  unsigned int ilayer = hits.first.layer;
313  if (ilayer < layers_) {
314  energy_[itimeslice].at(ilayer)->Fill(esum);
315  if (itimeslice == 0) {
316  EtaPhi_Plus_.at(ilayer)->Fill(hits.first.eta, hits.first.phi);
317  EtaPhi_Minus_.at(ilayer)->Fill(hits.first.eta, hits.first.phi);
318  }
319  } else {
320  if (verbosity_ > 0)
321  edm::LogVerbatim("HGCalValidation")
322  << "Problematic Hit for " << nameDetector_ << " at sector " << hits.first.sector << ":" << hits.first.sector2
323  << " layer " << hits.first.layer << " cell " << hits.first.cell << ":" << hits.first.cell2 << " energy "
324  << hits.second.etotal;
325  }
326 }
327 
329  if (verbosity_ > 0)
330  edm::LogVerbatim("HGCalValidation") << "Initialize HGCalDDDConstants (DDD) for " << nameDetector_ << " : "
331  << hgcons_;
332 
334  const DDCompactView& cview = *ddViewH;
335  std::string attribute = "Volume";
337 
339  DDFilteredView fv(cview, filter);
340  bool dodet = fv.firstChild();
341 
342  while (dodet) {
343  const DDSolid& sol = fv.logicalPart().solid();
344  const std::string& name = sol.name().fullname();
345  int isd = (name.find(nameDetector_) == std::string::npos) ? -1 : 1;
346  if (isd > 0) {
347  std::vector<int> copy = fv.copyNumbers();
348  int nsiz = static_cast<int>(copy.size());
349  int lay = (nsiz > 0) ? copy[nsiz - 1] : -1;
350  int sec = (nsiz > 1) ? copy[nsiz - 2] : -1;
351  int zp = (nsiz > 3) ? copy[nsiz - 4] : -1;
352  if (zp != 1)
353  zp = -1;
354  const DDTrap& trp = static_cast<DDTrap>(sol);
355  int subs = (trp.alpha1() > 0 ? 1 : 0);
356  symmDet_ = (trp.alpha1() == 0 ? true : false);
357  uint32_t id = HGCalTestNumbering::packSquareIndex(zp, lay, sec, subs, 0);
358  DD3Vector x, y, z;
359  fv.rotation().GetComponents(x, y, z);
360  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
361  const CLHEP::HepRotation hr(rotation);
362  const CLHEP::Hep3Vector h3v(fv.translation().X(), fv.translation().Y(), fv.translation().Z());
363  const HepGeom::Transform3D ht3d(hr, h3v);
364  transMap_.insert(std::make_pair(id, ht3d));
365  if (verbosity_ > 2)
366  edm::LogVerbatim("HGCalValidation") << HGCalDetId(id) << " Transform using " << h3v << " and " << hr;
367  }
368  dodet = fv.next();
369  }
370  if (verbosity_ > 0)
371  edm::LogVerbatim("HGCalValidation") << "Finds " << transMap_.size() << " elements and SymmDet_ = " << symmDet_;
372  }
373  return true;
374 }
375 
377  if (verbosity_ > 0)
378  edm::LogVerbatim("HGCalValidation") << "Initialize HGCalDDDConstants (DD4hep) for " << nameDetector_ << " : "
379  << hgcons_;
380 
382  const cms::DDCompactView& cview = *ddViewH;
383  const cms::DDFilter filter("Volume", nameDetector_);
384  cms::DDFilteredView fv(cview, filter);
385 
386  while (fv.firstChild()) {
387  const auto& name = fv.name();
388  int isd = (name.find(nameDetector_) == std::string::npos) ? -1 : 1;
389  if (isd > 0) {
390  const auto& copy = fv.copyNos();
391  int nsiz = static_cast<int>(copy.size());
392  int lay = (nsiz > 0) ? copy[0] : -1;
393  int sec = (nsiz > 1) ? copy[1] : -1;
394  int zp = (nsiz > 3) ? copy[3] : -1;
395  if (zp != 1)
396  zp = -1;
397  const auto& pars = fv.parameters();
398  int subs = (pars[6] > 0 ? 1 : 0);
399  symmDet_ = (pars[6] == 0 ? true : false);
400  uint32_t id = HGCalTestNumbering::packSquareIndex(zp, lay, sec, subs, 0);
401  DD3Vector x, y, z;
402  fv.rotation().GetComponents(x, y, z);
403  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
404  const CLHEP::HepRotation hr(rotation);
405  const CLHEP::Hep3Vector h3v(fv.translation().X(), fv.translation().Y(), fv.translation().Z());
406  const HepGeom::Transform3D ht3d(hr, h3v);
407  transMap_.insert(std::make_pair(id, ht3d));
408  if (verbosity_ > 2)
409  edm::LogVerbatim("HGCalValidation") << HGCalDetId(id) << " Transform using " << h3v << " and " << hr;
410  }
411  }
412  if (verbosity_ > 0)
413  edm::LogVerbatim("HGCalValidation") << "Finds " << transMap_.size() << " elements and SymmDet_ = " << symmDet_;
414  }
415  return true;
416 }
417 
418 // ------------ method called when starting to processes a run ------------
420  hgcons_ = &iSetup.getData(tok_hgcal_);
421  layers_ = hgcons_->layers(false);
423  if (fromDDD_) {
424  const DDCompactView* pDD = &iSetup.getData(tok_cpv_);
425  defineGeometry(pDD);
426  } else {
427  const cms::DDCompactView* pDD = &iSetup.getData(tok_cpvc_);
428  defineGeometry(pDD);
429  }
430  if (verbosity_ > 0)
431  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " defined with " << layers_ << " Layers with first at "
432  << firstLayer_;
433 }
434 
436  iB.setCurrentFolder("HGCAL/HGCalSimHitsV/" + nameDetector_);
437 
438  std::ostringstream histoname;
439  for (unsigned int il = 0; il < layers_; ++il) {
440  int ilayer = firstLayer_ + static_cast<int>(il);
441  auto istr1 = std::to_string(ilayer);
442  while (istr1.size() < 2) {
443  istr1.insert(0, "0");
444  }
445  histoname.str("");
446  histoname << "HitOccupancy_Plus_layer_" << istr1;
447  HitOccupancy_Plus_.push_back(iB.book1D(histoname.str().c_str(), "HitOccupancy_Plus", 501, -0.5, 500.5));
448  histoname.str("");
449  histoname << "HitOccupancy_Minus_layer_" << istr1;
450  HitOccupancy_Minus_.push_back(iB.book1D(histoname.str().c_str(), "HitOccupancy_Minus", 501, -0.5, 500.5));
451 
452  histoname.str("");
453  histoname << "EtaPhi_Plus_"
454  << "layer_" << istr1;
455  EtaPhi_Plus_.push_back(iB.book2D(histoname.str().c_str(), "Occupancy", 31, 1.45, 3.0, 72, -CLHEP::pi, CLHEP::pi));
456  histoname.str("");
457  histoname << "EtaPhi_Minus_"
458  << "layer_" << istr1;
459  EtaPhi_Minus_.push_back(
460  iB.book2D(histoname.str().c_str(), "Occupancy", 31, -3.0, -1.45, 72, -CLHEP::pi, CLHEP::pi));
461 
462  for (unsigned int itimeslice = 0; itimeslice < nTimes_; itimeslice++) {
463  histoname.str("");
464  histoname << "energy_time_" << itimeslice << "_layer_" << istr1;
465  energy_[itimeslice].push_back(iB.book1D(histoname.str().c_str(), "energy_", 100, 0, 0.1));
466  }
467  }
468 
469  MeanHitOccupancy_Plus_ = iB.book1D("MeanHitOccupancy_Plus", "MeanHitOccupancy_Plus", layers_, 0.5, layers_ + 0.5);
470  MeanHitOccupancy_Minus_ = iB.book1D("MeanHitOccupancy_Minus", "MeanHitOccupancy_Minus", layers_, 0.5, layers_ + 0.5);
471 }
472 
474 //define this as a plug-in
ConfigurationDescriptions.h
cms::DDFilteredView::rotation
const RotationMatrix rotation() const
Definition: DDFilteredView.cc:122
HGCalSimHitValidation::HitOccupancy_Plus_
std::vector< MonitorElement * > HitOccupancy_Plus_
Definition: HGCalSimHitValidation.cc:103
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
DDAxes::y
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
HGCScintillatorDetId::iphi
int iphi() const
get the phi index
Definition: HGCScintillatorDetId.cc:58
cms::DDFilteredView::parameters
const std::vector< double > parameters() const
extract shape parameters
Definition: DDFilteredView.cc:536
ESTransientHandle.h
MessageLogger.h
HGCScintillatorDetId.h
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
ForwardEmpty
Definition: ForwardSubdetector.h:5
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
HGCalSimHitValidation::nTimes_
unsigned int nTimes_
Definition: HGCalSimHitValidation.cc:108
ESInputTag
HGCalSimHitValidation::HGCalSimHitValidation
HGCalSimHitValidation(const edm::ParameterSet &)
Definition: HGCalSimHitValidation.cc:111
HGCalDDDConstants::firstLayer
int firstLayer() const
Definition: HGCalDDDConstants.h:53
edm::Run
Definition: Run.h:45
HGCalDDDConstants::locateCellTrap
std::pair< float, float > locateCellTrap(int lay, int ieta, int iphi, bool reco) const
Definition: HGCalDDDConstants.cc:734
HGCalSimHitValidation::MeanHitOccupancy_Plus_
MonitorElement * MeanHitOccupancy_Plus_
Definition: HGCalSimHitValidation.cc:105
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
HGCalSimHitValidation::hitsinfo::y
double y
Definition: HGCalSimHitValidation.cc:66
edm::EDGetTokenT< edm::PCaloHitContainer >
HGCalDDDConstants::geomMode
HGCalGeometryMode::GeometryMode geomMode() const
Definition: HGCalDDDConstants.h:54
HGCalSimHitValidation::tok_cpvc_
const edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > tok_cpvc_
Definition: HGCalSimHitValidation.cc:95
edm
HLT enums.
Definition: AlignableModifier.h:19
HGCalGeometryMode.h
HGCalSimHitValidation::hgcons_
const HGCalDDDConstants * hgcons_
Definition: HGCalSimHitValidation.cc:89
HGCalSimHitValidation::layers_
unsigned int layers_
Definition: HGCalSimHitValidation.cc:99
DDFilteredView::logicalPart
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
Definition: DDFilteredView.cc:16
HGCalTestNumbering::unpackHexagonIndex
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
Definition: HGCalTestNumbering.cc:46
HGCalDDDConstants::waferZ
double waferZ(int layer, bool reco) const
Definition: HGCalDDDConstants.cc:1412
HGCalSimHitValidation::analyzeHits
void analyzeHits(std::vector< PCaloHit > &hits)
Definition: HGCalSimHitValidation.cc:172
HGCSiliconDetId.h
DDFilteredView::copyNumbers
nav_type copyNumbers() const
return the stack of copy numbers
Definition: DDFilteredView.cc:193
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HGCalSimHitValidation::energysum::etotal
double etotal
Definition: HGCalSimHitValidation.cc:58
HGCalDDDConstants::waferHexagon8
bool waferHexagon8() const
Definition: HGCalDDDConstants.h:143
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
HGCalSimHitValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: HGCalSimHitValidation.cc:140
HGCalSimHitValidation::energysum
Definition: HGCalSimHitValidation.cc:52
protons_cff.time
time
Definition: protons_cff.py:35
DQMStore.h
hinfo
Definition: TauTagValidation.h:55
HGCalSimHitValidation::hitsinfo::z
double z
Definition: HGCalSimHitValidation.cc:66
DDAxes::x
HGCalSimHitValidation::hitsinfo
Definition: HGCalSimHitValidation.cc:61
cms::DDFilteredView
Definition: DDFilteredView.h:70
HGCalSimHitValidation::hitsinfo::cell
int cell
Definition: HGCalSimHitValidation.cc:67
edm::Handle< edm::HepMCProduct >
DDCompactView.h
HGCalSimHitValidation::nameDetector_
const std::string nameDetector_
Definition: HGCalSimHitValidation.cc:88
HGCSiliconDetId
Definition: HGCSiliconDetId.h:22
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
HGCalDDDConstants
Definition: HGCalDDDConstants.h:27
ForwardSubdetector.h
cms::DDFilteredView::name
std::string_view name() const
Definition: DDFilteredView.cc:857
cms::DDFilteredView::translation
const Translation translation() const
Definition: DDFilteredView.cc:103
HGCalSimHitValidation::transMap_
std::map< uint32_t, HepGeom::Transform3D > transMap_
Definition: HGCalSimHitValidation.cc:101
HGCScintillatorDetId::layer
int layer() const
get the layer #
Definition: HGCScintillatorDetId.h:50
MakerMacros.h
HGCalSimHitValidation::defineGeometry
bool defineGeometry(const DDCompactView *ddViewH)
Definition: HGCalSimHitValidation.cc:328
HGCalSimHitValidation::hitsinfo::hitsinfo
hitsinfo()
Definition: HGCalSimHitValidation.cc:62
HGCalSimHitValidation
Definition: HGCalSimHitValidation.cc:50
DDFilteredView::firstChild
bool firstChild()
set the current node to the first child ...
Definition: DDFilteredView.cc:86
DDFilteredView.h
cms::DDFilter
Definition: DDFilteredView.h:59
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
HGCalTestNumbering::packSquareIndex
static uint32_t packSquareIndex(int z, int lay, int sec, int subsec, int cell)
Definition: HGCalTestNumbering.cc:5
Service.h
PVValHelper::eta
Definition: PVValidationHelpers.h:70
DDFilteredView::next
bool next()
set current node to the next node in the filtered tree
Definition: DDFilteredView.cc:67
HGCalSimHitValidation::hitsinfo::cell2
int cell2
Definition: HGCalSimHitValidation.cc:67
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
cms::DDFilteredView::copyNos
const std::vector< int > copyNos() const
The list of the volume copy numbers.
Definition: DDFilteredView.cc:89
HGCalSimHitValidation::firstLayer_
int firstLayer_
Definition: HGCalSimHitValidation.cc:100
DDBase::name
const N & name() const
Definition: DDBase.h:59
DDAxes::z
HGCScintillatorDetId::ietaAbs
int ietaAbs() const
Definition: HGCScintillatorDetId.h:56
HGCalSimHitValidation::dqmBeginRun
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HGCalSimHitValidation.cc:419
HGCalSimHitValidation::fillHitsInfo
void fillHitsInfo(std::pair< hitsinfo, energysum > hit_, unsigned int itimeslice, double esum)
Definition: HGCalSimHitValidation.cc:311
cms::DDFilteredView::firstChild
bool firstChild()
set the current node to the first child
Definition: DDFilteredView.cc:268
HGCalGeometryMode::Square
Definition: HGCalGeometryMode.h:26
DDSolid.h
DDFilteredView.h
HGCalSimHitValidation::energy_
std::vector< MonitorElement * > energy_[maxTime_]
Definition: HGCalSimHitValidation.cc:107
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HGCalSimHitValidation::hitsinfo::type
int type
Definition: HGCalSimHitValidation.cc:67
DDCompactView.h
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HGCScintillatorDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: HGCScintillatorDetId.h:47
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
HGCalSimHitValidation::EtaPhi_Plus_
std::vector< MonitorElement * > EtaPhi_Plus_
Definition: HGCalSimHitValidation.cc:104
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
DQMEDAnalyzer.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
HGCalSimHitValidation::hitsinfo::sector2
int sector2
Definition: HGCalSimHitValidation.cc:67
HGCalSimHitValidation::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HGCalSimHitValidation.cc:128
HGCalDDDConstants::tileTrapezoid
bool tileTrapezoid() const
Definition: HGCalDDDConstants.h:113
DD3Vector
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
Definition: PGeometricDetBuilder.cc:20
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
funct::true
true
Definition: Factorize.h:173
DDTrap
Interface to a Trapezoid.
Definition: DDSolid.h:88
HGCalSimHitValidation::energysum::energysum
energysum()
Definition: HGCalSimHitValidation.cc:53
HGCalSimHitValidation::hitsinfo::eta
double eta
Definition: HGCalSimHitValidation.cc:66
edm::ParameterSet
Definition: ParameterSet.h:47
idealTransformation.rotation
dictionary rotation
Definition: idealTransformation.py:1
edm::Transition
Transition
Definition: Transition.h:12
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Event.h
HGCalSimHitValidation::verbosity_
const int verbosity_
Definition: HGCalSimHitValidation.cc:91
DDSpecifics.h
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
HGCalSimHitValidation::fillOccupancyMap
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
Definition: HGCalSimHitValidation.cc:303
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
PCaloHit.h
HGCalDDDConstants::layers
unsigned int layers(bool reco) const
Definition: HGCalDDDConstants.cc:577
HGCalSimHitValidation::tok_hits_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
Definition: HGCalSimHitValidation.cc:96
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
DDFilter.h
value
Definition: value.py:1
HGCScintillatorDetId::type
int type() const
get/set the type
Definition: HGCScintillatorDetId.h:43
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
hgcalTopologyTester_cfi.cell2
cell2
Definition: hgcalTopologyTester_cfi.py:12
HGCalSimHitValidation::MeanHitOccupancy_Minus_
MonitorElement * MeanHitOccupancy_Minus_
Definition: HGCalSimHitValidation.cc:105
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:58
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
HGCSiliconDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: HGCSiliconDetId.h:54
HGCalSimHitValidation::energysum::eTime
double eTime[6]
Definition: HGCalSimHitValidation.cc:58
HGCalSimHitValidation::hitsinfo::sector
int sector
Definition: HGCalSimHitValidation.cc:67
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:94
InputTag.h
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
HGCalSimHitValidation::hitsinfo::phi
double phi
Definition: HGCalSimHitValidation.cc:66
HGCalDetId
Definition: HGCalDetId.h:8
HGCSiliconDetId::cellV
int cellV() const
Definition: HGCSiliconDetId.h:61
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
HGCalDetId.h
std
Definition: JetResolutionObject.h:76
HGCSiliconDetId::cellU
int cellU() const
get the cell #'s in u,v or in x,y
Definition: HGCSiliconDetId.h:60
HGCalSimHitValidation::EtaPhi_Minus_
std::vector< MonitorElement * > EtaPhi_Minus_
Definition: HGCalSimHitValidation.cc:104
HGCalSimHitValidation::hitsinfo::x
double x
Definition: HGCalSimHitValidation.cc:66
HGCalSimHitValidation::caloHitSource_
const std::string caloHitSource_
Definition: HGCalSimHitValidation.cc:88
DDValue
Definition: DDValue.h:22
HGCalSimHitValidation::HitOccupancy_Minus_
std::vector< MonitorElement * > HitOccupancy_Minus_
Definition: HGCalSimHitValidation.cc:103
Frameworkfwd.h
HGCScintillatorDetId
Definition: HGCScintillatorDetId.h:23
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
DDFilteredView::translation
const DDTranslation & translation() const
The absolute translation of the current node.
Definition: DDFilteredView.cc:26
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
HGCalSimHitValidation::maxTime_
static const unsigned int maxTime_
Definition: HGCalSimHitValidation.cc:106
cms::DDCompactView
Definition: DDCompactView.h:31
HGCalSimHitValidation::times_
const std::vector< double > times_
Definition: HGCalSimHitValidation.cc:90
HGCalSimHitValidation::tok_cpv_
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > tok_cpv_
Definition: HGCalSimHitValidation.cc:94
HGCSiliconDetId::type
int type() const
get the type
Definition: HGCSiliconDetId.h:51
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HGCSiliconDetId::waferU
int waferU() const
Definition: HGCSiliconDetId.h:76
EventSetup.h
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDSpecificsMatchesValueFilter
Definition: DDFilter.h:70
DDFilteredView::rotation
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
Definition: DDFilteredView.cc:28
HGCalSimHitValidation::~HGCalSimHitValidation
~HGCalSimHitValidation() override
Definition: HGCalSimHitValidation.cc:71
PCaloHitContainer.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
HGCalSimHitValidation::tok_hepMC_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
Definition: HGCalSimHitValidation.cc:97
DDFilteredView
Definition: DDFilteredView.h:20
HGCalSimHitValidation::tok_hgcal_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tok_hgcal_
Definition: HGCalSimHitValidation.cc:93
DDTrap::alpha1
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:147
HGCalSimHitValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: HGCalSimHitValidation.cc:435
pi
const Double_t pi
Definition: trackSplitPlot.h:36
DDName::fullname
const std::string fullname() const
Definition: DDName.h:43
HGCalSimHitValidation::hitsinfo::layer
int layer
Definition: HGCalSimHitValidation.cc:67
HGCalDDDConstants.h
ParameterSet.h
HGCalDDDConstants::locateCell
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
Definition: HGCalDDDConstants.cc:596
HepMCProduct.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
HGCalSimHitValidation::fromDDD_
const bool fromDDD_
Definition: HGCalSimHitValidation.cc:92
DDLogicalPart::solid
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Definition: DDLogicalPart.cc:120
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
edm::InputTag
Definition: InputTag.h:15
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
HGCSiliconDetId::waferV
int waferV() const
Definition: HGCSiliconDetId.h:77
HGCalSimHitValidation::symmDet_
bool symmDet_
Definition: HGCalSimHitValidation.cc:98
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
HGCalTestNumbering.h
HGCSiliconDetId::layer
int layer() const
get the layer #
Definition: HGCSiliconDetId.h:57