CMS 3D CMS Logo

HGCalSimHitStudy.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 
10 
17 
28 
35 
39 
40 #include "CLHEP/Geometry/Point3D.h"
41 #include "CLHEP/Geometry/Transform3D.h"
42 #include "CLHEP/Geometry/Vector3D.h"
43 #include "CLHEP/Units/GlobalSystemOfUnits.h"
44 #include "CLHEP/Units/GlobalPhysicalConstants.h"
45 
46 #include "TH1D.h"
47 #include "TH2D.h"
48 
49 class HGCalSimHitStudy : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
50 public:
51  struct hitsinfo {
53  phi = eta = energy = time = 0.0;
54  layer = 0;
55  }
56  double phi, eta, energy, time;
57  int layer;
58  };
59 
60  explicit HGCalSimHitStudy(const edm::ParameterSet&);
61  ~HGCalSimHitStudy() override {}
62  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
63 
64 protected:
65  void beginJob() override;
66  void beginRun(edm::Run const&, edm::EventSetup const&) override;
67  void analyze(edm::Event const&, edm::EventSetup const&) override;
68  void endRun(edm::Run const&, edm::EventSetup const&) override {}
69 
70 private:
71  void analyzeHits(int, const std::string&, const std::vector<PCaloHit>&);
72 
73  // ----------member data ---------------------------
74  const std::vector<std::string> nameDetectors_, caloHitSources_;
75  const double rmin_, rmax_, zmin_, zmax_;
76  const double etamin_, etamax_;
78  const bool ifNose_, ifLayer_;
79  std::vector<const HGCalDDDConstants*> hgcons_;
81  std::vector<bool> heRebuild_;
82  std::vector<edm::EDGetTokenT<edm::PCaloHitContainer> > tok_hits_;
83  std::vector<int> layers_, layerFront_;
84 
85  //histogram related stuff
86  std::vector<TH2D*> h_RZ_, h_EtaPhi_, h_EtFiZp_, h_EtFiZm_, h_XY_;
87  std::vector<TH1D*> h_E_, h_T_, h_LayerZp_, h_LayerZm_;
88  std::vector<TH1D*> h_W1_, h_W2_, h_C1_, h_C2_, h_Ly_;
89 };
90 
92  : nameDetectors_(iConfig.getParameter<std::vector<std::string> >("detectorNames")),
93  caloHitSources_(iConfig.getParameter<std::vector<std::string> >("caloHitSources")),
94  rmin_(iConfig.getUntrackedParameter<double>("rMin", 0.0)),
95  rmax_(iConfig.getUntrackedParameter<double>("rMax", 3000.0)),
96  zmin_(iConfig.getUntrackedParameter<double>("zMin", 3000.0)),
97  zmax_(iConfig.getUntrackedParameter<double>("zMax", 6000.0)),
98  etamin_(iConfig.getUntrackedParameter<double>("etaMin", 1.0)),
99  etamax_(iConfig.getUntrackedParameter<double>("etaMax", 3.0)),
100  nbinR_(iConfig.getUntrackedParameter<int>("nBinR", 300)),
101  nbinZ_(iConfig.getUntrackedParameter<int>("nBinZ", 300)),
102  nbinEta_(iConfig.getUntrackedParameter<int>("nBinEta", 200)),
103  nLayers_(iConfig.getUntrackedParameter<int>("layers", 50)),
104  verbosity_(iConfig.getUntrackedParameter<int>("verbosity", 0)),
105  ifNose_(iConfig.getUntrackedParameter<bool>("ifNose", false)),
106  ifLayer_(iConfig.getUntrackedParameter<bool>("ifLayer", false)) {
107  usesResource(TFileService::kSharedResource);
108 
109  for (auto const& name : nameDetectors_) {
110  if (name == "HCal")
111  heRebuild_.emplace_back(true);
112  else
113  heRebuild_.emplace_back(false);
114  }
115  for (auto const& source : caloHitSources_) {
116  tok_hits_.emplace_back(consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", source)));
117  }
118 }
119 
122  std::vector<std::string> names = {"HGCalEESensitive", "HGCalHESiliconSensitive", "Hcal"};
123  std::vector<std::string> sources = {"HGCHitsEE", "HGCHitsHEfront", "HcalHits"};
124  desc.add<std::vector<std::string> >("detectorNames", names);
125  desc.add<std::vector<std::string> >("caloHitSources", sources);
126  desc.addUntracked<double>("rMin", 0.0);
127  desc.addUntracked<double>("rMax", 3000.0);
128  desc.addUntracked<double>("zMin", 3000.0);
129  desc.addUntracked<double>("zMax", 6000.0);
130  desc.addUntracked<double>("etaMin", 1.0);
131  desc.addUntracked<double>("etaMax", 3.0);
132  desc.addUntracked<int>("nBinR", 300);
133  desc.addUntracked<int>("nBinZ", 300);
134  desc.addUntracked<int>("nBinEta", 200);
135  desc.addUntracked<int>("layers", 50);
136  desc.addUntracked<int>("verbosity", 0);
137  desc.addUntracked<bool>("ifNose", false);
138  desc.addUntracked<bool>("ifLayer", false);
139  descriptions.add("hgcalSimHitStudy", desc);
140 }
141 
143  //Now the hits
144  for (unsigned int k = 0; k < tok_hits_.size(); ++k) {
145  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
146  iEvent.getByToken(tok_hits_[k], theCaloHitContainers);
147  if (theCaloHitContainers.isValid()) {
148  if (verbosity_ > 0)
149  edm::LogVerbatim("HGCalValidation") << " PcalohitItr = " << theCaloHitContainers->size();
150  std::vector<PCaloHit> caloHits;
151  if (heRebuild_[k]) {
152  for (auto const& hit : *(theCaloHitContainers.product())) {
153  unsigned int id = hit.id();
155  if (hid.subdet() != static_cast<int>(HcalEndcap)) {
156  caloHits.emplace_back(hit);
157  caloHits.back().setID(hid.rawId());
158  if (verbosity_ > 0)
159  edm::LogVerbatim("HGCalValidation") << "Hit[" << caloHits.size() << "] " << hid;
160  }
161  }
162  } else {
163  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
164  }
165  analyzeHits(k, nameDetectors_[k], caloHits);
166  } else if (verbosity_ > 0) {
167  edm::LogVerbatim("HGCalValidation") << "PCaloHitContainer does not "
168  << "exist for " << nameDetectors_[k];
169  }
170  }
171 }
172 
173 void HGCalSimHitStudy::analyzeHits(int ih, std::string const& name, std::vector<PCaloHit> const& hits) {
174  if (verbosity_ > 0)
175  edm::LogVerbatim("HGCalValidation") << name << " with " << hits.size() << " PcaloHit elements";
176 
177  std::map<uint32_t, hitsinfo> map_hits;
178  map_hits.clear();
179 
180  unsigned int nused(0);
181  for (auto const& hit : hits) {
182  double energy = hit.energy();
183  double time = hit.time();
184  uint32_t id = hit.id();
185  int cell, sector, sector2(0), layer, zside;
186  int subdet(0), cell2(0), type(0);
187  HepGeom::Point3D<float> gcoord;
188  if (heRebuild_[ih]) {
189  HcalDetId detId = HcalDetId(id);
190  subdet = detId.subdet();
191  cell = detId.ietaAbs();
192  sector = detId.iphi();
193  layer = detId.depth();
194  zside = detId.zside();
195  std::pair<double, double> etaphi = hcons_->getEtaPhi(subdet, zside * cell, sector);
196  double rz = hcons_->getRZ(subdet, zside * cell, layer);
197  if (verbosity_ > 2)
198  edm::LogVerbatim("HGCalValidation") << "i/p " << subdet << ":" << zside << ":" << cell << ":" << sector << ":"
199  << layer << " o/p " << etaphi.first << ":" << etaphi.second << ":" << rz;
200  gcoord = HepGeom::Point3D<float>(rz * cos(etaphi.second) / cosh(etaphi.first),
201  rz * sin(etaphi.second) / cosh(etaphi.first),
202  rz * tanh(etaphi.first));
203  } else {
204  std::pair<float, float> xy;
205  if (ifNose_) {
206  HFNoseDetId detId = HFNoseDetId(id);
207  subdet = detId.subdetId();
208  cell = detId.cellU();
209  cell2 = detId.cellV();
210  sector = detId.waferU();
211  sector2 = detId.waferV();
212  type = detId.type();
213  layer = detId.layer();
214  zside = detId.zside();
215  xy = hgcons_[ih]->locateCell(layer, sector, sector2, cell, cell2, false, true);
216  h_W2_[ih]->Fill(sector2);
217  h_C2_[ih]->Fill(cell2);
218 
219  } else if ((hgcons_[ih]->geomMode() == HGCalGeometryMode::Hexagon8) ||
220  (hgcons_[ih]->geomMode() == HGCalGeometryMode::Hexagon8Full)) {
221  HGCSiliconDetId detId = HGCSiliconDetId(id);
222  subdet = static_cast<int>(detId.det());
223  cell = detId.cellU();
224  cell2 = detId.cellV();
225  sector = detId.waferU();
226  sector2 = detId.waferV();
227  type = detId.type();
228  layer = detId.layer();
229  zside = detId.zside();
230  xy = hgcons_[ih]->locateCell(layer, sector, sector2, cell, cell2, false, true);
231  h_W2_[ih]->Fill(sector2);
232  h_C2_[ih]->Fill(cell2);
233  } else if (hgcons_[ih]->geomMode() == HGCalGeometryMode::Trapezoid) {
235  subdet = static_cast<int>(detId.det());
236  sector = detId.ieta();
237  cell = detId.iphi();
238  type = detId.type();
239  layer = detId.layer();
240  zside = detId.zside();
241  xy = hgcons_[ih]->locateCellTrap(layer, sector, cell, false);
242  } else {
243  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector, type, cell);
244  xy = hgcons_[ih]->locateCell(cell, layer, sector, false);
245  }
246  double zp = hgcons_[ih]->waferZ(layer, false);
247  if (zside < 0)
248  zp = -zp;
249  double xp = (zp < 0) ? -xy.first : xy.first;
250  gcoord = HepGeom::Point3D<float>(xp, xy.second, zp);
251  if (verbosity_ > 2)
252  edm::LogVerbatim("HGCalValidation")
253  << "i/p " << subdet << ":" << zside << ":" << layer << ":" << sector << ":" << sector2 << ":" << cell << ":"
254  << cell2 << " o/p " << xy.first << ":" << xy.second << ":" << zp;
255  }
256  nused++;
257  double tof = (gcoord.mag() * CLHEP::mm) / CLHEP::c_light;
258  if (verbosity_ > 1)
259  edm::LogVerbatim("HGCalValidation")
260  << "Detector " << name << " zside = " << zside << " layer = " << layer << " type = " << type
261  << " wafer = " << sector << ":" << sector2 << " cell = " << cell << ":" << cell2 << " positon = " << gcoord
262  << " energy = " << energy << " time = " << time << ":" << tof;
263  time -= tof;
264  if (time < 0)
265  time = 0;
266  hitsinfo hinfo;
267  if (map_hits.count(id) != 0) {
268  hinfo = map_hits[id];
269  } else {
270  hinfo.layer = layer + layerFront_[ih];
271  hinfo.phi = gcoord.getPhi();
272  hinfo.eta = gcoord.getEta();
273  hinfo.time = time;
274  }
275  hinfo.energy += energy;
276  map_hits[id] = hinfo;
277 
278  //Fill in histograms
279  h_RZ_[0]->Fill(std::abs(gcoord.z()), gcoord.rho());
280  h_RZ_[ih + 1]->Fill(std::abs(gcoord.z()), gcoord.rho());
281  if (ifLayer_) {
282  if (hinfo.layer <= static_cast<int>(h_XY_.size()))
283  h_XY_[hinfo.layer - 1]->Fill(gcoord.x(), gcoord.y());
284  } else {
285  h_EtaPhi_[0]->Fill(std::abs(hinfo.eta), hinfo.phi);
286  h_EtaPhi_[ih + 1]->Fill(std::abs(hinfo.eta), hinfo.phi);
287  }
288  h_Ly_[ih]->Fill(layer);
289  h_W1_[ih]->Fill(sector);
290  h_C1_[ih]->Fill(cell);
291  }
292  if (verbosity_ > 0)
293  edm::LogVerbatim("HGCalValidation") << name << " with " << map_hits.size() << ":" << nused << " detector elements"
294  << " being hit";
295 
296  for (auto const& hit : map_hits) {
297  hitsinfo hinfo = hit.second;
298  if (verbosity_ > 1)
299  edm::LogVerbatim("HGCalValidation")
300  << " ---------------------- eta = " << hinfo.eta << " phi = " << hinfo.phi << " layer = " << hinfo.layer
301  << " E = " << hinfo.energy << " T = " << hinfo.time;
302  h_E_[0]->Fill(hinfo.energy);
303  h_E_[ih + 1]->Fill(hinfo.energy);
304  h_T_[0]->Fill(hinfo.time);
305  h_T_[ih + 1]->Fill(hinfo.time);
306  if (hinfo.eta > 0) {
307  if (!ifLayer_) {
308  h_EtFiZp_[0]->Fill(std::abs(hinfo.eta), hinfo.phi, hinfo.energy);
309  h_EtFiZp_[ih + 1]->Fill(std::abs(hinfo.eta), hinfo.phi, hinfo.energy);
310  }
311  h_LayerZp_[0]->Fill(hinfo.layer, hinfo.energy);
312  h_LayerZp_[ih + 1]->Fill(hinfo.layer, hinfo.energy);
313  } else {
314  if (!ifLayer_) {
315  h_EtFiZm_[0]->Fill(std::abs(hinfo.eta), hinfo.phi, hinfo.energy);
316  h_EtFiZm_[ih + 1]->Fill(std::abs(hinfo.eta), hinfo.phi, hinfo.energy);
317  }
318  h_LayerZm_[0]->Fill(hinfo.layer, hinfo.energy);
319  h_LayerZm_[ih + 1]->Fill(hinfo.layer, hinfo.energy);
320  }
321  }
322 }
323 
324 // ------------ method called when starting to processes a run ------------
326  for (unsigned int k = 0; k < nameDetectors_.size(); ++k) {
327  if (heRebuild_[k]) {
329  iSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
330  hcons_ = &(*pHRNDC);
331  layers_.emplace_back(hcons_->getMaxDepth(1));
332  hgcons_.emplace_back(nullptr);
333  layerFront_.emplace_back(40);
334  } else {
336  iSetup.get<IdealGeometryRecord>().get(nameDetectors_[k], pHGDC);
337  hgcons_.emplace_back(&(*pHGDC));
338  layers_.emplace_back(hgcons_.back()->layers(false));
339  if (k == 0)
340  layerFront_.emplace_back(0);
341  else
342  layerFront_.emplace_back(28);
343  }
344  if (verbosity_ > 0)
345  edm::LogVerbatim("HGCalValidation") << nameDetectors_[k] << " defined with " << layers_.back() << " Layers with "
346  << layerFront_.back() << " in front";
347  }
348 }
349 
352 
353  std::ostringstream name, title;
354  for (unsigned int ih = 0; ih <= nameDetectors_.size(); ++ih) {
355  name.str("");
356  title.str("");
357  if (ih == 0) {
358  name << "RZ_AllDetectors";
359  title << "R vs Z for All Detectors";
360  } else {
361  name << "RZ_" << nameDetectors_[ih - 1];
362  title << "R vs Z for " << nameDetectors_[ih - 1];
363  }
364  h_RZ_.emplace_back(
365  fs->make<TH2D>(name.str().c_str(), title.str().c_str(), nbinZ_, zmin_, zmax_, nbinR_, rmin_, rmax_));
366  if (ifLayer_) {
367  if (ih == 0) {
368  for (int ly = 0; ly < nLayers_; ++ly) {
369  name.str("");
370  title.str("");
371  name << "XY_L" << (ly + 1);
372  title << "Y vs X at Layer " << (ly + 1);
373  h_XY_.emplace_back(
374  fs->make<TH2D>(name.str().c_str(), title.str().c_str(), nbinR_, -rmax_, rmax_, nbinR_, -rmax_, rmax_));
375  }
376  }
377  } else {
378  name.str("");
379  title.str("");
380  if (ih == 0) {
381  name << "EtaPhi_AllDetectors";
382  title << "#phi vs #eta for All Detectors";
383  } else {
384  name << "EtaPhi_" << nameDetectors_[ih - 1];
385  title << "#phi vs #eta for " << nameDetectors_[ih - 1];
386  }
387  h_EtaPhi_.emplace_back(
388  fs->make<TH2D>(name.str().c_str(), title.str().c_str(), nbinEta_, etamin_, etamax_, 200, -M_PI, M_PI));
389  name.str("");
390  title.str("");
391  if (ih == 0) {
392  name << "EtFiZp_AllDetectors";
393  title << "#phi vs #eta (+z) for All Detectors";
394  } else {
395  name << "EtFiZp_" << nameDetectors_[ih - 1];
396  title << "#phi vs #eta (+z) for " << nameDetectors_[ih - 1];
397  }
398  h_EtFiZp_.emplace_back(
399  fs->make<TH2D>(name.str().c_str(), title.str().c_str(), nbinEta_, etamin_, etamax_, 200, -M_PI, M_PI));
400  name.str("");
401  title.str("");
402  if (ih == 0) {
403  name << "EtFiZm_AllDetectors";
404  title << "#phi vs #eta (-z) for All Detectors";
405  } else {
406  name << "EtFiZm_" << nameDetectors_[ih - 1];
407  title << "#phi vs #eta (-z) for " << nameDetectors_[ih - 1];
408  }
409  h_EtFiZm_.emplace_back(
410  fs->make<TH2D>(name.str().c_str(), title.str().c_str(), nbinEta_, etamin_, etamax_, 200, -M_PI, M_PI));
411  }
412  name.str("");
413  title.str("");
414  if (ih == 0) {
415  name << "LayerZp_AllDetectors";
416  title << "Energy vs Layer (+z) for All Detectors";
417  } else {
418  name << "LayerZp_" << nameDetectors_[ih - 1];
419  title << "Energy vs Layer (+z) for " << nameDetectors_[ih - 1];
420  }
421  h_LayerZp_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 60, 0.0, 60.0));
422  name.str("");
423  title.str("");
424  if (ih == 0) {
425  name << "LayerZm_AllDetectors";
426  title << "Energy vs Layer (-z) for All Detectors";
427  } else {
428  name << "LayerZm_" << nameDetectors_[ih - 1];
429  title << "Energy vs Layer (-z) for " << nameDetectors_[ih - 1];
430  }
431  h_LayerZm_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 60, 0.0, 60.0));
432 
433  name.str("");
434  title.str("");
435  if (ih == 0) {
436  name << "E_AllDetectors";
437  title << "Energy Deposit for All Detectors";
438  } else {
439  name << "E_" << nameDetectors_[ih - 1];
440  title << "Energy Deposit for " << nameDetectors_[ih - 1];
441  }
442  h_E_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 1000, 0.0, 1.0));
443 
444  name.str("");
445  title.str("");
446  if (ih == 0) {
447  name << "T_AllDetectors";
448  title << "Time for All Detectors";
449  } else {
450  name << "T_" << nameDetectors_[ih - 1];
451  title << "Time for " << nameDetectors_[ih - 1];
452  }
453  h_T_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 1000, 0.0, 200.0));
454  }
455 
456  for (unsigned int ih = 0; ih < nameDetectors_.size(); ++ih) {
457  name.str("");
458  title.str("");
459  name << "LY_" << nameDetectors_[ih];
460  title << "Layer number for " << nameDetectors_[ih];
461  h_Ly_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 200, 0, 100));
462  if ((nameDetectors_[ih] == "HGCalHEScintillatorSensitive") || heRebuild_[ih]) {
463  name.str("");
464  title.str("");
465  name << "IR_" << nameDetectors_[ih];
466  title << "Radius index for " << nameDetectors_[ih];
467  h_W1_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 200, -50, 50));
468  name.str("");
469  title.str("");
470  name << "FI_" << nameDetectors_[ih];
471  title << "#phi index for " << nameDetectors_[ih];
472  h_C1_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 720, 0, 360));
473  } else {
474  name.str("");
475  title.str("");
476  name << "WU_" << nameDetectors_[ih];
477  title << "u index of wafers for " << nameDetectors_[ih];
478  h_W1_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 200, -50, 50));
479  name.str("");
480  title.str("");
481  name << "WV_" << nameDetectors_[ih];
482  title << "v index of wafers for " << nameDetectors_[ih];
483  h_W2_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 100, -50, 50));
484  name.str("");
485  title.str("");
486  name << "CU_" << nameDetectors_[ih];
487  title << "u index of cells for " << nameDetectors_[ih];
488  h_C1_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 100, 0, 50));
489  name.str("");
490  title.str("");
491  name << "CV_" << nameDetectors_[ih];
492  title << "v index of cells for " << nameDetectors_[ih];
493  h_C2_.emplace_back(fs->make<TH1D>(name.str().c_str(), title.str().c_str(), 100, 0, 50));
494  }
495  }
496 }
497 
499 //define this as a plug-in
ConfigurationDescriptions.h
HGCalSimHitStudy::nameDetectors_
const std::vector< std::string > nameDetectors_
Definition: HGCalSimHitStudy.cc:74
HGCalSimHitStudy::h_T_
std::vector< TH1D * > h_T_
Definition: HGCalSimHitStudy.cc:87
electrons_cff.bool
bool
Definition: electrons_cff.py:372
EDAnalyzer.h
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
HGCScintillatorDetId::iphi
int iphi() const
get the phi index
Definition: HGCScintillatorDetId.cc:57
MessageLogger.h
funct::false
false
Definition: Factorize.h:34
HGCalSimHitStudy::h_EtaPhi_
std::vector< TH2D * > h_EtaPhi_
Definition: HGCalSimHitStudy.cc:86
HGCalSimHitStudy::layerFront_
std::vector< int > layerFront_
Definition: HGCalSimHitStudy.cc:83
hit::id
unsigned int id
Definition: SiStripHitEffFromCalibTree.cc:92
edm::Handle::product
T const * product() const
Definition: Handle.h:70
HGCScintillatorDetId.h
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
ESHandle.h
HGCScintillatorDetId::ieta
int ieta() const
Definition: HGCScintillatorDetId.h:53
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
HFNoseDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: HFNoseDetId.h:53
edm::Run
Definition: Run.h:45
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
HGCalSimHitStudy::tok_hits_
std::vector< edm::EDGetTokenT< edm::PCaloHitContainer > > tok_hits_
Definition: HGCalSimHitStudy.cc:82
HFNoseDetId::layer
int layer() const
get the layer #
Definition: HFNoseDetId.h:56
HGCalGeometryMode.h
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
HGCalSimHitStudy::h_LayerZm_
std::vector< TH1D * > h_LayerZm_
Definition: HGCalSimHitStudy.cc:87
HGCalTestNumbering::unpackHexagonIndex
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
Definition: HGCalTestNumbering.cc:47
HGCSiliconDetId.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HGCalSimHitStudy::~HGCalSimHitStudy
~HGCalSimHitStudy() override
Definition: HGCalSimHitStudy.cc:61
HGCalSimHitStudy::hitsinfo::hitsinfo
hitsinfo()
Definition: HGCalSimHitStudy.cc:52
HGCalSimHitStudy::h_Ly_
std::vector< TH1D * > h_Ly_
Definition: HGCalSimHitStudy.cc:88
HcalRecNumberingRecord.h
CalibrationSummaryClient_cfi.sources
sources
Definition: CalibrationSummaryClient_cfi.py:23
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
hinfo
Definition: TauTagValidation.h:55
HGCalSimHitStudy::etamin_
const double etamin_
Definition: HGCalSimHitStudy.cc:76
HFNoseDetId.h
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
HGCalSimHitStudy::nbinEta_
const int nbinEta_
Definition: HGCalSimHitStudy.cc:77
HFNoseDetId
Definition: HFNoseDetId.h:22
edm::Handle
Definition: AssociativeIterator.h:50
HGCalSimHitStudy::analyze
void analyze(edm::Event const &, edm::EventSetup const &) override
Definition: HGCalSimHitStudy.cc:142
HGCSiliconDetId
Definition: HGCSiliconDetId.h:22
HGCalSimHitStudy::caloHitSources_
const std::vector< std::string > caloHitSources_
Definition: HGCalSimHitStudy.cc:74
ForwardSubdetector.h
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
HGCScintillatorDetId::layer
int layer() const
get the layer #
Definition: HGCScintillatorDetId.h:47
HGCalSimHitStudy::h_LayerZp_
std::vector< TH1D * > h_LayerZp_
Definition: HGCalSimHitStudy.cc:87
HFNoseDetId::waferU
int waferU() const
Definition: HFNoseDetId.h:75
HGCalSimHitStudy::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: HGCalSimHitStudy.cc:68
MakerMacros.h
HGCalSimHitStudy::analyzeHits
void analyzeHits(int, const std::string &, const std::vector< PCaloHit > &)
Definition: HGCalSimHitStudy.cc:173
HGCalGeometryMode::Trapezoid
Definition: HGCalGeometryMode.h:25
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
HGCalSimHitStudy::h_EtFiZm_
std::vector< TH2D * > h_EtFiZm_
Definition: HGCalSimHitStudy.cc:86
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
HGCalSimHitStudy::HGCalSimHitStudy
HGCalSimHitStudy(const edm::ParameterSet &)
Definition: HGCalSimHitStudy.cc:91
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
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:122
HGCalSimHitStudy::zmin_
const double zmin_
Definition: HGCalSimHitStudy.cc:75
Service.h
source
static const std::string source
Definition: EdmProvDump.cc:47
edm::ESHandle
Definition: DTSurvey.h:22
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HGCalSimHitStudy
Definition: HGCalSimHitStudy.cc:49
HGCalSimHitStudy::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: HGCalSimHitStudy.cc:325
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HGCScintillatorDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: HGCScintillatorDetId.h:44
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
HGCalSimHitStudy::h_EtFiZp_
std::vector< TH2D * > h_EtFiZp_
Definition: HGCalSimHitStudy.cc:86
HGCalSimHitStudy::nbinZ_
const int nbinZ_
Definition: HGCalSimHitStudy.cc:77
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
HGCalSimHitStudy::hcons_
const HcalDDDRecConstants * hcons_
Definition: HGCalSimHitStudy.cc:80
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TFileService.h
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
HFNoseDetId::type
int type() const
get the type
Definition: HFNoseDetId.h:50
HGCalSimHitStudy::hitsinfo::energy
double energy
Definition: HGCalSimHitStudy.cc:56
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
HGCalSimHitStudy::h_C2_
std::vector< TH1D * > h_C2_
Definition: HGCalSimHitStudy.cc:88
HGCalGeometryMode::Hexagon8Full
Definition: HGCalGeometryMode.h:25
HcalDetId.h
HcalHitRelabeller.h
HGCalSimHitStudy::layers_
std::vector< int > layers_
Definition: HGCalSimHitStudy.cc:83
PCaloHit.h
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HGCalSimHitStudy::rmin_
const double rmin_
Definition: HGCalSimHitStudy.cc:75
HcalDetId
Definition: HcalDetId.h:12
edm::Service< TFileService >
createfilelist.int
int
Definition: createfilelist.py:10
HGCalSimHitStudy::hitsinfo::phi
double phi
Definition: HGCalSimHitStudy.cc:56
iEvent
int iEvent
Definition: GenABIO.cc:224
HGCalSimHitStudy::h_E_
std::vector< TH1D * > h_E_
Definition: HGCalSimHitStudy.cc:87
HGCScintillatorDetId::type
int type() const
get the type
Definition: HGCScintillatorDetId.h:41
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
edm::LogVerbatim
Definition: MessageLogger.h:297
HGCalSimHitStudy::nLayers_
const int nLayers_
Definition: HGCalSimHitStudy.cc:77
hgcalTopologyTester_cfi.cell2
cell2
Definition: hgcalTopologyTester_cfi.py:12
HGCalSimHitStudy::nbinR_
const int nbinR_
Definition: HGCalSimHitStudy.cc:77
HFNoseDetId::cellV
int cellV() const
Definition: HFNoseDetId.h:60
HGCalSimHitStudy::hitsinfo::time
double time
Definition: HGCalSimHitStudy.cc:56
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:57
HGCalSimHitStudy::verbosity_
const int verbosity_
Definition: HGCalSimHitStudy.cc:77
HGCalSimHitStudy::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HGCalSimHitStudy.cc:120
HGCSiliconDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: HGCSiliconDetId.h:54
get
#define get
HFNoseDetId::cellU
int cellU() const
get the cell #'s in u,v or in x,y
Definition: HFNoseDetId.h:59
InputTag.h
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
HGCalSimHitStudy::rmax_
const double rmax_
Definition: HGCalSimHitStudy.cc:75
HcalHitRelabeller::relabel
DetId relabel(const uint32_t testId) const
Definition: HcalHitRelabeller.cc:49
hgcalTopologyTester_cfi.sector2
sector2
Definition: hgcalTopologyTester_cfi.py:10
HGCSiliconDetId::cellV
int cellV() const
Definition: HGCSiliconDetId.h:61
type
type
Definition: HCALResponse.h:21
HGCalSimHitStudy::h_XY_
std::vector< TH2D * > h_XY_
Definition: HGCalSimHitStudy.cc:86
HGCalDetId.h
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HGCSiliconDetId::cellU
int cellU() const
get the cell #'s in u,v or in x,y
Definition: HGCSiliconDetId.h:60
HcalDDDRecConstants::getRZ
double getRZ(const int &subdet, const int &ieta, const int &depth) const
Definition: HcalDDDRecConstants.cc:416
HcalEndcap
Definition: HcalAssistant.h:34
Frameworkfwd.h
HGCScintillatorDetId
Definition: HGCScintillatorDetId.h:21
HGCalSimHitStudy::hitsinfo
Definition: HGCalSimHitStudy.cc:51
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HGCalSimHitStudy::h_RZ_
std::vector< TH2D * > h_RZ_
Definition: HGCalSimHitStudy.cc:86
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
HcalDDDRecConstants.h
HGCalSimHitStudy::ifLayer_
const bool ifLayer_
Definition: HGCalSimHitStudy.cc:78
HGCalSimHitStudy::h_W1_
std::vector< TH1D * > h_W1_
Definition: HGCalSimHitStudy.cc:88
HGCSiliconDetId::type
int type() const
get the type
Definition: HGCSiliconDetId.h:51
HGCSiliconDetId::waferU
int waferU() const
Definition: HGCSiliconDetId.h:76
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
HGCalSimHitStudy::heRebuild_
std::vector< bool > heRebuild_
Definition: HGCalSimHitStudy.cc:81
PCaloHitContainer.h
HGCalGeometryMode::Hexagon8
Definition: HGCalGeometryMode.h:25
HcalDDDRecConstants::getMaxDepth
int getMaxDepth(const int &type) const
Definition: HcalDDDRecConstants.h:88
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalDetId::ietaAbs
constexpr int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:148
HGCalDDDConstants.h
ParameterSet.h
HcalDDDRecConstants::getEtaPhi
std::pair< double, double > getEtaPhi(const int &subdet, const int &ieta, const int &iphi) const
Definition: HcalDDDRecConstants.cc:132
HFNoseDetId::waferV
int waferV() const
Definition: HFNoseDetId.h:78
HcalDetId::zside
constexpr int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:141
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
ntuplemaker.time
time
Definition: ntuplemaker.py:310
HGCalSimHitStudy::ifNose_
const bool ifNose_
Definition: HGCalSimHitStudy.cc:78
edm::Event
Definition: Event.h:73
HGCalSimHitStudy::hgcons_
std::vector< const HGCalDDDConstants * > hgcons_
Definition: HGCalSimHitStudy.cc:79
HGCalSimHitStudy::h_W2_
std::vector< TH1D * > h_W2_
Definition: HGCalSimHitStudy.cc:88
fastmath::etaphi
std::pair< T, T > etaphi(T x, T y, T z)
Definition: FastMath.h:162
HGCalSimHitStudy::zmax_
const double zmax_
Definition: HGCalSimHitStudy.cc:75
HGCalSimHitStudy::hitsinfo::eta
double eta
Definition: HGCalSimHitStudy.cc:56
edm::InputTag
Definition: InputTag.h:15
IdealGeometryRecord
Definition: IdealGeometryRecord.h:27
hit
Definition: SiStripHitEffFromCalibTree.cc:88
HGCSiliconDetId::waferV
int waferV() const
Definition: HGCSiliconDetId.h:77
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
HGCalSimHitStudy::h_C1_
std::vector< TH1D * > h_C1_
Definition: HGCalSimHitStudy.cc:88
HGCalSimHitStudy::hitsinfo::layer
int layer
Definition: HGCalSimHitStudy.cc:57
HGCalSimHitStudy::beginJob
void beginJob() override
Definition: HGCalSimHitStudy.cc:350
HGCalSimHitStudy::etamax_
const double etamax_
Definition: HGCalSimHitStudy.cc:76
HGCalTestNumbering.h
HGCSiliconDetId::layer
int layer() const
get the layer #
Definition: HGCSiliconDetId.h:57