CMS 3D CMS Logo

EtlSimHitsValidation.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Validation/MtdValidation
4 // Class: EtlSimHitsValidation
5 //
14 #include <string>
15 
20 
23 
27 
31 
36 
37 struct MTDHit {
38  float energy;
39  float time;
40  float x;
41  float y;
42  float z;
43 };
44 
46 public:
47  explicit EtlSimHitsValidation(const edm::ParameterSet&);
48  ~EtlSimHitsValidation() override;
49 
50  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
51 
52 private:
53  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
54 
55  void analyze(const edm::Event&, const edm::EventSetup&) override;
56 
57  // ------------ member data ------------
58 
60  const float hitMinEnergy1Dis_;
61  const float hitMinEnergy2Dis_;
62 
64 
67 
68  // --- histograms declaration
69 
72 
75 
79 
81 
87 
93 };
94 
95 // ------------ constructor and destructor --------------
97  : folder_(iConfig.getParameter<std::string>("folder")),
98  hitMinEnergy1Dis_(iConfig.getParameter<double>("hitMinimumEnergy1Dis")),
99  hitMinEnergy2Dis_(iConfig.getParameter<double>("hitMinimumEnergy2Dis")) {
100  etlSimHitsToken_ = consumes<CrossingFrame<PSimHit> >(iConfig.getParameter<edm::InputTag>("inputTag"));
101  mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
102  mtdtopoToken_ = esConsumes<MTDTopology, MTDTopologyRcd>();
103 }
104 
106 
107 // ------------ method called for each event ------------
109  using namespace edm;
110  using namespace geant_units::operators;
111 
112  auto geometryHandle = iSetup.getTransientHandle(mtdgeoToken_);
113  const MTDGeometry* geom = geometryHandle.product();
114 
115  auto topologyHandle = iSetup.getTransientHandle(mtdtopoToken_);
116  const MTDTopology* topology = topologyHandle.product();
117 
118  bool topo1Dis = false;
119  bool topo2Dis = false;
121  topo1Dis = true;
122  } else {
123  topo2Dis = true;
124  }
125 
126  auto etlSimHitsHandle = makeValid(iEvent.getHandle(etlSimHitsToken_));
127  MixCollection<PSimHit> etlSimHits(etlSimHitsHandle.product());
128 
129  std::unordered_map<uint32_t, MTDHit> m_etlHits[4];
130  std::unordered_map<uint32_t, std::set<int> > m_etlTrkPerCell[4];
131 
132  // --- Loop over the ETL SIM hits
133 
134  int idet = 999;
135 
136  for (auto const& simHit : etlSimHits) {
137  // --- Use only hits compatible with the in-time bunch-crossing
138  if (simHit.tof() < 0 || simHit.tof() > 25.)
139  continue;
140 
141  ETLDetId id = simHit.detUnitId();
142  if (topo1Dis) {
143  if (id.zside() == -1) {
144  idet = 0;
145  } else if (id.zside() == 1) {
146  idet = 2;
147  } else {
148  continue;
149  }
150  }
151 
152  if (topo2Dis) {
153  if ((id.zside() == -1) && (id.nDisc() == 1)) {
154  idet = 0;
155  } else if ((id.zside() == -1) && (id.nDisc() == 2)) {
156  idet = 1;
157  } else if ((id.zside() == 1) && (id.nDisc() == 1)) {
158  idet = 2;
159  } else if ((id.zside() == 1) && (id.nDisc() == 2)) {
160  idet = 3;
161  } else {
162  continue;
163  }
164  }
165 
166  m_etlTrkPerCell[idet][id.rawId()].insert(simHit.trackId());
167 
168  auto simHitIt = m_etlHits[idet].emplace(id.rawId(), MTDHit()).first;
169 
170  // --- Accumulate the energy (in MeV) of SIM hits in the same detector cell
171  (simHitIt->second).energy += convertUnitsTo(0.001_MeV, simHit.energyLoss());
172 
173  // --- Get the time of the first SIM hit in the cell
174  if ((simHitIt->second).time == 0 || simHit.tof() < (simHitIt->second).time) {
175  (simHitIt->second).time = simHit.tof();
176 
177  auto hit_pos = simHit.entryPoint();
178  (simHitIt->second).x = hit_pos.x();
179  (simHitIt->second).y = hit_pos.y();
180  (simHitIt->second).z = hit_pos.z();
181  }
182 
183  } // simHit loop
184 
185  // ==============================================================================
186  // Histogram filling
187  // ==============================================================================
188 
189  for (int idet = 0; idet < 4; ++idet) { //two disks per side
190  if (((idet == 1) || (idet == 3)) && (topo1Dis == true))
191  continue;
192  meNhits_[idet]->Fill(m_etlHits[idet].size());
193 
194  for (auto const& hit : m_etlTrkPerCell[idet]) {
195  meNtrkPerCell_[idet]->Fill((hit.second).size());
196  }
197 
198  for (auto const& hit : m_etlHits[idet]) {
199  double weight = 1.0;
200  if (topo1Dis) {
201  if ((hit.second).energy < hitMinEnergy1Dis_)
202  continue;
203  }
204  if (topo2Dis) {
205  if ((hit.second).energy < hitMinEnergy2Dis_)
206  continue;
207  }
208  // --- Get the SIM hit global position
209  ETLDetId detId(hit.first);
210  DetId geoId = detId.geographicalId();
211  const MTDGeomDet* thedet = geom->idToDet(geoId);
212  if (thedet == nullptr)
213  throw cms::Exception("EtlSimHitsValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
214  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
215 
216  Local3DPoint local_point(
217  convertMmToCm((hit.second).x), convertMmToCm((hit.second).y), convertMmToCm((hit.second).z));
218  const auto& global_point = thedet->toGlobal(local_point);
219 
220  if (topo2Dis && (detId.discSide() == 1)) {
221  weight = -weight;
222  }
223 
224  // --- Fill the histograms
225 
226  meHitEnergy_[idet]->Fill((hit.second).energy);
227  meHitTime_[idet]->Fill((hit.second).time);
228  meHitXlocal_[idet]->Fill((hit.second).x);
229  meHitYlocal_[idet]->Fill((hit.second).y);
230  meHitZlocal_[idet]->Fill((hit.second).z);
231  meOccupancy_[idet]->Fill(global_point.x(), global_point.y(), weight);
232  meHitX_[idet]->Fill(global_point.x());
233  meHitY_[idet]->Fill(global_point.y());
234  meHitZ_[idet]->Fill(global_point.z());
235  meHitPhi_[idet]->Fill(global_point.phi());
236  meHitEta_[idet]->Fill(global_point.eta());
237  meHitTvsE_[idet]->Fill((hit.second).energy, (hit.second).time);
238  meHitEvsPhi_[idet]->Fill(global_point.phi(), (hit.second).energy);
239  meHitEvsEta_[idet]->Fill(global_point.eta(), (hit.second).energy);
240  meHitTvsPhi_[idet]->Fill(global_point.phi(), (hit.second).time);
241  meHitTvsEta_[idet]->Fill(global_point.eta(), (hit.second).time);
242 
243  } // hit loop
244 
245  } // idet loop
246 }
247 
248 // ------------ method for histogram booking ------------
250  edm::Run const& run,
251  edm::EventSetup const& iSetup) {
252  ibook.setCurrentFolder(folder_);
253 
254  // --- histograms booking
255 
256  meNhits_[0] = ibook.book1D("EtlNhitsZnegD1",
257  "Number of ETL cells with SIM hits (-Z, Single(topo1D)/First(topo2D) disk);N_{ETL cells}",
258  100,
259  0.,
260  5000.);
261  meNhits_[1] = ibook.book1D(
262  "EtlNhitsZnegD2", "Number of ETL cells with SIM hits (-Z, Second disk);N_{ETL cells}", 100, 0., 5000.);
263  meNhits_[2] = ibook.book1D("EtlNhitsZposD1",
264  "Number of ETL cells with SIM hits (+Z, Single(topo1D)/First(topo2D) disk);N_{ETL cells}",
265  100,
266  0.,
267  5000.);
268  meNhits_[3] = ibook.book1D(
269  "EtlNhitsZposD2", "Number of ETL cells with SIM hits (+Z, Second Disk);N_{ETL cells}", 100, 0., 5000.);
270  meNtrkPerCell_[0] = ibook.book1D("EtlNtrkPerCellZnegD1",
271  "Number of tracks per ETL sensor (-Z, Single(topo1D)/First(topo2D) disk);N_{trk}",
272  10,
273  0.,
274  10.);
275  meNtrkPerCell_[1] =
276  ibook.book1D("EtlNtrkPerCellZnegD2", "Number of tracks per ETL sensor (-Z, Second disk);N_{trk}", 10, 0., 10.);
277  meNtrkPerCell_[2] = ibook.book1D("EtlNtrkPerCellZposD1",
278  "Number of tracks per ETL sensor (+Z, Single(topo1D)/First(topo2D) disk);N_{trk}",
279  10,
280  0.,
281  10.);
282  meNtrkPerCell_[3] =
283  ibook.book1D("EtlNtrkPerCellZposD2", "Number of tracks per ETL sensor (+Z, Second disk);N_{trk}", 10, 0., 10.);
284  meHitEnergy_[0] = ibook.book1D(
285  "EtlHitEnergyZnegD1", "ETL SIM hits energy (-Z, Single(topo1D)/First(topo2D) disk);E_{SIM} [MeV]", 100, 0., 3.);
286  meHitEnergy_[1] =
287  ibook.book1D("EtlHitEnergyZnegD2", "ETL SIM hits energy (-Z, Second disk);E_{SIM} [MeV]", 100, 0., 3.);
288  meHitEnergy_[2] = ibook.book1D(
289  "EtlHitEnergyZposD1", "ETL SIM hits energy (+Z, Single(topo1D)/First(topo2D) disk);E_{SIM} [MeV]", 100, 0., 3.);
290  meHitEnergy_[3] =
291  ibook.book1D("EtlHitEnergyZposD2", "ETL SIM hits energy (+Z, Second disk);E_{SIM} [MeV]", 100, 0., 3.);
292  meHitTime_[0] = ibook.book1D(
293  "EtlHitTimeZnegD1", "ETL SIM hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{SIM} [ns]", 100, 0., 25.);
294  meHitTime_[1] = ibook.book1D("EtlHitTimeZnegD2", "ETL SIM hits ToA (-Z, Second disk);ToA_{SIM} [ns]", 100, 0., 25.);
295  meHitTime_[2] = ibook.book1D(
296  "EtlHitTimeZposD1", "ETL SIM hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{SIM} [ns]", 100, 0., 25.);
297  meHitTime_[3] = ibook.book1D("EtlHitTimeZposD2", "ETL SIM hits ToA (+Z, Second disk);ToA_{SIM} [ns]", 100, 0., 25.);
298 
299  meHitXlocal_[0] = ibook.book1D("EtlHitXlocalZnegD1",
300  "ETL SIM local X (-Z, Single(topo1D)/First(topo2D) disk);X_{SIM}^{LOC} [mm]",
301  100,
302  -25.,
303  25.);
304  meHitXlocal_[1] =
305  ibook.book1D("EtlHitXlocalZnegD2", "ETL SIM local X (-Z, Second disk);X_{SIM}^{LOC} [mm]", 100, -25., 25.);
306  meHitXlocal_[2] = ibook.book1D("EtlHitXlocalZposD1",
307  "ETL SIM local X (+Z, Single(topo1D)/First(topo2D) disk);X_{SIM}^{LOC} [mm]",
308  100,
309  -25.,
310  25.);
311  meHitXlocal_[3] =
312  ibook.book1D("EtlHitXlocalZposD2", "ETL SIM local X (+Z, Second disk);X_{SIM}^{LOC} [mm]", 100, -25., 25.);
313 
314  meHitYlocal_[0] = ibook.book1D("EtlHitYlocalZnegD1",
315  "ETL SIM local Y (-Z, Single(topo1D)/First(topo2D) disk);Y_{SIM}^{LOC} [mm]",
316  100,
317  -48.,
318  48.);
319  meHitYlocal_[1] =
320  ibook.book1D("EtlHitYlocalZnegD2", "ETL SIM local Y (-Z, Second Disk);Y_{SIM}^{LOC} [mm]", 100, -48., 48.);
321  meHitYlocal_[2] = ibook.book1D("EtlHitYlocalZposD1",
322  "ETL SIM local Y (+Z, Single(topo1D)/First(topo2D) disk);Y_{SIM}^{LOC} [mm]",
323  100,
324  -48.,
325  48.);
326  meHitYlocal_[3] =
327  ibook.book1D("EtlHitYlocalZposD2", "ETL SIM local Y (+Z, Second disk);Y_{SIM}^{LOC} [mm]", 100, -48., 48.);
328  meHitZlocal_[0] = ibook.book1D("EtlHitZlocalZnegD1",
329  "ETL SIM local Z (-Z, Single(topo1D)/First(topo2D) disk);Z_{SIM}^{LOC} [mm]",
330  80,
331  -0.16,
332  0.16);
333  meHitZlocal_[1] =
334  ibook.book1D("EtlHitZlocalZnegD2", "ETL SIM local Z (-Z, Second disk);Z_{SIM}^{LOC} [mm]", 80, -0.16, 0.16);
335  meHitZlocal_[2] = ibook.book1D("EtlHitZlocalZposD1",
336  "ETL SIM local Z (+Z, Single(topo1D)/First(topo2D) disk);Z_{SIM}^{LOC} [mm]",
337  80,
338  -0.16,
339  0.16);
340  meHitZlocal_[3] =
341  ibook.book1D("EtlHitZlocalZposD2", "ETL SIM local Z (+Z, Second disk);Z_{SIM}^{LOC} [mm]", 80, -0.16, 0.16);
342 
343  meOccupancy_[0] =
344  ibook.book2D("EtlOccupancyZnegD1",
345  "ETL SIM hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{SIM} [cm];Y_{SIM} [cm]",
346  135,
347  -135.,
348  135.,
349  135,
350  -135.,
351  135.);
352  meOccupancy_[1] = ibook.book2D("EtlOccupancyZnegD2",
353  "ETL SIM hits occupancy (-Z, Second disk);X_{SIM} [cm];Y_{SIM} [cm]",
354  135,
355  -135.,
356  135.,
357  135,
358  -135.,
359  135.);
360  meOccupancy_[2] =
361  ibook.book2D("EtlOccupancyZposD1",
362  "ETL SIM hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{SIM} [cm];Y_{SIM} [cm]",
363  135,
364  -135.,
365  135.,
366  135,
367  -135.,
368  135.);
369  meOccupancy_[3] = ibook.book2D("EtlOccupancyZposD2",
370  "ETL SIM hits occupancy (+Z, Second disk);X_{SIM} [cm];Y_{SIM} [cm]",
371  135,
372  -135.,
373  135.,
374  135,
375  -135.,
376  135.);
377 
378  meHitX_[0] = ibook.book1D(
379  "EtlHitXZnegD1", "ETL SIM hits X (+Z, Single(topo1D)/First(topo2D) disk);X_{SIM} [cm]", 100, -130., 130.);
380  meHitX_[1] = ibook.book1D("EtlHitXZnegD2", "ETL SIM hits X (-Z, Second disk);X_{SIM} [cm]", 100, -130., 130.);
381  meHitX_[2] = ibook.book1D(
382  "EtlHitXZposD1", "ETL SIM hits X (+Z, Single(topo1D)/First(topo2D) disk);X_{SIM} [cm]", 100, -130., 130.);
383  meHitX_[3] = ibook.book1D("EtlHitXZposD2", "ETL SIM hits X (+Z, Second disk);X_{SIM} [cm]", 100, -130., 130.);
384  meHitY_[0] = ibook.book1D(
385  "EtlHitYZnegD1", "ETL SIM hits Y (-Z, Single(topo1D)/First(topo2D) disk);Y_{SIM} [cm]", 100, -130., 130.);
386  meHitY_[1] = ibook.book1D("EtlHitYZnegD2", "ETL SIM hits Y (-Z, Second disk);Y_{SIM} [cm]", 100, -130., 130.);
387  meHitY_[2] = ibook.book1D(
388  "EtlHitYZposD1", "ETL SIM hits Y (+Z, Single(topo1D)/First(topo2D) disk);Y_{SIM} [cm]", 100, -130., 130.);
389  meHitY_[3] = ibook.book1D("EtlHitYZposD2", "ETL SIM hits Y (+Z, Second disk);Y_{SIM} [cm]", 100, -130., 130.);
390  meHitZ_[0] = ibook.book1D(
391  "EtlHitZZnegD1", "ETL SIM hits Z (-Z, Single(topo1D)/First(topo2D) disk);Z_{SIM} [cm]", 100, -302., -298.);
392  meHitZ_[1] = ibook.book1D("EtlHitZZnegD2", "ETL SIM hits Z (-Z, Second disk);Z_{SIM} [cm]", 100, -304., -300.);
393  meHitZ_[2] = ibook.book1D(
394  "EtlHitZZposD1", "ETL SIM hits Z (+Z, Single(topo1D)/First(topo2D) disk);Z_{SIM} [cm]", 100, 298., 302.);
395  meHitZ_[3] = ibook.book1D("EtlHitZZposD2", "ETL SIM hits Z (+Z, Second disk);Z_{SIM} [cm]", 100, 300., 304.);
396 
397  meHitPhi_[0] = ibook.book1D(
398  "EtlHitPhiZnegD1", "ETL SIM hits #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad]", 100, -3.15, 3.15);
399  meHitPhi_[1] =
400  ibook.book1D("EtlHitPhiZnegD2", "ETL SIM hits #phi (-Z, Second disk);#phi_{SIM} [rad]", 100, -3.15, 3.15);
401  meHitPhi_[2] = ibook.book1D(
402  "EtlHitPhiZposD1", "ETL SIM hits #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad]", 100, -3.15, 3.15);
403  meHitPhi_[3] =
404  ibook.book1D("EtlHitPhiZposD2", "ETL SIM hits #phi (+Z, Second disk);#phi_{SIM} [rad]", 100, -3.15, 3.15);
405  meHitEta_[0] = ibook.book1D(
406  "EtlHitEtaZnegD1", "ETL SIM hits #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM}", 100, -3.2, -1.56);
407  meHitEta_[1] = ibook.book1D("EtlHitEtaZnegD2", "ETL SIM hits #eta (-Z, Second disk);#eta_{SIM}", 100, -3.2, -1.56);
408  meHitEta_[2] = ibook.book1D(
409  "EtlHitEtaZposD1", "ETL SIM hits #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM}", 100, 1.56, 3.2);
410  meHitEta_[3] = ibook.book1D("EtlHitEtaZposD2", "ETL SIM hits #eta (+Z, Second disk);#eta_{SIM}", 100, 1.56, 3.2);
411 
412  meHitTvsE_[0] =
413  ibook.bookProfile("EtlHitTvsEZnegD1",
414  "ETL SIM time vs energy (-Z, Single(topo1D)/First(topo2D) disk);E_{SIM} [MeV];T_{SIM} [ns]",
415  50,
416  0.,
417  2.,
418  0.,
419  100.);
420  meHitTvsE_[1] = ibook.bookProfile(
421  "EtlHitTvsEZnegD2", "ETL SIM time vs energy (-Z, Second disk);E_{SIM} [MeV];T_{SIM} [ns]", 50, 0., 2., 0., 100.);
422  meHitTvsE_[2] =
423  ibook.bookProfile("EtlHitTvsEZposD1",
424  "ETL SIM time vs energy (+Z, Single(topo1D)/First(topo2D) disk);E_{SIM} [MeV];T_{SIM} [ns]",
425  50,
426  0.,
427  2.,
428  0.,
429  100.);
430  meHitTvsE_[3] = ibook.bookProfile(
431  "EtlHitTvsEZposD2", "ETL SIM time vs energy (+Z, Second disk);E_{SIM} [MeV];T_{SIM} [ns]", 50, 0., 2., 0., 100.);
432  meHitEvsPhi_[0] =
433  ibook.bookProfile("EtlHitEvsPhiZnegD1",
434  "ETL SIM energy vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad];E_{SIM} [MeV]",
435  50,
436  -3.15,
437  3.15,
438  0.,
439  100.);
440  meHitEvsPhi_[1] = ibook.bookProfile("EtlHitEvsPhiZnegD2",
441  "ETL SIM energy vs #phi (-Z, Second disk);#phi_{SIM} [rad];E_{SIM} [MeV]",
442  50,
443  -3.15,
444  3.15,
445  0.,
446  100.);
447  meHitEvsPhi_[2] =
448  ibook.bookProfile("EtlHitEvsPhiZposD1",
449  "ETL SIM energy vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad];E_{SIM} [MeV]",
450  50,
451  -3.15,
452  3.15,
453  0.,
454  100.);
455  meHitEvsPhi_[3] = ibook.bookProfile("EtlHitEvsPhiZposD2",
456  "ETL SIM energy vs #phi (+Z, Second disk);#phi_{SIM} [rad];E_{SIM} [MeV]",
457  50,
458  -3.15,
459  3.15,
460  0.,
461  100.);
462  meHitEvsEta_[0] =
463  ibook.bookProfile("EtlHitEvsEtaZnegD1",
464  "ETL SIM energy vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM};E_{SIM} [MeV]",
465  50,
466  -3.2,
467  -1.56,
468  0.,
469  100.);
470  meHitEvsEta_[1] = ibook.bookProfile("EtlHitEvsEtaZnegD2",
471  "ETL SIM energy vs #eta (-Z, Second disk);#eta_{SIM};E_{SIM} [MeV]",
472  50,
473  -3.2,
474  -1.56,
475  0.,
476  100.);
477  meHitEvsEta_[2] =
478  ibook.bookProfile("EtlHitEvsEtaZposD1",
479  "ETL SIM energy vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM};E_{SIM} [MeV]",
480  50,
481  1.56,
482  3.2,
483  0.,
484  100.);
485  meHitEvsEta_[3] = ibook.bookProfile("EtlHitEvsEtaZposD2",
486  "ETL SIM energy vs #eta (+Z, Second disk);#eta_{SIM};E_{SIM} [MeV]",
487  50,
488  1.56,
489  3.2,
490  0.,
491  100.);
492  meHitTvsPhi_[0] =
493  ibook.bookProfile("EtlHitTvsPhiZnegD1",
494  "ETL SIM time vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad];T_{SIM} [ns]",
495  50,
496  -3.15,
497  3.15,
498  0.,
499  100.);
500  meHitTvsPhi_[1] = ibook.bookProfile("EtlHitTvsPhiZnegD2",
501  "ETL SIM time vs #phi (-Z, Second disk);#phi_{SIM} [rad];T_{SIM} [ns]",
502  50,
503  -3.15,
504  3.15,
505  0.,
506  100.);
507  meHitTvsPhi_[2] =
508  ibook.bookProfile("EtlHitTvsPhiZposD1",
509  "ETL SIM time vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad];T_{SIM} [ns]",
510  50,
511  -3.15,
512  3.15,
513  0.,
514  100.);
515  meHitTvsPhi_[3] = ibook.bookProfile("EtlHitTvsPhiZposD2",
516  "ETL SIM time vs #phi (+Z, Second disk);#phi_{SIM} [rad];T_{SIM} [ns]",
517  50,
518  -3.15,
519  3.15,
520  0.,
521  100.);
522  meHitTvsEta_[0] =
523  ibook.bookProfile("EtlHitTvsEtaZnegD1",
524  "ETL SIM time vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM};T_{SIM} [ns]",
525  50,
526  -3.2,
527  -1.56,
528  0.,
529  100.);
530  meHitTvsEta_[1] = ibook.bookProfile(
531  "EtlHitTvsEtaZnegD2", "ETL SIM time vs #eta (-Z, Second disk);#eta_{SIM};T_{SIM} [ns]", 50, -3.2, -1.56, 0., 100.);
532  meHitTvsEta_[2] =
533  ibook.bookProfile("EtlHitTvsEtaZposD1",
534  "ETL SIM time vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM};T_{SIM} [ns]",
535  50,
536  1.56,
537  3.2,
538  0.,
539  100.);
540  meHitTvsEta_[3] = ibook.bookProfile(
541  "EtlHitTvsEtaZposD2", "ETL SIM time vs #eta (+Z, Second disk);#eta_{SIM};T_{SIM} [ns]", 50, 1.56, 3.2, 0., 100.);
542 }
543 
544 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
547 
548  desc.add<std::string>("folder", "MTD/ETL/SimHits");
549  desc.add<edm::InputTag>("inputTag", edm::InputTag("mix", "g4SimHitsFastTimerHitsEndcap"));
550  desc.add<double>("hitMinimumEnergy1Dis", 0.1); // [MeV]
551  desc.add<double>("hitMinimumEnergy2Dis", 0.001); // [MeV]
552 
553  descriptions.add("etlSimHitsValid", desc);
554 }
555 
uint8_t geoId(const VFATFrame &frame)
retrieve the GEO information for this channel
size
Write out results.
int getMTDTopologyMode() const
Definition: MTDTopology.h:27
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
MonitorElement * meNhits_[4]
std::string folder_
MonitorElement * meHitYlocal_[4]
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
edm::EDGetTokenT< CrossingFrame< PSimHit > > etlSimHitsToken_
Definition: weight.py:1
MonitorElement * meOccupancy_[4]
int zside(DetId const &)
MonitorElement * meHitY_[4]
ETLDetId geographicalId() const
Definition: ETLDetId.h:110
MonitorElement * meHitTvsEta_[4]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
constexpr NumType convertUnitsTo(double desiredUnits, NumType val)
Definition: GeantUnits.h:73
void Fill(long long x)
MonitorElement * meHitXlocal_[4]
int iEvent
Definition: GenABIO.cc:224
EtlSimHitsValidation(const edm::ParameterSet &)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
MonitorElement * meHitTvsPhi_[4]
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MonitorElement * meHitX_[4]
MonitorElement * meHitEvsEta_[4]
MonitorElement * meHitEta_[4]
ETLDetId::EtlLayout etlLayoutFromTopoMode(const int &topoMode)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
MonitorElement * meHitTime_[4]
Definition: DetId.h:17
MonitorElement * meHitPhi_[4]
MonitorElement * meHitTvsE_[4]
constexpr NumType convertMmToCm(NumType millimeters)
Definition: angle_units.h:44
int discSide() const
Definition: ETLDetId.h:119
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
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:212
void analyze(const edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Detector identifier class for the Endcap Timing Layer.
Definition: ETLDetId.h:15
HLT enums.
MonitorElement * meHitZlocal_[4]
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:162
MonitorElement * meNtrkPerCell_[4]
MonitorElement * meHitEnergy_[4]
auto makeValid(const U &iOtherHandleType) noexcept(false)
Definition: ValidHandle.h:52
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
const std::string folder_
MonitorElement * meHitEvsPhi_[4]
Definition: Run.h:45
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
MonitorElement * meHitZ_[4]