CMS 3D CMS Logo

EtlLocalRecoValidation.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Validation/MtdValidation
4 // Class: EtlLocalRecoValidation
5 //
14 #include <string>
15 
20 
23 
29 
33 
40 
41 struct MTDHit {
42  float energy;
43  float time;
44  float x_local;
45  float y_local;
46  float z_local;
47 };
48 
50 public:
52  ~EtlLocalRecoValidation() override;
53 
54  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
55 
56 private:
57  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
58 
59  void analyze(const edm::Event&, const edm::EventSetup&) override;
60 
61  // ------------ member data ------------
62 
64  const float hitMinEnergy1Dis_;
65  const float hitMinEnergy2Dis_;
66  const bool LocalPosDebug_;
68  const double hitMinAmplitude_;
69 
74 
77 
78  // --- histograms declaration
79 
84 
86 
90 
96 
102 
110 
115 
125 
126  // --- UncalibratedRecHits histograms
127 
128  static constexpr int nBinsQ_ = 20;
129  static constexpr float binWidthQ_ = 1.3; // in MIP units
130 
132 
133  static constexpr int nBinsEta_ = 26;
134  static constexpr float binWidthEta_ = 0.05;
135  static constexpr float etaMin_ = 1.65;
136 
138 };
139 
140 // ------------ constructor and destructor --------------
142  : folder_(iConfig.getParameter<std::string>("folder")),
143  hitMinEnergy1Dis_(iConfig.getParameter<double>("hitMinimumEnergy1Dis")),
144  hitMinEnergy2Dis_(iConfig.getParameter<double>("hitMinimumEnergy2Dis")),
145  LocalPosDebug_(iConfig.getParameter<bool>("LocalPositionDebug")),
146  uncalibRecHitsPlots_(iConfig.getParameter<bool>("UncalibRecHitsPlots")),
147  hitMinAmplitude_(iConfig.getParameter<double>("HitMinimumAmplitude")) {
148  etlRecHitsToken_ = consumes<FTLRecHitCollection>(iConfig.getParameter<edm::InputTag>("recHitsTag"));
151  consumes<FTLUncalibratedRecHitCollection>(iConfig.getParameter<edm::InputTag>("uncalibRecHitsTag"));
152  etlSimHitsToken_ = consumes<CrossingFrame<PSimHit> >(iConfig.getParameter<edm::InputTag>("simHitsTag"));
153  etlRecCluToken_ = consumes<FTLClusterCollection>(iConfig.getParameter<edm::InputTag>("recCluTag"));
154 
155  mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
156  mtdtopoToken_ = esConsumes<MTDTopology, MTDTopologyRcd>();
157 }
158 
160 
161 // ------------ method called for each event ------------
163  using namespace edm;
164  using namespace std;
165  using namespace geant_units::operators;
166 
167  auto geometryHandle = iSetup.getTransientHandle(mtdgeoToken_);
168  const MTDGeometry* geom = geometryHandle.product();
169 
170  auto topologyHandle = iSetup.getTransientHandle(mtdtopoToken_);
171  const MTDTopology* topology = topologyHandle.product();
172 
173  bool topo1Dis = false;
174  bool topo2Dis = false;
175  if (topology->getMTDTopologyMode() <= static_cast<int>(MTDTopologyMode::Mode::barphiflat)) {
176  topo1Dis = true;
177  }
178  if (topology->getMTDTopologyMode() > static_cast<int>(MTDTopologyMode::Mode::barphiflat)) {
179  topo2Dis = true;
180  }
181 
182  auto etlRecHitsHandle = makeValid(iEvent.getHandle(etlRecHitsToken_));
183  auto etlSimHitsHandle = makeValid(iEvent.getHandle(etlSimHitsToken_));
184  auto etlRecCluHandle = makeValid(iEvent.getHandle(etlRecCluToken_));
185  MixCollection<PSimHit> etlSimHits(etlSimHitsHandle.product());
186 
187  // --- Loop over the ETL SIM hits
188  std::unordered_map<uint32_t, MTDHit> m_etlSimHits[4];
189  for (auto const& simHit : etlSimHits) {
190  // --- Use only hits compatible with the in-time bunch-crossing
191  if (simHit.tof() < 0 || simHit.tof() > 25.)
192  continue;
193 
194  ETLDetId id = simHit.detUnitId();
195 
196  int idet = -1;
197 
198  if ((id.zside() == -1) && (id.nDisc() == 1))
199  idet = 0;
200  else if ((id.zside() == -1) && (id.nDisc() == 2))
201  idet = 1;
202  else if ((id.zside() == 1) && (id.nDisc() == 1))
203  idet = 2;
204  else if ((id.zside() == 1) && (id.nDisc() == 2))
205  idet = 3;
206  else
207  continue;
208 
209  auto simHitIt = m_etlSimHits[idet].emplace(id.rawId(), MTDHit()).first;
210 
211  // --- Accumulate the energy (in MeV) of SIM hits in the same detector cell
212  (simHitIt->second).energy += convertUnitsTo(0.001_MeV, simHit.energyLoss());
213 
214  // --- Get the time of the first SIM hit in the cell
215  if ((simHitIt->second).time == 0 || simHit.tof() < (simHitIt->second).time) {
216  (simHitIt->second).time = simHit.tof();
217 
218  auto hit_pos = simHit.entryPoint();
219  (simHitIt->second).x_local = hit_pos.x();
220  (simHitIt->second).y_local = hit_pos.y();
221  (simHitIt->second).z_local = hit_pos.z();
222  }
223 
224  } // simHit loop
225 
226  // --- Loop over the ELT RECO hits
227  unsigned int n_reco_etl[4] = {0, 0, 0, 0};
228  for (const auto& recHit : *etlRecHitsHandle) {
229  double weight = 1.0;
230  ETLDetId detId = recHit.id();
231  DetId geoId = detId.geographicalId();
232  const MTDGeomDet* thedet = geom->idToDet(geoId);
233  if (thedet == nullptr)
234  throw cms::Exception("EtlLocalRecoValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
235  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
236  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
237  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
238 
239  Local3DPoint local_point(topo.localX(recHit.row()), topo.localY(recHit.column()), 0.);
240  const auto& global_point = thedet->toGlobal(local_point);
241 
242  int idet = 999;
243 
244  if (topo1Dis) {
245  if (detId.zside() == -1) {
246  idet = 0;
247  } else if (detId.zside() == 1) {
248  idet = 2;
249  } else {
250  continue;
251  }
252  }
253 
254  if (topo2Dis) {
255  if (detId.discSide() == 1) {
256  weight = -weight;
257  }
258  if ((detId.zside() == -1) && (detId.nDisc() == 1)) {
259  idet = 0;
260  } else if ((detId.zside() == -1) && (detId.nDisc() == 2)) {
261  idet = 1;
262  } else if ((detId.zside() == 1) && (detId.nDisc() == 1)) {
263  idet = 2;
264  } else if ((detId.zside() == 1) && (detId.nDisc() == 2)) {
265  idet = 3;
266  } else {
267  continue;
268  }
269  }
270 
271  // --- Fill the histograms
272 
273  meHitEnergy_[idet]->Fill(recHit.energy());
274  meHitTime_[idet]->Fill(recHit.time());
275  meHitTimeError_[idet]->Fill(recHit.timeError());
276 
277  meOccupancy_[idet]->Fill(global_point.x(), global_point.y(), weight);
278 
279  if (LocalPosDebug_) {
280  if ((idet == 0) || (idet == 1)) {
281  meLocalOccupancy_[0]->Fill(local_point.x(), local_point.y());
282  meHitXlocal_[0]->Fill(local_point.x());
283  meHitYlocal_[0]->Fill(local_point.y());
284  }
285  if ((idet == 2) || (idet == 3)) {
286  meLocalOccupancy_[1]->Fill(local_point.x(), local_point.y());
287  meHitXlocal_[1]->Fill(local_point.x());
288  meHitYlocal_[1]->Fill(local_point.y());
289  }
290  }
291  meHitX_[idet]->Fill(global_point.x());
292  meHitY_[idet]->Fill(global_point.y());
293  meHitZ_[idet]->Fill(global_point.z());
294  meHitPhi_[idet]->Fill(global_point.phi());
295  meHitEta_[idet]->Fill(global_point.eta());
296  meHitTvsE_[idet]->Fill(recHit.energy(), recHit.time());
297  meHitEvsPhi_[idet]->Fill(global_point.phi(), recHit.energy());
298  meHitEvsEta_[idet]->Fill(global_point.eta(), recHit.energy());
299  meHitTvsPhi_[idet]->Fill(global_point.phi(), recHit.time());
300  meHitTvsEta_[idet]->Fill(global_point.eta(), recHit.time());
301 
302  // Resolution histograms
303  if (m_etlSimHits[idet].count(detId.rawId()) == 1) {
304  if ((topo1Dis && m_etlSimHits[idet][detId.rawId()].energy > hitMinEnergy1Dis_) ||
305  (topo2Dis && m_etlSimHits[idet][detId.rawId()].energy > hitMinEnergy2Dis_)) {
306  float time_res = recHit.time() - m_etlSimHits[idet][detId.rawId()].time;
307  float energy_res = recHit.energy() - m_etlSimHits[idet][detId.rawId()].energy;
308 
309  meTimeRes_->Fill(time_res);
310  meEnergyRes_->Fill(energy_res);
311 
312  meTPullvsEta_->Fill(std::abs(global_point.eta()), time_res / recHit.timeError());
313  meTPullvsE_->Fill(m_etlSimHits[idet][detId.rawId()].energy, time_res / recHit.timeError());
314  }
315  }
316 
317  n_reco_etl[idet]++;
318  } // recHit loop
319 
320  if (topo1Dis) {
321  meNhits_[0]->Fill(n_reco_etl[0]);
322  meNhits_[2]->Fill(n_reco_etl[2]);
323  }
324 
325  if (topo2Dis) {
326  for (int i = 0; i < 4; i++) {
327  meNhits_[i]->Fill(n_reco_etl[i]);
328  }
329  }
330 
331  // --- Loop over the ETL RECO clusters ---
332  for (const auto& DetSetClu : *etlRecCluHandle) {
333  for (const auto& cluster : DetSetClu) {
334  double weight = 1.0;
335  if (topo1Dis) {
336  if (cluster.energy() < hitMinEnergy1Dis_)
337  continue;
338  }
339  if (topo2Dis) {
340  if (cluster.energy() < hitMinEnergy2Dis_)
341  continue;
342  }
343  ETLDetId cluId = cluster.id();
344  DetId detIdObject(cluId);
345  const auto& genericDet = geom->idToDetUnit(detIdObject);
346  if (genericDet == nullptr) {
347  throw cms::Exception("EtlLocalRecoValidation")
348  << "GeographicalID: " << std::hex << cluId << " is invalid!" << std::dec << std::endl;
349  }
350  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(genericDet->topology());
351  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
352 
353  Local3DPoint local_point(topo.localX(cluster.x()), topo.localY(cluster.y()), 0.);
354  const auto& global_point = genericDet->toGlobal(local_point);
355 
356  int idet = 999;
357 
358  if (topo1Dis) {
359  if (cluId.zside() == -1) {
360  idet = 0;
361  } else if (cluId.zside() == 1) {
362  idet = 2;
363  } else {
364  continue;
365  }
366  }
367 
368  if (topo2Dis) {
369  if (cluId.discSide() == 1) {
370  weight = -weight;
371  }
372  if ((cluId.zside() == -1) && (cluId.nDisc() == 1)) {
373  idet = 0;
374  } else if ((cluId.zside() == -1) && (cluId.nDisc() == 2)) {
375  idet = 1;
376  } else if ((cluId.zside() == 1) && (cluId.nDisc() == 1)) {
377  idet = 2;
378  } else if ((cluId.zside() == 1) && (cluId.nDisc() == 2)) {
379  idet = 3;
380  } else {
381  continue;
382  }
383  }
384 
385  meCluEnergy_[idet]->Fill(cluster.energy());
386  meCluTime_[idet]->Fill(cluster.time());
387  meCluTimeError_[idet]->Fill(cluster.timeError());
388  meCluPhi_[idet]->Fill(global_point.phi());
389  meCluEta_[idet]->Fill(global_point.eta());
390  meCluOccupancy_[idet]->Fill(global_point.x(), global_point.y(), weight);
391  meCluHits_[idet]->Fill(cluster.size());
392 
393  // --- Get the SIM hits associated to the cluster and calculate
394  // the cluster SIM energy, time and position
395 
396  double cluEneSIM = 0.;
397  double cluTimeSIM = 0.;
398  double cluLocXSIM = 0.;
399  double cluLocYSIM = 0.;
400  double cluLocZSIM = 0.;
401 
402  for (int ihit = 0; ihit < cluster.size(); ++ihit) {
403  int hit_row = cluster.minHitRow() + cluster.hitOffset()[ihit * 2];
404  int hit_col = cluster.minHitCol() + cluster.hitOffset()[ihit * 2 + 1];
405 
406  // Match the RECO hit to the corresponding SIM hit
407  for (const auto& recHit : *etlRecHitsHandle) {
408  ETLDetId hitId(recHit.id().rawId());
409 
410  if (m_etlSimHits[idet].count(hitId.rawId()) == 0)
411  continue;
412 
413  // Check the hit position
414  if (hitId.zside() != cluId.zside() || hitId.mtdRR() != cluId.mtdRR() || hitId.module() != cluId.module() ||
415  recHit.row() != hit_row || recHit.column() != hit_col)
416  continue;
417 
418  // Check the hit energy and time
419  if (recHit.energy() != cluster.hitENERGY()[ihit] || recHit.time() != cluster.hitTIME()[ihit])
420  continue;
421 
422  // SIM hit's position in the module reference frame
423  Local3DPoint local_point_sim(convertMmToCm(m_etlSimHits[idet][recHit.id().rawId()].x_local),
424  convertMmToCm(m_etlSimHits[idet][recHit.id().rawId()].y_local),
425  convertMmToCm(m_etlSimHits[idet][recHit.id().rawId()].z_local));
426 
427  // Calculate the SIM cluster's position in the module reference frame
428  cluLocXSIM += local_point_sim.x() * m_etlSimHits[idet][recHit.id().rawId()].energy;
429  cluLocYSIM += local_point_sim.y() * m_etlSimHits[idet][recHit.id().rawId()].energy;
430  cluLocZSIM += local_point_sim.z() * m_etlSimHits[idet][recHit.id().rawId()].energy;
431 
432  // Calculate the SIM cluster energy and time
433  cluEneSIM += m_etlSimHits[idet][recHit.id().rawId()].energy;
434  cluTimeSIM += m_etlSimHits[idet][recHit.id().rawId()].time * m_etlSimHits[idet][recHit.id().rawId()].energy;
435 
436  } // recHit loop
437 
438  } // ihit loop
439 
440  // --- Fill the cluster resolution histograms
441  if (cluTimeSIM > 0. && cluEneSIM > 0.) {
442  int iside = (cluId.zside() == -1 ? 0 : 1);
443 
444  cluTimeSIM /= cluEneSIM;
445 
446  Local3DPoint cluLocalPosSIM(cluLocXSIM / cluEneSIM, cluLocYSIM / cluEneSIM, cluLocZSIM / cluEneSIM);
447  const auto& cluGlobalPosSIM = genericDet->toGlobal(cluLocalPosSIM);
448 
449  float time_res = cluster.time() - cluTimeSIM;
450  float energy_res = cluster.energy() - cluEneSIM;
451  float x_res = global_point.x() - cluGlobalPosSIM.x();
452  float y_res = global_point.y() - cluGlobalPosSIM.y();
453  float z_res = global_point.z() - cluGlobalPosSIM.z();
454 
455  meCluTimeRes_[iside]->Fill(time_res);
456  meCluEnergyRes_[iside]->Fill(energy_res);
457  meCluXRes_[iside]->Fill(x_res);
458  meCluYRes_[iside]->Fill(y_res);
459  meCluZRes_[iside]->Fill(z_res);
460 
461  meCluTPullvsEta_[iside]->Fill(cluGlobalPosSIM.eta(), time_res / cluster.timeError());
462  meCluTPullvsE_[iside]->Fill(cluEneSIM, time_res / cluster.timeError());
463 
464  if (LocalPosDebug_) {
465  meCluYXLocal_[iside]->Fill(local_point.x(), local_point.y());
466  meCluYXLocalSim_[iside]->Fill(cluLocalPosSIM.x(), cluLocalPosSIM.y());
467  }
468 
469  } // if ( cluTimeSIM > 0. && cluEneSIM > 0. )
470 
471  } // cluster loop
472 
473  } // DetSetClu loop
474 
475  // --- Loop over the ETL Uncalibrated RECO hits
476  if (uncalibRecHitsPlots_) {
477  auto etlUncalibRecHitsHandle = makeValid(iEvent.getHandle(etlUncalibRecHitsToken_));
478 
479  for (const auto& uRecHit : *etlUncalibRecHitsHandle) {
480  ETLDetId detId = uRecHit.id();
481 
482  int idet = detId.zside() + detId.nDisc();
483 
484  // --- Skip UncalibratedRecHits not matched to SimHits
485  if (m_etlSimHits[idet].count(detId.rawId()) != 1)
486  continue;
487 
488  DetId geoId = detId.geographicalId();
489  const MTDGeomDet* thedet = geom->idToDet(geoId);
490  if (thedet == nullptr)
491  throw cms::Exception("EtlLocalRecoValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
492  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
493 
494  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
495  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
496 
497  Local3DPoint local_point(topo.localX(uRecHit.row()), topo.localY(uRecHit.column()), 0.);
498  const auto& global_point = thedet->toGlobal(local_point);
499 
500  // --- Fill the histograms
501 
502  if (uRecHit.amplitude().first < hitMinAmplitude_)
503  continue;
504 
505  float time_res = uRecHit.time().first - m_etlSimHits[idet][detId.rawId()].time;
506 
507  int iside = (detId.zside() == -1 ? 0 : 1);
508 
509  // amplitude histograms
510 
511  int qBin = (int)(uRecHit.amplitude().first / binWidthQ_);
512  if (qBin > nBinsQ_ - 1)
513  qBin = nBinsQ_ - 1;
514 
515  meTimeResQ_[iside][qBin]->Fill(time_res);
516 
517  // eta histograms
518 
519  int etaBin = (int)((fabs(global_point.eta()) - etaMin_) / binWidthEta_);
520  if (etaBin < 0)
521  etaBin = 0;
522  else if (etaBin > nBinsEta_ - 1)
523  etaBin = nBinsEta_ - 1;
524 
525  meTimeResEta_[iside][etaBin]->Fill(time_res);
526 
527  } // uRecHit loop
528  }
529 }
530 
531 // ------------ method for histogram booking ------------
533  edm::Run const& run,
534  edm::EventSetup const& iSetup) {
535  ibook.setCurrentFolder(folder_);
536 
537  // --- histograms booking
538 
539  meNhits_[0] = ibook.book1D(
540  "EtlNhitsZnegD1", "Number of ETL RECO hits (-Z, Single(topo1D)/First(topo2D) disk);N_{RECO}", 100, 0., 5000.);
541  meNhits_[1] = ibook.book1D("EtlNhitsZnegD2", "Number of ETL RECO hits (-Z, Second disk);N_{RECO}", 100, 0., 5000.);
542  meNhits_[2] = ibook.book1D(
543  "EtlNhitsZposD1", "Number of ETL RECO hits (+Z, Single(topo1D)/First(topo2D) disk);N_{RECO}", 100, 0., 5000.);
544  meNhits_[3] = ibook.book1D("EtlNhitsZposD2", "Number of ETL RECO hits (+Z, Second disk);N_{RECO}", 100, 0., 5000.);
545  meHitEnergy_[0] = ibook.book1D(
546  "EtlHitEnergyZnegD1", "ETL RECO hits energy (-Z, Single(topo1D)/First(topo2D) disk);E_{RECO} [MeV]", 100, 0., 3.);
547  meHitEnergy_[1] =
548  ibook.book1D("EtlHitEnergyZnegD2", "ETL RECO hits energy (-Z, Second disk);E_{RECO} [MeV]", 100, 0., 3.);
549  meHitEnergy_[2] = ibook.book1D(
550  "EtlHitEnergyZposD1", "ETL RECO hits energy (+Z, Single(topo1D)/First(topo2D) disk);E_{RECO} [MeV]", 100, 0., 3.);
551  meHitEnergy_[3] =
552  ibook.book1D("EtlHitEnergyZposD2", "ETL RECO hits energy (+Z, Second disk);E_{RECO} [MeV]", 100, 0., 3.);
553  meHitTime_[0] = ibook.book1D(
554  "EtlHitTimeZnegD1", "ETL RECO hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{RECO} [ns]", 100, 0., 25.);
555  meHitTime_[1] = ibook.book1D("EtlHitTimeZnegD2", "ETL RECO hits ToA (-Z, Second disk);ToA_{RECO} [ns]", 100, 0., 25.);
556  meHitTime_[2] = ibook.book1D(
557  "EtlHitTimeZposD1", "ETL RECO hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{RECO} [ns]", 100, 0., 25.);
558  meHitTime_[3] = ibook.book1D("EtlHitTimeZposD2", "ETL RECO hits ToA (+Z, Second disk);ToA_{RECO} [ns]", 100, 0., 25.);
559  meHitTimeError_[0] =
560  ibook.book1D("EtlHitTimeErrorZnegD1",
561  "ETL RECO hits ToA error (-Z, Single(topo1D)/First(topo2D) disk);#sigma^{ToA}_{RECO} [ns]",
562  50,
563  0.,
564  0.1);
565  meHitTimeError_[1] = ibook.book1D(
566  "EtlHitTimeErrorZnegD2", "ETL RECO hits ToA error(-Z, Second disk);#sigma^{ToA}_{RECO} [ns]", 50, 0., 0.1);
567  meHitTimeError_[2] =
568  ibook.book1D("EtlHitTimeErrorZposD1",
569  "ETL RECO hits ToA error (+Z, Single(topo1D)/First(topo2D) disk);#sigma^{ToA}_{RECO} [ns]",
570  50,
571  0.,
572  0.1);
573  meHitTimeError_[3] = ibook.book1D(
574  "EtlHitTimeErrorZposD2", "ETL RECO hits ToA error(+Z, Second disk);#sigma^{ToA}_{RECO} [ns]", 50, 0., 0.1);
575 
576  meOccupancy_[0] =
577  ibook.book2D("EtlOccupancyZnegD1",
578  "ETL RECO hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{RECO} [cm];Y_{RECO} [cm]",
579  135,
580  -135.,
581  135.,
582  135,
583  -135.,
584  135.);
585  meOccupancy_[1] = ibook.book2D("EtlOccupancyZnegD2",
586  "ETL RECO hits occupancy (-Z, Second disk);X_{RECO} [cm];Y_{RECO} [cm]",
587  135,
588  -135.,
589  135.,
590  135,
591  -135.,
592  135.);
593  meOccupancy_[2] =
594  ibook.book2D("EtlOccupancyZposD1",
595  "ETL RECO hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{RECO} [cm];Y_{RECO} [cm]",
596  135,
597  -135.,
598  135.,
599  135,
600  -135.,
601  135.);
602  meOccupancy_[3] = ibook.book2D("EtlOccupancyZposD2",
603  "ETL RECO hits occupancy (+Z, Second disk);X_{RECO} [cm];Y_{RECO} [cm]",
604  135,
605  -135.,
606  135.,
607  135,
608  -135.,
609  135.);
610  if (LocalPosDebug_) {
611  meLocalOccupancy_[0] = ibook.book2D("EtlLocalOccupancyZneg",
612  "ETL RECO hits local occupancy (-Z);X_{RECO} [cm];Y_{RECO} [cm]",
613  100,
614  -2.2,
615  2.2,
616  50,
617  -1.1,
618  1.1);
619  meLocalOccupancy_[1] = ibook.book2D("EtlLocalOccupancyZpos",
620  "ETL RECO hits local occupancy (+Z);X_{RECO} [cm];Y_{RECO} [cm]",
621  100,
622  -2.2,
623  2.2,
624  50,
625  -1.1,
626  1.1);
627  meHitXlocal_[0] = ibook.book1D("EtlHitXlocalZneg", "ETL RECO local X (-Z);X_{RECO}^{LOC} [cm]", 100, -2.2, 2.2);
628  meHitXlocal_[1] = ibook.book1D("EtlHitXlocalZpos", "ETL RECO local X (+Z);X_{RECO}^{LOC} [cm]", 100, -2.2, 2.2);
629  meHitYlocal_[0] = ibook.book1D("EtlHitYlocalZneg", "ETL RECO local Y (-Z);Y_{RECO}^{LOC} [cm]", 50, -1.1, 1.1);
630  meHitYlocal_[1] = ibook.book1D("EtlHitYlocalZpos", "ETL RECO local Y (-Z);Y_{RECO}^{LOC} [cm]", 50, -1.1, 1.1);
631  }
632  meHitX_[0] = ibook.book1D(
633  "EtlHitXZnegD1", "ETL RECO hits X (-Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]", 100, -130., 130.);
634  meHitX_[1] = ibook.book1D("EtlHitXZnegD2", "ETL RECO hits X (-Z, Second Disk);X_{RECO} [cm]", 100, -130., 130.);
635  meHitX_[2] = ibook.book1D(
636  "EtlHitXZposD1", "ETL RECO hits X (+Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]", 100, -130., 130.);
637  meHitX_[3] = ibook.book1D("EtlHitXZposD2", "ETL RECO hits X (+Z, Second Disk);X_{RECO} [cm]", 100, -130., 130.);
638  meHitY_[0] = ibook.book1D(
639  "EtlHitYZnegD1", "ETL RECO hits Y (-Z, Single(topo1D)/First(topo2D) Disk);Y_{RECO} [cm]", 100, -130., 130.);
640  meHitY_[1] = ibook.book1D("EtlHitYZnegD2", "ETL RECO hits Y (-Z, Second Disk);Y_{RECO} [cm]", 100, -130., 130.);
641  meHitY_[2] = ibook.book1D(
642  "EtlHitYZposD1", "ETL RECO hits Y (+Z, Single(topo1D)/First(topo2D) Disk);Y_{RECO} [cm]", 100, -130., 130.);
643  meHitY_[3] = ibook.book1D("EtlHitYZposD2", "ETL RECO hits Y (+Z, Second Disk);Y_{RECO} [cm]", 100, -130., 130.);
644  meHitZ_[0] = ibook.book1D(
645  "EtlHitZZnegD1", "ETL RECO hits Z (-Z, Single(topo1D)/First(topo2D) Disk);Z_{RECO} [cm]", 100, -302., -298.);
646  meHitZ_[1] = ibook.book1D("EtlHitZZnegD2", "ETL RECO hits Z (-Z, Second Disk);Z_{RECO} [cm]", 100, -304., -300.);
647  meHitZ_[2] = ibook.book1D(
648  "EtlHitZZposD1", "ETL RECO hits Z (+Z, Single(topo1D)/First(topo2D) Disk);Z_{RECO} [cm]", 100, 298., 302.);
649  meHitZ_[3] = ibook.book1D("EtlHitZZposD2", "ETL RECO hits Z (+Z, Second Disk);Z_{RECO} [cm]", 100, 300., 304.);
650  meHitPhi_[0] = ibook.book1D(
651  "EtlHitPhiZnegD1", "ETL RECO hits #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
652  meHitPhi_[1] =
653  ibook.book1D("EtlHitPhiZnegD2", "ETL RECO hits #phi (-Z, Second Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
654  meHitPhi_[2] = ibook.book1D(
655  "EtlHitPhiZposD1", "ETL RECO hits #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
656  meHitPhi_[3] =
657  ibook.book1D("EtlHitPhiZposD2", "ETL RECO hits #phi (+Z, Second Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
658  meHitEta_[0] = ibook.book1D(
659  "EtlHitEtaZnegD1", "ETL RECO hits #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, -3.2, -1.56);
660  meHitEta_[1] = ibook.book1D("EtlHitEtaZnegD2", "ETL RECO hits #eta (-Z, Second Disk);#eta_{RECO}", 100, -3.2, -1.56);
661  meHitEta_[2] = ibook.book1D(
662  "EtlHitEtaZposD1", "ETL RECO hits #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, 1.56, 3.2);
663  meHitEta_[3] = ibook.book1D("EtlHitEtaZposD2", "ETL RECO hits #eta (+Z, Second Disk);#eta_{RECO}", 100, 1.56, 3.2);
664  meTimeRes_ = ibook.book1D("EtlTimeRes", "ETL time resolution;T_{RECO}-T_{SIM}", 100, -0.5, 0.5);
665  meEnergyRes_ = ibook.book1D("EtlEnergyRes", "ETL energy resolution;E_{RECO}-E_{SIM}", 100, -0.5, 0.5);
666  meHitTvsE_[0] = ibook.bookProfile(
667  "EtlHitTvsEZnegD1",
668  "ETL RECO time vs energy (-Z, Single(topo1D)/First(topo2D) Disk);E_{RECO} [MeV];ToA_{RECO} [ns]",
669  50,
670  0.,
671  2.,
672  0.,
673  100.);
674  meHitTvsE_[1] = ibook.bookProfile("EtlHitTvsEZnegD2",
675  "ETL RECO time vs energy (-Z, Second Disk);E_{RECO} [MeV];ToA_{RECO} [ns]",
676  50,
677  0.,
678  2.,
679  0.,
680  100.);
681  meHitTvsE_[2] = ibook.bookProfile(
682  "EtlHitTvsEZposD1",
683  "ETL RECO time vs energy (+Z, Single(topo1D)/First(topo2D) Disk);E_{RECO} [MeV];ToA_{RECO} [ns]",
684  50,
685  0.,
686  2.,
687  0.,
688  100.);
689  meHitTvsE_[3] = ibook.bookProfile("EtlHitTvsEZposD2",
690  "ETL RECO time vs energy (+Z, Second Disk);E_{RECO} [MeV];ToA_{RECO} [ns]",
691  50,
692  0.,
693  2.,
694  0.,
695  100.);
696  meHitEvsPhi_[0] = ibook.bookProfile(
697  "EtlHitEvsPhiZnegD1",
698  "ETL RECO energy vs #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];E_{RECO} [MeV]",
699  50,
700  -3.2,
701  3.2,
702  0.,
703  100.);
704  meHitEvsPhi_[1] = ibook.bookProfile("EtlHitEvsPhiZnegD2",
705  "ETL RECO energy vs #phi (-Z, Second Disk);#phi_{RECO} [rad];E_{RECO} [MeV]",
706  50,
707  -3.2,
708  3.2,
709  0.,
710  100.);
711  meHitEvsPhi_[2] = ibook.bookProfile(
712  "EtlHitEvsPhiZposD1",
713  "ETL RECO energy vs #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];E_{RECO} [MeV]",
714  50,
715  -3.2,
716  3.2,
717  0.,
718  100.);
719  meHitEvsPhi_[3] = ibook.bookProfile("EtlHitEvsPhiZposD2",
720  "ETL RECO energy vs #phi (+Z, Second Disk);#phi_{RECO} [rad];E_{RECO} [MeV]",
721  50,
722  -3.2,
723  3.2,
724  0.,
725  100.);
726  meHitEvsEta_[0] =
727  ibook.bookProfile("EtlHitEvsEtaZnegD1",
728  "ETL RECO energy vs #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};E_{RECO} [MeV]",
729  50,
730  -3.2,
731  -1.56,
732  0.,
733  100.);
734  meHitEvsEta_[1] = ibook.bookProfile("EtlHitEvsEtaZnegD2",
735  "ETL RECO energy vs #eta (-Z, Second Disk);#eta_{RECO};E_{RECO} [MeV]",
736  50,
737  -3.2,
738  -1.56,
739  0.,
740  100.);
741  meHitEvsEta_[2] =
742  ibook.bookProfile("EtlHitEvsEtaZposD1",
743  "ETL RECO energy vs #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};E_{RECO} [MeV]",
744  50,
745  1.56,
746  3.2,
747  0.,
748  100.);
749  meHitEvsEta_[3] = ibook.bookProfile("EtlHitEvsEtaZposD2",
750  "ETL RECO energy vs #eta (+Z, Second Disk);#eta_{RECO};E_{RECO} [MeV]",
751  50,
752  1.56,
753  3.2,
754  0.,
755  100.);
756  meHitTvsPhi_[0] = ibook.bookProfile(
757  "EtlHitTvsPhiZnegD1",
758  "ETL RECO time vs #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
759  50,
760  -3.2,
761  3.2,
762  0.,
763  100.);
764  meHitTvsPhi_[1] = ibook.bookProfile("EtlHitTvsPhiZnegD2",
765  "ETL RECO time vs #phi (-Z, Second Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
766  50,
767  -3.2,
768  3.2,
769  0.,
770  100.);
771  meHitTvsPhi_[2] = ibook.bookProfile(
772  "EtlHitTvsPhiZposD1",
773  "ETL RECO time vs #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
774  50,
775  -3.2,
776  3.2,
777  0.,
778  100.);
779  meHitTvsPhi_[3] = ibook.bookProfile("EtlHitTvsPhiZposD2",
780  "ETL RECO time vs #phi (+Z, Second Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
781  50,
782  -3.2,
783  3.2,
784  0.,
785  100.);
786  meHitTvsEta_[0] =
787  ibook.bookProfile("EtlHitTvsEtaZnegD1",
788  "ETL RECO time vs #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};ToA_{RECO} [ns]",
789  50,
790  -3.2,
791  -1.56,
792  0.,
793  100.);
794  meHitTvsEta_[1] = ibook.bookProfile("EtlHitTvsEtaZnegD2",
795  "ETL RECO time vs #eta (-Z, Second Disk);#eta_{RECO};ToA_{RECO} [ns]",
796  50,
797  -3.2,
798  -1.56,
799  0.,
800  100.);
801  meHitTvsEta_[2] =
802  ibook.bookProfile("EtlHitTvsEtaZposD1",
803  "ETL RECO time vs #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};ToA_{RECO} [ns]",
804  50,
805  1.56,
806  3.2,
807  0.,
808  100.);
809  meHitTvsEta_[3] = ibook.bookProfile("EtlHitTvsEtaZposD2",
810  "ETL RECO time vs #eta (+Z, Second Disk);#eta_{RECO};ToA_{RECO} [ns]",
811  50,
812  1.56,
813  3.2,
814  0.,
815  100.);
816  meTPullvsE_ = ibook.bookProfile(
817  "EtlTPullvsE", "ETL time pull vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}", 20, 0., 2., -5., 5., "S");
818  meTPullvsEta_ = ibook.bookProfile("EtlTPullvsEta",
819  "ETL time pull vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
820  26,
821  1.65,
822  3.0,
823  -5.,
824  5.,
825  "S");
826  meCluTime_[0] =
827  ibook.book1D("EtlCluTimeZnegD1", "ETL cluster ToA (-Z, Single(topo1D)/First(topo2D) Disk);ToA [ns]", 250, 0, 25);
828  meCluTime_[1] = ibook.book1D("EtlCluTimeZnegD2", "ETL cluster ToA (-Z, Second Disk);ToA [ns]", 250, 0, 25);
829  meCluTime_[2] =
830  ibook.book1D("EtlCluTimeZposD1", "ETL cluster ToA (+Z, Single(topo1D)/First(topo2D) Disk);ToA [ns]", 250, 0, 25);
831  meCluTime_[3] = ibook.book1D("EtlCluTimeZposD2", "ETL cluster ToA (+Z, Second Disk);ToA [ns]", 250, 0, 25);
832  meCluTimeError_[0] = ibook.book1D("EtlCluTimeErrosZnegD1",
833  "ETL cluster time error (-Z, Single(topo1D)/First(topo2D) Disk);#sigma_{t} [ns]",
834  100,
835  0,
836  0.1);
837  meCluTimeError_[1] =
838  ibook.book1D("EtlCluTimeErrorZnegD2", "ETL cluster time error (-Z, Second Disk);#sigma_{t} [ns]", 100, 0, 0.1);
839  meCluTimeError_[2] = ibook.book1D("EtlCluTimeErrorZposD1",
840  "ETL cluster time error (+Z, Single(topo1D)/First(topo2D) Disk);#sigma_{t} [ns]",
841  100,
842  0,
843  0.1);
844  meCluTimeError_[3] =
845  ibook.book1D("EtlCluTimeErrorZposD2", "ETL cluster time error (+Z, Second Disk);#sigma_{t} [ns]", 100, 0, 0.1);
846  meCluEnergy_[0] = ibook.book1D(
847  "EtlCluEnergyZnegD1", "ETL cluster energy (-Z, Single(topo1D)/First(topo2D) Disk);E_{RECO} [MeV]", 100, 0, 10);
848  meCluEnergy_[1] =
849  ibook.book1D("EtlCluEnergyZnegD2", "ETL cluster energy (-Z, Second Disk);E_{RECO} [MeV]", 100, 0, 10);
850  meCluEnergy_[2] = ibook.book1D(
851  "EtlCluEnergyZposD1", "ETL cluster energy (+Z, Single(topo1D)/First(topo2D) Disk);E_{RECO} [MeV]", 100, 0, 10);
852  meCluEnergy_[3] =
853  ibook.book1D("EtlCluEnergyZposD2", "ETL cluster energy (+Z, Second Disk);E_{RECO} [MeV]", 100, 0, 10);
854  meCluPhi_[0] = ibook.book1D(
855  "EtlCluPhiZnegD1", "ETL cluster #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
856  meCluPhi_[1] =
857  ibook.book1D("EtlCluPhiZnegD2", "ETL cluster #phi (-Z, Second Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
858  meCluPhi_[2] = ibook.book1D(
859  "EtlCluPhiZposD1", "ETL cluster #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
860  meCluPhi_[3] =
861  ibook.book1D("EtlCluPhiZposD2", "ETL cluster #phi (+Z, Second Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
862  meCluEta_[0] = ibook.book1D(
863  "EtlCluEtaZnegD1", "ETL cluster #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, -3.2, -1.4);
864  meCluEta_[1] = ibook.book1D("EtlCluEtaZnegD2", "ETL cluster #eta (-Z, Second Disk);#eta_{RECO}", 100, -3.2, -1.4);
865  meCluEta_[2] = ibook.book1D(
866  "EtlCluEtaZposD1", "ETL cluster #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, 1.4, 3.2);
867  meCluEta_[3] = ibook.book1D("EtlCluEtaZposD2", "ETL cluster #eta (+Z, Second Disk);#eta_{RECO}", 100, 1.4, 3.2);
868  meCluHits_[0] = ibook.book1D(
869  "EtlCluHitNumberZnegD1", "ETL hits per cluster (-Z, Single(topo1D)/First(topo2D) Disk);Cluster size", 10, 0, 10);
870  meCluHits_[1] =
871  ibook.book1D("EtlCluHitNumberZnegD2", "ETL hits per cluster (-Z, Second Disk);Cluster size", 10, 0, 10);
872  meCluHits_[2] = ibook.book1D(
873  "EtlCluHitNumberZposD1", "ETL hits per cluster (+Z, Single(topo1D)/First(topo2D) Disk);Cluster size", 10, 0, 10);
874  meCluHits_[3] =
875  ibook.book1D("EtlCluHitNumberZposD2", "ETL hits per cluster (+Z, Second Disk);Cluster size", 10, 0, 10);
876  meCluOccupancy_[0] =
877  ibook.book2D("EtlCluOccupancyZnegD1",
878  "ETL cluster X vs Y (-Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
879  100,
880  -150.,
881  150.,
882  100,
883  -150,
884  150);
885  meCluOccupancy_[1] = ibook.book2D("EtlCluOccupancyZnegD2",
886  "ETL cluster X vs Y (-Z, Second Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
887  100,
888  -150.,
889  150.,
890  100,
891  -150,
892  150);
893  meCluOccupancy_[2] =
894  ibook.book2D("EtlCluOccupancyZposD1",
895  "ETL cluster X vs Y (+Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
896  100,
897  -150.,
898  150.,
899  100,
900  -150,
901  150);
902  meCluOccupancy_[3] = ibook.book2D("EtlCluOccupancyZposD2",
903  "ETL cluster X vs Y (+Z, Second Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
904  100,
905  -150.,
906  150.,
907  100,
908  -150,
909  150);
910 
911  meCluTimeRes_[0] =
912  ibook.book1D("EtlCluTimeResZneg", "ETL cluster time resolution (-Z);T_{RECO}-T_{SIM} [ns]", 100, -0.5, 0.5);
913  meCluTimeRes_[1] =
914  ibook.book1D("EtlCluTimeResZpos", "ETL cluster time resolution (+Z);T_{RECO}-T_{SIM} [MeV]", 100, -0.5, 0.5);
915  meCluEnergyRes_[0] =
916  ibook.book1D("EtlCluEnergyResZneg", "ETL cluster energy resolution (-Z);E_{RECO}-E_{SIM}", 100, -0.5, 0.5);
917  meCluEnergyRes_[1] =
918  ibook.book1D("EtlCluEnergyResZpos", "ETL cluster energy resolution (+Z);E_{RECO}-E_{SIM}", 100, -0.5, 0.5);
919 
920  meCluTPullvsE_[0] =
921  ibook.bookProfile("EtlCluTPullvsEZneg",
922  "ETL cluster time pull vs E (-Z);E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
923  25,
924  0.,
925  0.5,
926  -5.,
927  5.,
928  "S");
929  meCluTPullvsE_[1] =
930  ibook.bookProfile("EtlCluTPullvsEZpos",
931  "ETL cluster time pull vs E (+Z);E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
932  25,
933  0.,
934  0.5,
935  -5.,
936  5.,
937  "S");
938  meCluTPullvsEta_[0] =
939  ibook.bookProfile("EtlCluTPullvsEtaZneg",
940  "ETL cluster time pull vs #eta (-Z);|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
941  30,
942  -3.,
943  -1.65,
944  -5.,
945  5.,
946  "S");
947  meCluTPullvsEta_[1] =
948  ibook.bookProfile("EtlCluTPullvsEtaZpos",
949  "ETL cluster time pull vs #eta (+Z);|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
950  30,
951  1.65,
952  3.,
953  -5.,
954  5.,
955  "S");
956  meCluXRes_[0] = ibook.book1D("EtlCluXResZneg", "ETL cluster X resolution (-Z);X_{RECO}-X_{SIM} [cm]", 100, -0.1, 0.1);
957  meCluXRes_[1] = ibook.book1D("EtlCluXResZpos", "ETL cluster X resolution (+Z);X_{RECO}-X_{SIM} [cm]", 100, -0.1, 0.1);
958  meCluYRes_[0] = ibook.book1D("EtlCluYResZneg", "ETL cluster Y resolution (-Z);Y_{RECO}-Y_{SIM} [cm]", 100, -0.1, 0.1);
959  meCluYRes_[1] = ibook.book1D("EtlCluYResZpos", "ETL cluster Y resolution (+Z);Y_{RECO}-Y_{SIM} [cm]", 100, -0.1, 0.1);
960  meCluZRes_[0] =
961  ibook.book1D("EtlCluZResZneg", "ETL cluster Z resolution (-Z);Z_{RECO}-Z_{SIM} [cm]", 100, -0.003, 0.003);
962  meCluZRes_[1] =
963  ibook.book1D("EtlCluZResZpos", "ETL cluster Z resolution (+Z);Z_{RECO}-Z_{SIM} [cm]", 100, -0.003, 0.003);
964  if (LocalPosDebug_) {
965  meCluYXLocal_[0] = ibook.book2D("EtlCluYXLocalZneg",
966  "ETL cluster local Y vs X (-Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
967  100,
968  -2.2,
969  2.2,
970  100,
971  -1.1,
972  1.1);
973  meCluYXLocal_[1] = ibook.book2D("EtlCluYXLocalZpos",
974  "ETL cluster local Y vs X (+Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
975  100,
976  -2.2,
977  2.2,
978  100,
979  -1.1,
980  1.1);
981  meCluYXLocalSim_[0] = ibook.book2D("EtlCluYXLocalSimZneg",
982  "ETL cluster local Y vs X (-Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
983  200,
984  -2.2,
985  2.2,
986  200,
987  -1.1,
988  1.1);
989  meCluYXLocalSim_[1] = ibook.book2D("EtlCluYXLocalSimZpos",
990  "ETL cluster local Y vs X (+Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
991  200,
992  -2.2,
993  2.2,
994  200,
995  -1.1,
996  1.1);
997  }
998 
999  // --- UncalibratedRecHits histograms
1000 
1001  if (uncalibRecHitsPlots_) {
1002  const std::string det_name[2] = {"ETL-", "ETL+"};
1003  for (unsigned int iside = 0; iside < 2; ++iside) {
1004  for (unsigned int ihistoQ = 0; ihistoQ < nBinsQ_; ++ihistoQ) {
1005  std::string hname = Form("TimeResQ_%d_%d", iside, ihistoQ);
1006  std::string htitle =
1007  Form("%s time resolution (Q bin = %d);T_{RECO} - T_{SIM} [ns]", det_name[iside].data(), ihistoQ);
1008  meTimeResQ_[iside][ihistoQ] = ibook.book1D(hname, htitle, 200, -0.5, 0.5);
1009 
1010  } // ihistoQ loop
1011 
1012  for (unsigned int ihistoEta = 0; ihistoEta < nBinsEta_; ++ihistoEta) {
1013  std::string hname = Form("TimeResEta_%d_%d", iside, ihistoEta);
1014  std::string htitle =
1015  Form("%s time resolution (|#eta| bin = %d);T_{RECO} - T_{SIM} [ns]", det_name[iside].data(), ihistoEta);
1016  meTimeResEta_[iside][ihistoEta] = ibook.book1D(hname, htitle, 200, -0.5, 0.5);
1017 
1018  } // ihistoEta loop
1019  }
1020  }
1021 }
1022 
1023 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
1026 
1027  desc.add<std::string>("folder", "MTD/ETL/LocalReco");
1028  desc.add<edm::InputTag>("recHitsTag", edm::InputTag("mtdRecHits", "FTLEndcap"));
1029  desc.add<edm::InputTag>("uncalibRecHitsTag", edm::InputTag("mtdUncalibratedRecHits", "FTLEndcap"));
1030  desc.add<edm::InputTag>("simHitsTag", edm::InputTag("mix", "g4SimHitsFastTimerHitsEndcap"));
1031  desc.add<edm::InputTag>("recCluTag", edm::InputTag("mtdClusters", "FTLEndcap"));
1032  desc.add<double>("hitMinimumEnergy1Dis", 1.); // [MeV]
1033  desc.add<double>("hitMinimumEnergy2Dis", 0.001); // [MeV]
1034  desc.add<bool>("LocalPositionDebug", false);
1035  desc.add<bool>("UncalibRecHitsPlots", false);
1036  desc.add<double>("HitMinimumAmplitude", 0.33); // [MIP]
1037 
1038  descriptions.add("etlLocalReco", desc);
1039 }
1040 
EtlLocalRecoValidation::meTimeRes_
MonitorElement * meTimeRes_
Definition: EtlLocalRecoValidation.cc:111
EtlLocalRecoValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: EtlLocalRecoValidation.cc:532
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
EtlLocalRecoValidation::meHitTimeError_
MonitorElement * meHitTimeError_[4]
Definition: EtlLocalRecoValidation.cc:83
EtlLocalRecoValidation::nBinsEta_
static constexpr int nBinsEta_
Definition: EtlLocalRecoValidation.cc:133
etaBin
int etaBin(const l1t::HGCalMulticluster *cl)
Definition: L1EGammaEEProducer.cc:19
EtlLocalRecoValidation::hitMinAmplitude_
const double hitMinAmplitude_
Definition: EtlLocalRecoValidation.cc:68
EtlLocalRecoValidation::mtdgeoToken_
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
Definition: EtlLocalRecoValidation.cc:75
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::Run
Definition: Run.h:45
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
EtlLocalRecoValidation::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EtlLocalRecoValidation.cc:1024
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
mps_merge.weight
weight
Definition: mps_merge.py:88
CrossingFrame.h
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
MTDGeometry.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TrackerGeomDet
Definition: TrackerGeomDet.h:6
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
EtlLocalRecoValidation::meHitYlocal_
MonitorElement * meHitYlocal_[2]
Definition: EtlLocalRecoValidation.cc:89
MTDDigiGeometryRecord.h
protons_cff.time
time
Definition: protons_cff.py:35
ProxyMTDTopology::specificTopology
virtual const PixelTopology & specificTopology() const
Definition: ProxyMTDTopology.h:90
EtlLocalRecoValidation::meCluZRes_
MonitorElement * meCluZRes_[2]
Definition: EtlLocalRecoValidation.cc:122
DQMStore.h
GeomDet::topology
virtual const Topology & topology() const
Definition: GeomDet.cc:67
EtlLocalRecoValidation::meTimeResQ_
MonitorElement * meTimeResQ_[2][nBinsQ_]
Definition: EtlLocalRecoValidation.cc:131
EtlLocalRecoValidation::meLocalOccupancy_
MonitorElement * meLocalOccupancy_[2]
Definition: EtlLocalRecoValidation.cc:87
MTDTopologyMode::Mode::barphiflat
ETLDetId
Detector identifier class for the Endcap Timing Layer.
Definition: ETLDetId.h:15
MTDDetId::mtdRR
int mtdRR() const
Definition: MTDDetId.h:64
EtlLocalRecoValidation::meCluYXLocal_
MonitorElement * meCluYXLocal_[2]
Definition: EtlLocalRecoValidation.cc:123
EtlLocalRecoValidation::meHitY_
MonitorElement * meHitY_[4]
Definition: EtlLocalRecoValidation.cc:92
EtlLocalRecoValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: EtlLocalRecoValidation.cc:162
geant_units::operators
Definition: GeantUnits.h:18
MTDTopologyMode.h
EtlLocalRecoValidation::meCluYXLocalSim_
MonitorElement * meCluYXLocalSim_[2]
Definition: EtlLocalRecoValidation.cc:124
ETLDetId.h
EtlLocalRecoValidation::meHitEvsPhi_
MonitorElement * meHitEvsPhi_[4]
Definition: EtlLocalRecoValidation.cc:98
EtlLocalRecoValidation::meHitTvsPhi_
MonitorElement * meHitTvsPhi_[4]
Definition: EtlLocalRecoValidation.cc:100
EtlLocalRecoValidation
Definition: EtlLocalRecoValidation.cc:49
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
MTDTopology::getMTDTopologyMode
int getMTDTopologyMode() const
Definition: MTDTopology.h:27
ETLDetId::module
int module() const
Definition: ETLDetId.h:103
EtlLocalRecoValidation::binWidthEta_
static constexpr float binWidthEta_
Definition: EtlLocalRecoValidation.cc:134
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
EtlLocalRecoValidation::meCluTPullvsE_
MonitorElement * meCluTPullvsE_[2]
Definition: EtlLocalRecoValidation.cc:118
EtlLocalRecoValidation::meHitXlocal_
MonitorElement * meHitXlocal_[2]
Definition: EtlLocalRecoValidation.cc:88
DetId
Definition: DetId.h:17
EtlLocalRecoValidation::meHitEnergy_
MonitorElement * meHitEnergy_[4]
Definition: EtlLocalRecoValidation.cc:81
MakerMacros.h
EtlLocalRecoValidation::meCluYRes_
MonitorElement * meCluYRes_[2]
Definition: EtlLocalRecoValidation.cc:121
EtlLocalRecoValidation::folder_
const std::string folder_
Definition: EtlLocalRecoValidation.cc:63
EtlLocalRecoValidation::etlRecCluToken_
edm::EDGetTokenT< FTLClusterCollection > etlRecCluToken_
Definition: EtlLocalRecoValidation.cc:73
PSimHit.h
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
EtlLocalRecoValidation::nBinsQ_
static constexpr int nBinsQ_
Definition: EtlLocalRecoValidation.cc:128
MixCollection.h
geant_units::operators::convertUnitsTo
constexpr NumType convertUnitsTo(double desiredUnits, NumType val)
Definition: GeantUnits.h:100
MixCollection
Definition: MixCollection.h:10
rpcPointValidation_cfi.simHit
simHit
Definition: rpcPointValidation_cfi.py:24
EtlLocalRecoValidation::meCluPhi_
MonitorElement * meCluPhi_[4]
Definition: EtlLocalRecoValidation.cc:106
EtlLocalRecoValidation::binWidthQ_
static constexpr float binWidthQ_
Definition: EtlLocalRecoValidation.cc:129
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
EtlLocalRecoValidation::uncalibRecHitsPlots_
const bool uncalibRecHitsPlots_
Definition: EtlLocalRecoValidation.cc:67
ETLDetId::discSide
int discSide() const
Definition: ETLDetId.h:117
EtlLocalRecoValidation::meEnergyRes_
MonitorElement * meEnergyRes_
Definition: EtlLocalRecoValidation.cc:112
MTDHit::time
float time
Definition: BtlLocalRecoValidation.cc:46
dqm::implementation::IBooker::bookProfile
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:322
RectangularMTDTopology.h
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
EtlLocalRecoValidation::meCluEnergyRes_
MonitorElement * meCluEnergyRes_[2]
Definition: EtlLocalRecoValidation.cc:117
EtlLocalRecoValidation::meHitZ_
MonitorElement * meHitZ_[4]
Definition: EtlLocalRecoValidation.cc:93
ETLDetId::nDisc
int nDisc() const
Definition: ETLDetId.h:122
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
MTDDetId::zside
int zside() const
Definition: MTDDetId.h:61
ETLDetId::geographicalId
ETLDetId geographicalId() const
Definition: ETLDetId.h:108
Point3DBase< float, LocalTag >
DQMEDAnalyzer.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
ValidHandle.h
EtlLocalRecoValidation::meCluEta_
MonitorElement * meCluEta_[4]
Definition: EtlLocalRecoValidation.cc:107
folder_
std::string folder_
Definition: DQMEDAnalyzer.cc:60
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
MTDTopology
Definition: MTDTopology.h:13
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
edm::ParameterSet
Definition: ParameterSet.h:47
EtlLocalRecoValidation::etlSimHitsToken_
edm::EDGetTokenT< CrossingFrame< PSimHit > > etlSimHitsToken_
Definition: EtlLocalRecoValidation.cc:72
Event.h
EtlLocalRecoValidation::meCluXRes_
MonitorElement * meCluXRes_[2]
Definition: EtlLocalRecoValidation.cc:120
MTDHit::energy
float energy
Definition: BtlLocalRecoValidation.cc:45
GeantUnits.h
EtlLocalRecoValidation::meHitTime_
MonitorElement * meHitTime_[4]
Definition: EtlLocalRecoValidation.cc:82
EtlLocalRecoValidation::meHitX_
MonitorElement * meHitX_[4]
Definition: EtlLocalRecoValidation.cc:91
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
EtlLocalRecoValidation::etlUncalibRecHitsToken_
edm::EDGetTokenT< FTLUncalibratedRecHitCollection > etlUncalibRecHitsToken_
Definition: EtlLocalRecoValidation.cc:71
EtlLocalRecoValidation::meOccupancy_
MonitorElement * meOccupancy_[4]
Definition: EtlLocalRecoValidation.cc:85
EtlLocalRecoValidation::etaMin_
static constexpr float etaMin_
Definition: EtlLocalRecoValidation.cc:135
EtlLocalRecoValidation::meCluTimeError_
MonitorElement * meCluTimeError_[4]
Definition: EtlLocalRecoValidation.cc:104
edm::EventSetup
Definition: EventSetup.h:58
MTDHit::z_local
float z_local
Definition: BtlLocalRecoValidation.cc:49
EtlLocalRecoValidation::meCluOccupancy_
MonitorElement * meCluOccupancy_[4]
Definition: EtlLocalRecoValidation.cc:109
EtlLocalRecoValidation::meCluTime_
MonitorElement * meCluTime_[4]
Definition: EtlLocalRecoValidation.cc:103
edm::makeValid
auto makeValid(const U &iOtherHandleType) noexcept(false)
Definition: ValidHandle.h:52
edm::EventSetup::getTransientHandle
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:166
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EtlLocalRecoValidation::meTimeResEta_
MonitorElement * meTimeResEta_[2][nBinsEta_]
Definition: EtlLocalRecoValidation.cc:137
RectangularMTDTopology
Definition: RectangularMTDTopology.h:39
FTLRecHitCollections.h
ProxyMTDTopology
Definition: ProxyMTDTopology.h:28
ProxyMTDTopology.h
MTDGeometry
Definition: MTDGeometry.h:14
EtlLocalRecoValidation::meCluTPullvsEta_
MonitorElement * meCluTPullvsEta_[2]
Definition: EtlLocalRecoValidation.cc:119
EtlLocalRecoValidation::meCluEnergy_
MonitorElement * meCluEnergy_[4]
Definition: EtlLocalRecoValidation.cc:105
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
EtlLocalRecoValidation::hitMinEnergy2Dis_
const float hitMinEnergy2Dis_
Definition: EtlLocalRecoValidation.cc:65
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
writedatasetfile.run
run
Definition: writedatasetfile.py:27
MTDHit::y_local
float y_local
Definition: BtlLocalRecoValidation.cc:48
Frameworkfwd.h
EtlLocalRecoValidation::meNhits_
MonitorElement * meNhits_[4]
Definition: EtlLocalRecoValidation.cc:80
EtlLocalRecoValidation::~EtlLocalRecoValidation
~EtlLocalRecoValidation() override
Definition: EtlLocalRecoValidation.cc:159
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
Exception
Definition: hltDiff.cc:245
EtlLocalRecoValidation::meTPullvsEta_
MonitorElement * meTPullvsEta_
Definition: EtlLocalRecoValidation.cc:114
EtlLocalRecoValidation::meHitTvsE_
MonitorElement * meHitTvsE_[4]
Definition: EtlLocalRecoValidation.cc:97
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EtlLocalRecoValidation::mtdtopoToken_
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
Definition: EtlLocalRecoValidation.cc:76
EtlLocalRecoValidation::meHitTvsEta_
MonitorElement * meHitTvsEta_[4]
Definition: EtlLocalRecoValidation.cc:101
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
EtlLocalRecoValidation::meHitEvsEta_
MonitorElement * meHitEvsEta_[4]
Definition: EtlLocalRecoValidation.cc:99
dqm::implementation::IBooker
Definition: DQMStore.h:43
EtlLocalRecoValidation::meCluTimeRes_
MonitorElement * meCluTimeRes_[2]
Definition: EtlLocalRecoValidation.cc:116
geant_units::operators::convertMmToCm
constexpr NumType convertMmToCm(NumType millimeters)
Definition: GeantUnits.h:63
ApeEstimator_cff.qBin
qBin
Definition: ApeEstimator_cff.py:34
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParameterSet.h
EtlLocalRecoValidation::hitMinEnergy1Dis_
const float hitMinEnergy1Dis_
Definition: EtlLocalRecoValidation.cc:64
EtlLocalRecoValidation::meHitEta_
MonitorElement * meHitEta_[4]
Definition: EtlLocalRecoValidation.cc:95
EtlLocalRecoValidation::EtlLocalRecoValidation
EtlLocalRecoValidation(const edm::ParameterSet &)
Definition: EtlLocalRecoValidation.cc:141
edm::Event
Definition: Event.h:73
FTLClusterCollections.h
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
EtlLocalRecoValidation::meCluHits_
MonitorElement * meCluHits_[4]
Definition: EtlLocalRecoValidation.cc:108
edm::InputTag
Definition: InputTag.h:15
weight
Definition: weight.py:1
MTDHit::x_local
float x_local
Definition: BtlLocalRecoValidation.cc:47
EtlLocalRecoValidation::meHitPhi_
MonitorElement * meHitPhi_[4]
Definition: EtlLocalRecoValidation.cc:94
MTDTopology.h
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
EtlLocalRecoValidation::LocalPosDebug_
const bool LocalPosDebug_
Definition: EtlLocalRecoValidation.cc:66
EtlLocalRecoValidation::etlRecHitsToken_
edm::EDGetTokenT< FTLRecHitCollection > etlRecHitsToken_
Definition: EtlLocalRecoValidation.cc:70
EtlLocalRecoValidation::meTPullvsE_
MonitorElement * meTPullvsE_
Definition: EtlLocalRecoValidation.cc:113
MTDHit
Definition: BtlLocalRecoValidation.cc:44