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