CMS 3D CMS Logo

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