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