CMS 3D CMS Logo

BtlLocalRecoValidation.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Validation/MtdValidation
4 // Class: BtlLocalRecoValidation
5 //
14 #include <string>
15 
20 
23 
30 
36 
41 
44 
46 
49 
50 #include "MTDHit.h"
51 
53 public:
55  ~BtlLocalRecoValidation() override;
56 
57  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
58 
59 private:
60  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
61 
62  void analyze(const edm::Event&, const edm::EventSetup&) override;
63 
64  bool isSameCluster(const FTLCluster&, const FTLCluster&);
65 
66  // ------------ member data ------------
67 
69  const double hitMinEnergy_;
70  const bool optionalPlots_;
72  const double hitMinAmplitude_;
73 
80 
84 
85  // --- histograms declaration
86 
88 
90 
95 
97 
98  //local position monitoring
103 
107 
116 
121 
125 
129 
131 
141 
151 
154 
157 
160 
164 
168 
172 
176 
182 
183  // resolution wrt to MtdSimLayerClusters
185 
195 
198 
201 
204 
208 
212 
216 
220 
223 
233 
236 
239 
242 
246 
250 
254 
258 
261 
263 
264  // --- UncalibratedRecHits histograms
265 
270 
271  static constexpr int nBinsQ_ = 20;
272  static constexpr float binWidthQ_ = 30.;
273  static constexpr int nBinsQEta_ = 3;
274  static constexpr float binsQEta_[nBinsQEta_ + 1] = {0., 0.65, 1.15, 1.55};
275 
278 
279  static constexpr int nBinsEta_ = 31;
280  static constexpr float binWidthEta_ = 0.05;
281  static constexpr int nBinsEtaQ_ = 7;
282  static constexpr float binsEtaQ_[nBinsEtaQ_ + 1] = {0., 30., 60., 90., 120., 150., 360., 600.};
283 
286 };
287 
289  return clu1.id() == clu2.id() && clu1.size() == clu2.size() && clu1.x() == clu2.x() && clu1.y() == clu2.y() &&
290  clu1.time() == clu2.time();
291 }
292 
293 // ------------ constructor and destructor --------------
295  : folder_(iConfig.getParameter<std::string>("folder")),
296  hitMinEnergy_(iConfig.getParameter<double>("HitMinimumEnergy")),
297  optionalPlots_(iConfig.getParameter<bool>("optionalPlots")),
298  uncalibRecHitsPlots_(iConfig.getParameter<bool>("UncalibRecHitsPlots")),
299  hitMinAmplitude_(iConfig.getParameter<double>("HitMinimumAmplitude")),
300  mtdgeoToken_(esConsumes<MTDGeometry, MTDDigiGeometryRecord>()),
301  mtdtopoToken_(esConsumes<MTDTopology, MTDTopologyRcd>()),
302  cpeToken_(esConsumes<MTDClusterParameterEstimator, MTDCPERecord>(edm::ESInputTag("", "MTDCPEBase"))) {
303  btlRecHitsToken_ = consumes<FTLRecHitCollection>(iConfig.getParameter<edm::InputTag>("recHitsTag"));
305  consumes<FTLUncalibratedRecHitCollection>(iConfig.getParameter<edm::InputTag>("uncalibRecHitsTag"));
306  btlSimHitsToken_ = consumes<CrossingFrame<PSimHit>>(iConfig.getParameter<edm::InputTag>("simHitsTag"));
307  btlRecCluToken_ = consumes<FTLClusterCollection>(iConfig.getParameter<edm::InputTag>("recCluTag"));
308  mtdTrackingHitToken_ = consumes<MTDTrackingDetSetVector>(iConfig.getParameter<edm::InputTag>("trkHitTag"));
309  r2sAssociationMapToken_ = consumes<MtdRecoClusterToSimLayerClusterAssociationMap>(
310  iConfig.getParameter<edm::InputTag>("r2sAssociationMapTag"));
311 }
312 
314 
315 // ------------ method called for each event ------------
317  using namespace edm;
318  using namespace std;
319  using namespace geant_units::operators;
320 
321  auto geometryHandle = iSetup.getTransientHandle(mtdgeoToken_);
322  const MTDGeometry* geom = geometryHandle.product();
323 
324  auto topologyHandle = iSetup.getTransientHandle(mtdtopoToken_);
325  const MTDTopology* topology = topologyHandle.product();
326 
327  auto const& cpe = iSetup.getData(cpeToken_);
328 
329  auto btlRecHitsHandle = makeValid(iEvent.getHandle(btlRecHitsToken_));
330  auto btlSimHitsHandle = makeValid(iEvent.getHandle(btlSimHitsToken_));
331  auto btlRecCluHandle = makeValid(iEvent.getHandle(btlRecCluToken_));
332  auto mtdTrkHitHandle = makeValid(iEvent.getHandle(mtdTrackingHitToken_));
333  const auto& r2sAssociationMap = iEvent.get(r2sAssociationMapToken_);
334  MixCollection<PSimHit> btlSimHits(btlSimHitsHandle.product());
335 
336 #ifdef EDM_ML_DEBUG
337  for (const auto& hits : *mtdTrkHitHandle) {
338  if (MTDDetId(hits.id()).mtdSubDetector() == MTDDetId::MTDType::BTL) {
339  LogDebug("BtlLocalRecoValidation") << "MTD cluster DetId " << hits.id() << " # cluster " << hits.size();
340  for (const auto& hit : hits) {
341  LogDebug("BtlLocalRecoValidation")
342  << "MTD_TRH: " << hit.localPosition().x() << "," << hit.localPosition().y() << " : "
343  << hit.localPositionError().xx() << "," << hit.localPositionError().yy() << " : " << hit.time() << " : "
344  << hit.timeError();
345  }
346  }
347  }
348 #endif
349 
350  // --- Loop over the BTL SIM hits
351  std::unordered_map<uint32_t, MTDHit> m_btlSimHits;
352  for (auto const& simHit : btlSimHits) {
353  // --- Use only hits compatible with the in-time bunch-crossing
354  if (simHit.tof() < 0 || simHit.tof() > 25.)
355  continue;
356 
357  DetId id = simHit.detUnitId();
358 
359  auto simHitIt = m_btlSimHits.emplace(id.rawId(), MTDHit()).first;
360 
361  // --- Accumulate the energy (in MeV) of SIM hits in the same detector cell
362  (simHitIt->second).energy += convertUnitsTo(0.001_MeV, simHit.energyLoss());
363 
364  // --- Get the time of the first SIM hit in the cell
365  if ((simHitIt->second).time == 0 || simHit.tof() < (simHitIt->second).time) {
366  (simHitIt->second).time = simHit.tof();
367 
368  auto hit_pos = simHit.localPosition();
369  (simHitIt->second).x = hit_pos.x();
370  (simHitIt->second).y = hit_pos.y();
371  (simHitIt->second).z = hit_pos.z();
372  }
373 
374  } // simHit loop
375 
376  // --- Loop over the BTL RECO hits
377  unsigned int n_reco_btl = 0;
378  unsigned int n_reco_btl_nosimhit = 0;
379  for (const auto& recHit : *btlRecHitsHandle) {
380  BTLDetId detId = recHit.id();
381  DetId geoId = detId.geographicalId(MTDTopologyMode::crysLayoutFromTopoMode(topology->getMTDTopologyMode()));
382  const MTDGeomDet* thedet = geom->idToDet(geoId);
383  if (thedet == nullptr)
384  throw cms::Exception("BtlLocalRecoValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
385  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
386  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
387  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
388 
389  Local3DPoint local_point(0., 0., 0.);
390  local_point = topo.pixelToModuleLocalPoint(local_point, detId.row(topo.nrows()), detId.column(topo.nrows()));
391  const auto& global_point = thedet->toGlobal(local_point);
392 
393  meHitEnergy_->Fill(recHit.energy());
394  meHitLogEnergy_->Fill(log10(recHit.energy()));
395  meHitTime_->Fill(recHit.time());
396  meHitTimeError_->Fill(recHit.timeError());
397  meHitLongPos_->Fill(recHit.position());
398 
399  meOccupancy_->Fill(global_point.z(), global_point.phi());
400 
401  if (optionalPlots_) {
402  meLocalOccupancy_->Fill(local_point.x() + recHit.position(), local_point.y());
403  }
404  meHitXlocal_->Fill(local_point.x());
405  meHitYlocal_->Fill(local_point.y());
406  meHitZlocal_->Fill(local_point.z());
407  meHitZ_->Fill(global_point.z());
408  meHitPhi_->Fill(global_point.phi());
409  meHitEta_->Fill(global_point.eta());
410 
411  meHitTvsE_->Fill(recHit.energy(), recHit.time());
412  meHitEvsPhi_->Fill(global_point.phi(), recHit.energy());
413  meHitEvsEta_->Fill(global_point.eta(), recHit.energy());
414  meHitEvsZ_->Fill(global_point.z(), recHit.energy());
415  meHitTvsPhi_->Fill(global_point.phi(), recHit.time());
416  meHitTvsEta_->Fill(global_point.eta(), recHit.time());
417  meHitTvsZ_->Fill(global_point.z(), recHit.time());
418 
419  // Resolution histograms
420  LogDebug("BtlLocalRecoValidation") << "RecoHit DetId= " << detId.rawId()
421  << " sim hits in id= " << m_btlSimHits.count(detId.rawId());
422  if (m_btlSimHits.count(detId.rawId()) == 1 && m_btlSimHits[detId.rawId()].energy > hitMinEnergy_) {
423  float longpos_res = recHit.position() - convertMmToCm(m_btlSimHits[detId.rawId()].x);
424  float time_res = recHit.time() - m_btlSimHits[detId.rawId()].time;
425  float energy_res = recHit.energy() - m_btlSimHits[detId.rawId()].energy;
426 
427  Local3DPoint local_point_sim(convertMmToCm(m_btlSimHits[detId.rawId()].x),
428  convertMmToCm(m_btlSimHits[detId.rawId()].y),
429  convertMmToCm(m_btlSimHits[detId.rawId()].z));
430  local_point_sim =
431  topo.pixelToModuleLocalPoint(local_point_sim, detId.row(topo.nrows()), detId.column(topo.nrows()));
432  const auto& global_point_sim = thedet->toGlobal(local_point_sim);
433 
434  meTimeRes_->Fill(time_res);
435  meTimeResVsE_->Fill(recHit.energy(), time_res);
436  meEnergyRes_->Fill(energy_res);
437  meEnergyRelResVsE_->Fill(recHit.energy(), energy_res / recHit.energy());
438 
439  meLongPosPull_->Fill(longpos_res / recHit.positionError());
440  meLongPosPullvsEta_->Fill(std::abs(global_point_sim.eta()), longpos_res / recHit.positionError());
441  meLongPosPullvsE_->Fill(m_btlSimHits[detId.rawId()].energy, longpos_res / recHit.positionError());
442 
443  meTPullvsEta_->Fill(std::abs(global_point_sim.eta()), time_res / recHit.timeError());
444  meTPullvsE_->Fill(m_btlSimHits[detId.rawId()].energy, time_res / recHit.timeError());
445  } else if (m_btlSimHits.count(detId.rawId()) == 0) {
446  n_reco_btl_nosimhit++;
447  LogDebug("BtlLocalRecoValidation") << "BTL rec hit with no corresponding sim hit in crystal, DetId= "
448  << detId.rawId() << " geoId= " << geoId.rawId() << " ene= " << recHit.energy()
449  << " time= " << recHit.time();
450  }
451 
452  n_reco_btl++;
453 
454  } // recHit loop
455 
456  if (n_reco_btl > 0) {
457  meNhits_->Fill(std::log10(n_reco_btl));
458  }
459  if (n_reco_btl_nosimhit == 0) {
460  meUnmatchedRecHit_->Fill(-1.5);
461  } else {
462  meUnmatchedRecHit_->Fill(std::log10(n_reco_btl_nosimhit));
463  }
464 
465  // --- Loop over the BTL RECO clusters ---
466  unsigned int n_clus_btl(0);
467  for (const auto& DetSetClu : *btlRecCluHandle) {
468  for (const auto& cluster : DetSetClu) {
469  if (cluster.energy() < hitMinEnergy_)
470  continue;
471  BTLDetId cluId = cluster.id();
472  DetId detIdObject(cluId);
473  const auto& genericDet = geom->idToDetUnit(detIdObject);
474  if (genericDet == nullptr) {
475  throw cms::Exception("BtlLocalRecoValidation")
476  << "GeographicalID: " << std::hex << cluId << " is invalid!" << std::dec << std::endl;
477  }
478  n_clus_btl++;
479 
480  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(genericDet->topology());
481  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
482 
483  MTDClusterParameterEstimator::ReturnType tuple = cpe.getParameters(cluster, *genericDet);
484 
485  // --- Cluster position in the module reference frame
486  LocalPoint local_point(std::get<0>(tuple));
487  const auto& global_point = genericDet->toGlobal(local_point);
488 
489  meCluEnergy_->Fill(cluster.energy());
490  meCluTime_->Fill(cluster.time());
491  meCluTimeError_->Fill(cluster.timeError());
492  meCluPhi_->Fill(global_point.phi());
493  meCluEta_->Fill(global_point.eta());
494  meCluZvsPhi_->Fill(global_point.z(), global_point.phi());
495  meCluHits_->Fill(cluster.size());
496 
497  // --- Get the SIM hits associated to the cluster and calculate
498  // the cluster SIM energy, time and position
499 
500  double cluEneSIM = 0.;
501  double cluTimeSIM = 0.;
502  double cluLocXSIM = 0.;
503  double cluLocYSIM = 0.;
504  double cluLocZSIM = 0.;
505 
506  for (int ihit = 0; ihit < cluster.size(); ++ihit) {
507  int hit_row = cluster.minHitRow() + cluster.hitOffset()[ihit * 2];
508  int hit_col = cluster.minHitCol() + cluster.hitOffset()[ihit * 2 + 1];
509 
510  // Match the RECO hit to the corresponding SIM hit
511  for (const auto& recHit : *btlRecHitsHandle) {
512  BTLDetId hitId(recHit.id().rawId());
513 
514  if (m_btlSimHits.count(hitId.rawId()) == 0)
515  continue;
516 
517  // Check the hit position
518  if (hitId.mtdSide() != cluId.mtdSide() || hitId.mtdRR() != cluId.mtdRR() || recHit.row() != hit_row ||
519  recHit.column() != hit_col)
520  continue;
521 
522  // Check the hit energy and time
523  if (recHit.energy() != cluster.hitENERGY()[ihit] || recHit.time() != cluster.hitTIME()[ihit])
524  continue;
525 
526  // SIM hit's position in the module reference frame
527  Local3DPoint local_point_sim(convertMmToCm(m_btlSimHits[recHit.id().rawId()].x),
528  convertMmToCm(m_btlSimHits[recHit.id().rawId()].y),
529  convertMmToCm(m_btlSimHits[recHit.id().rawId()].z));
530  local_point_sim =
531  topo.pixelToModuleLocalPoint(local_point_sim, hitId.row(topo.nrows()), hitId.column(topo.nrows()));
532 
533  // Calculate the SIM cluster's position in the module reference frame
534  cluLocXSIM += local_point_sim.x() * m_btlSimHits[recHit.id().rawId()].energy;
535  cluLocYSIM += local_point_sim.y() * m_btlSimHits[recHit.id().rawId()].energy;
536  cluLocZSIM += local_point_sim.z() * m_btlSimHits[recHit.id().rawId()].energy;
537 
538  // Calculate the SIM cluster energy and time
539  cluEneSIM += m_btlSimHits[recHit.id().rawId()].energy;
540  cluTimeSIM += m_btlSimHits[recHit.id().rawId()].time * m_btlSimHits[recHit.id().rawId()].energy;
541 
542  break;
543 
544  } // recHit loop
545 
546  } // ihit loop
547 
548  // Find the MTDTrackingRecHit corresponding to the cluster
549  const MTDTrackingRecHit* comp(nullptr);
550  bool matchClu = false;
551  const auto& trkHits = (*mtdTrkHitHandle)[detIdObject];
552  for (const auto& trkHit : trkHits) {
553  if (isSameCluster(trkHit.mtdCluster(), cluster)) {
554  comp = trkHit.clone();
555  matchClu = true;
556  break;
557  }
558  }
559  if (!matchClu) {
560  edm::LogWarning("BtlLocalRecoValidation")
561  << "No valid TrackingRecHit corresponding to cluster, detId = " << detIdObject.rawId();
562  }
563 
564  // --- Fill the cluster resolution histograms
565  if (cluTimeSIM > 0. && cluEneSIM > 0.) {
566  cluTimeSIM /= cluEneSIM;
567 
568  Local3DPoint cluLocalPosSIM(cluLocXSIM / cluEneSIM, cluLocYSIM / cluEneSIM, cluLocZSIM / cluEneSIM);
569  const auto& cluGlobalPosSIM = genericDet->toGlobal(cluLocalPosSIM);
570 
571  float time_res = cluster.time() - cluTimeSIM;
572  float energy_res = cluster.energy() - cluEneSIM;
573  meCluTimeRes_->Fill(time_res);
574  meCluEnergyRes_->Fill(energy_res);
575 
576  float rho_res = global_point.perp() - cluGlobalPosSIM.perp();
577  float phi_res = global_point.phi() - cluGlobalPosSIM.phi();
578 
579  meCluRhoRes_->Fill(rho_res);
580  meCluPhiRes_->Fill(phi_res);
581 
582  float xlocal_res = local_point.x() - cluLocalPosSIM.x();
583  float ylocal_res = local_point.y() - cluLocalPosSIM.y();
584 
585  float z_res = global_point.z() - cluGlobalPosSIM.z();
586 
587  meCluZRes_->Fill(z_res);
588 
589  if (matchClu && comp != nullptr) {
590  meCluLocalXRes_->Fill(xlocal_res);
591 
592  if (global_point.z() > 0) {
593  meCluLocalYResZGlobPlus_->Fill(ylocal_res);
594  meCluLocalYPullZGlobPlus_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
595  } else {
596  meCluLocalYResZGlobMinus_->Fill(ylocal_res);
597  meCluLocalYPullZGlobMinus_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
598  }
599  if (optionalPlots_) {
600  if (cluster.size() == 1) { // single-crystal clusters
601  meCluSingCrystalLocalYRes_->Fill(ylocal_res);
602  if (global_point.z() > 0) {
604  } else {
606  }
607  } // end of single-crystal clusters
608  else {
609  if (cluster.size() > 1) { // multi-crystal clusters
610  meCluMultiCrystalLocalYRes_->Fill(ylocal_res);
611  if (global_point.z() > 0) {
613  } else {
615  }
616  }
617  } // end of multi-crystal clusters
618 
619  if (abs(global_point.eta()) < 0.3) {
620  meCluCentralLocalYRes_->Fill(ylocal_res);
621  if (global_point.z() > 0) {
623  } else {
625  }
626 
627  } else {
628  if (abs(global_point.eta()) > 1) {
629  meCluForwardLocalYRes_->Fill(ylocal_res);
630  if (global_point.z() > 0) {
631  meCluForwardPlusLocalYRes_->Fill(ylocal_res);
632  } else {
633  meCluForwardMinusLocalYRes_->Fill(ylocal_res);
634  }
635  }
636  }
637 
638  meCluYXLocal_->Fill(local_point.x(), local_point.y());
639  meCluYXLocalSim_->Fill(cluLocalPosSIM.x(), cluLocalPosSIM.y());
640 
641  } //end of optional plots
642 
643  meCluLocalXPull_->Fill(xlocal_res / std::sqrt(comp->localPositionError().xx()));
644  meCluZPull_->Fill(z_res / std::sqrt(comp->globalPositionError().czz()));
645  meCluXLocalErr_->Fill(std::sqrt(comp->localPositionError().xx()));
646  meCluYLocalErr_->Fill(std::sqrt(comp->localPositionError().yy()));
647  }
648 
649  meCluEnergyvsEta_->Fill(std::abs(cluGlobalPosSIM.eta()), cluster.energy());
650  meCluHitsvsEta_->Fill(std::abs(cluGlobalPosSIM.eta()), cluster.size());
651 
652  meCluTResvsEta_->Fill(std::abs(cluGlobalPosSIM.eta()), time_res);
653  meCluTResvsE_->Fill(cluEneSIM, time_res);
654 
655  meCluTPullvsEta_->Fill(std::abs(cluGlobalPosSIM.eta()), time_res / cluster.timeError());
656  meCluTPullvsE_->Fill(cluEneSIM, time_res / cluster.timeError());
657 
658  } // if ( cluTimeSIM > 0. && cluEneSIM > 0. )
659  else {
660  meUnmatchedCluEnergy_->Fill(std::log10(cluster.energy()));
661  }
662 
663  // --- Fill the cluster resolution histograms using MtdSimLayerClusters as mtd truth
664  edm::Ref<edmNew::DetSetVector<FTLCluster>, FTLCluster> clusterRef = edmNew::makeRefTo(btlRecCluHandle, &cluster);
665  auto itp = r2sAssociationMap.equal_range(clusterRef);
666  if (itp.first != itp.second) {
667  std::vector<MtdSimLayerClusterRef> simClustersRefs =
668  (*itp.first).second; // the range of itp.first, itp.second should be always 1
669  for (unsigned int i = 0; i < simClustersRefs.size(); i++) {
670  auto simClusterRef = simClustersRefs[i];
671 
672  float simClusEnergy = convertUnitsTo(0.001_MeV, (*simClusterRef).simLCEnergy()); // GeV --> MeV
673  float simClusTime = (*simClusterRef).simLCTime();
674  LocalPoint simClusLocalPos = (*simClusterRef).simLCPos();
675  const auto& simClusGlobalPos = genericDet->toGlobal(simClusLocalPos);
676  unsigned int idOffset = (*simClusterRef).trackIdOffset();
677 
678  float time_res = cluster.time() - simClusTime;
679  float energy_res = cluster.energy() - simClusEnergy;
680  float rho_res = global_point.perp() - simClusGlobalPos.perp();
681  float phi_res = global_point.phi() - simClusGlobalPos.phi();
682  float z_res = global_point.z() - simClusGlobalPos.z();
683  float xlocal_res = local_point.x() - simClusLocalPos.x();
684  float ylocal_res = local_point.y() - simClusLocalPos.y();
685 
686  meCluTrackIdOffset_->Fill(float(idOffset));
687 
688  // -- Fill for direct hits
689  if (idOffset == 0) {
690  meCluTimeRes_simLC_->Fill(time_res);
691  meCluEnergyRes_simLC_->Fill(energy_res);
692  meCluRhoRes_simLC_->Fill(rho_res);
693  meCluPhiRes_simLC_->Fill(phi_res);
694  meCluZRes_simLC_->Fill(z_res);
695 
696  if (matchClu && comp != nullptr) {
697  meCluLocalXRes_simLC_->Fill(xlocal_res);
698 
699  if (global_point.z() > 0) {
701  meCluLocalYPullZGlobPlus_simLC_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
702  } else {
704  meCluLocalYPullZGlobMinus_simLC_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
705  }
706  if (optionalPlots_) {
707  if (cluster.size() == 1) { // single-crystal clusters
709  if (global_point.z() > 0) {
711  } else {
713  }
714  } // end of single-crystal clusters
715  else {
716  if (cluster.size() > 1) { // multi-crystal clusters
718  if (global_point.z() > 0) {
720  } else {
722  }
723  }
724  } // end of multi-crystal clusters
725 
726  if (abs(global_point.eta()) < 0.3) {
727  meCluCentralLocalYRes_simLC_->Fill(ylocal_res);
728  if (global_point.z() > 0) {
730  } else {
732  }
733  } else {
734  if (abs(global_point.eta()) > 1) {
735  meCluForwardLocalYRes_simLC_->Fill(ylocal_res);
736  if (global_point.z() > 0) {
738  } else {
740  }
741  }
742  }
743  } //end of optional plots
744 
745  meCluLocalXPull_simLC_->Fill(xlocal_res / std::sqrt(comp->localPositionError().xx()));
746  meCluZPull_simLC_->Fill(z_res / std::sqrt(comp->globalPositionError().czz()));
747  }
748 
749  meCluTResvsEta_simLC_->Fill(std::abs(simClusGlobalPos.eta()), time_res);
750  meCluTResvsE_simLC_->Fill(simClusEnergy, time_res);
751 
752  meCluTPullvsEta_simLC_->Fill(std::abs(simClusGlobalPos.eta()), time_res / cluster.timeError());
753  meCluTPullvsE_simLC_->Fill(simClusEnergy, time_res / cluster.timeError());
754 
755  } // if idOffset == 0
756  else {
762 
763  if (matchClu && comp != nullptr) {
765 
766  if (global_point.z() > 0) {
769  std::sqrt(comp->localPositionError().yy()));
770  } else {
773  std::sqrt(comp->localPositionError().yy()));
774  }
775  if (optionalPlots_) {
776  if (cluster.size() == 1) { // single-crystal clusters
778  if (global_point.z() > 0) {
780  } else {
782  }
783  } // end of single-crystal clusters
784  else {
785  if (cluster.size() > 1) { // multi-crystal clusters
787  if (global_point.z() > 0) {
789  } else {
791  }
792  }
793  } // end of multi-crystal clusters
794 
795  if (abs(global_point.eta()) < 0.3) {
797  if (global_point.z() > 0) {
799  } else {
801  }
802  } else {
803  if (abs(global_point.eta()) > 1) {
805  if (global_point.z() > 0) {
807  } else {
809  }
810  }
811  }
812  } //end of optional plots
813 
814  meCluLocalXPull_simLC_fromIndirectHits_->Fill(xlocal_res / std::sqrt(comp->localPositionError().xx()));
815  meCluZPull_simLC_fromIndirectHits_->Fill(z_res / std::sqrt(comp->globalPositionError().czz()));
816  }
817 
818  meCluTResvsEta_simLC_fromIndirectHits_->Fill(std::abs(simClusGlobalPos.eta()), time_res);
819  meCluTResvsE_simLC_fromIndirectHits_->Fill(simClusEnergy, time_res);
820 
821  meCluTPullvsEta_simLC_fromIndirectHits_->Fill(std::abs(simClusGlobalPos.eta()),
822  time_res / cluster.timeError());
823  meCluTPullvsE_simLC_fromIndirectHits_->Fill(simClusEnergy, time_res / cluster.timeError());
824  }
825 
826  } // simLayerClusterRefs loop
827  }
828 
829  } // cluster loop
830 
831  } // DetSetClu loop
832 
833  if (n_clus_btl > 0)
834  meNclusters_->Fill(log10(n_clus_btl));
835 
836  // --- This is to count the number of processed events, needed in the harvesting step
837  meNevents_->Fill(0.5);
838 
839  // --- Loop over the BTL Uncalibrated RECO hits
840  auto btlUncalibRecHitsHandle = makeValid(iEvent.getHandle(btlUncalibRecHitsToken_));
841 
842  for (const auto& uRecHit : *btlUncalibRecHitsHandle) {
843  BTLDetId detId = uRecHit.id();
844 
845  // --- Skip UncalibratedRecHits not matched to SimHits
846  if (m_btlSimHits.count(detId.rawId()) != 1)
847  continue;
848 
849  // --- Combine the information from the left and right BTL cell sides
850 
851  float nHits = 0.;
852  float hit_amplitude = 0.;
853  float hit_time = 0.;
854 
855  // left side:
856  if (uRecHit.amplitude().first > 0.) {
857  hit_amplitude += uRecHit.amplitude().first;
858  hit_time += uRecHit.time().first;
859  nHits += 1.;
860  }
861  // right side:
862  if (uRecHit.amplitude().second > 0.) {
863  hit_amplitude += uRecHit.amplitude().second;
864  hit_time += uRecHit.time().second;
865  nHits += 1.;
866  }
867 
868  hit_amplitude /= nHits;
869  hit_time /= nHits;
870 
871  // --- Fill the histograms
872 
873  if (hit_amplitude < hitMinAmplitude_)
874  continue;
875 
876  meUncEneRVsX_->Fill(uRecHit.position(), uRecHit.amplitude().first - hit_amplitude);
877  meUncEneLVsX_->Fill(uRecHit.position(), uRecHit.amplitude().second - hit_amplitude);
878 
879  meUncTimeRVsX_->Fill(uRecHit.position(), uRecHit.time().first - hit_time);
880  meUncTimeLVsX_->Fill(uRecHit.position(), uRecHit.time().second - hit_time);
881 
882  if (uncalibRecHitsPlots_) {
883  DetId geoId = detId.geographicalId(MTDTopologyMode::crysLayoutFromTopoMode(topology->getMTDTopologyMode()));
884  const MTDGeomDet* thedet = geom->idToDet(geoId);
885  if (thedet == nullptr)
886  throw cms::Exception("BtlLocalRecoValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
887  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
888  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
889  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
890 
891  Local3DPoint local_point(0., 0., 0.);
892  local_point = topo.pixelToModuleLocalPoint(local_point, detId.row(topo.nrows()), detId.column(topo.nrows()));
893  const auto& global_point = thedet->toGlobal(local_point);
894 
895  float time_res = hit_time - m_btlSimHits[detId.rawId()].time;
896 
897  // amplitude histograms
898 
899  int qBin = (int)(hit_amplitude / binWidthQ_);
900  if (qBin > nBinsQ_ - 1)
901  qBin = nBinsQ_ - 1;
902 
903  meTimeResQ_[qBin]->Fill(time_res);
904 
905  int etaBin = 0;
906  for (int ibin = 1; ibin < nBinsQEta_; ++ibin)
907  if (fabs(global_point.eta()) >= binsQEta_[ibin] && fabs(global_point.eta()) < binsQEta_[ibin + 1])
908  etaBin = ibin;
909 
910  meTimeResQvsEta_[qBin][etaBin]->Fill(time_res);
911 
912  // eta histograms
913 
914  etaBin = (int)(fabs(global_point.eta()) / binWidthEta_);
915  if (etaBin > nBinsEta_ - 1)
916  etaBin = nBinsEta_ - 1;
917 
918  meTimeResEta_[etaBin]->Fill(time_res);
919 
920  qBin = 0;
921  for (int ibin = 1; ibin < nBinsEtaQ_; ++ibin)
922  if (hit_amplitude >= binsEtaQ_[ibin] && hit_amplitude < binsEtaQ_[ibin + 1])
923  qBin = ibin;
924 
925  meTimeResEtavsQ_[etaBin][qBin]->Fill(time_res);
926  }
927  } // uRecHit loop}
928 }
929 
930 // ------------ method for histogram booking ------------
932  edm::Run const& run,
933  edm::EventSetup const& iSetup) {
934  ibook.setCurrentFolder(folder_);
935 
936  // --- histograms booking
937 
938  meNevents_ = ibook.book1D("BtlNevents", "Number of events", 1, 0., 1.);
939 
940  meNhits_ = ibook.book1D("BtlNhits", "Number of BTL RECO hits;log_{10}(N_{RECO})", 100, 0., 5.25);
941 
942  meHitEnergy_ = ibook.book1D("BtlHitEnergy", "BTL RECO hits energy;E_{RECO} [MeV]", 100, 0., 20.);
943  meHitLogEnergy_ = ibook.book1D("BtlHitLogEnergy", "BTL RECO hits energy;log_{10}(E_{RECO} [MeV])", 16, -0.1, 1.5);
944  meHitTime_ = ibook.book1D("BtlHitTime", "BTL RECO hits ToA;ToA_{RECO} [ns]", 100, 0., 25.);
945  meHitTimeError_ = ibook.book1D("BtlHitTimeError", "BTL RECO hits ToA error;#sigma^{ToA}_{RECO} [ns]", 50, 0., 0.1);
946  meOccupancy_ = ibook.book2D(
947  "BtlOccupancy", "BTL RECO hits occupancy;Z_{RECO} [cm]; #phi_{RECO} [rad]", 65, -260., 260., 126, -3.2, 3.2);
948  if (optionalPlots_) {
949  meLocalOccupancy_ = ibook.book2D(
950  "BtlLocalOccupancy", "BTL RECO hits local occupancy;X_{RECO} [cm]; Y_{RECO} [cm]", 100, 10., 10., 60, -3., 3.);
951  }
952  meHitXlocal_ = ibook.book1D("BtlHitXlocal", "BTL RECO local X;X_{RECO}^{LOC} [cm]", 100, -10., 10.);
953  meHitYlocal_ = ibook.book1D("BtlHitYlocal", "BTL RECO local Y;Y_{RECO}^{LOC} [cm]", 60, -3, 3);
954  meHitZlocal_ = ibook.book1D("BtlHitZlocal", "BTL RECO local z;z_{RECO}^{LOC} [cm]", 8, -0.4, 0.4);
955  meHitZ_ = ibook.book1D("BtlHitZ", "BTL RECO hits Z;Z_{RECO} [cm]", 100, -260., 260.);
956  meHitPhi_ = ibook.book1D("BtlHitPhi", "BTL RECO hits #phi;#phi_{RECO} [rad]", 126, -3.2, 3.2);
957  meHitEta_ = ibook.book1D("BtlHitEta", "BTL RECO hits #eta;#eta_{RECO}", 100, -1.55, 1.55);
958  meHitTvsE_ =
959  ibook.bookProfile("BtlHitTvsE", "BTL RECO ToA vs energy;E_{RECO} [MeV];ToA_{RECO} [ns]", 50, 0., 20., 0., 100.);
960  meHitEvsPhi_ = ibook.bookProfile(
961  "BtlHitEvsPhi", "BTL RECO energy vs #phi;#phi_{RECO} [rad];E_{RECO} [MeV]", 50, -3.2, 3.2, 0., 100.);
962  meHitEvsEta_ = ibook.bookProfile(
963  "BtlHitEvsEta", "BTL RECO energy vs #eta;#eta_{RECO};E_{RECO} [MeV]", 50, -1.55, 1.55, 0., 100.);
964  meHitEvsZ_ =
965  ibook.bookProfile("BtlHitEvsZ", "BTL RECO energy vs Z;Z_{RECO} [cm];E_{RECO} [MeV]", 50, -260., 260., 0., 100.);
966  meHitTvsPhi_ = ibook.bookProfile(
967  "BtlHitTvsPhi", "BTL RECO ToA vs #phi;#phi_{RECO} [rad];ToA_{RECO} [ns]", 50, -3.2, 3.2, 0., 100.);
968  meHitTvsEta_ =
969  ibook.bookProfile("BtlHitTvsEta", "BTL RECO ToA vs #eta;#eta_{RECO};ToA_{RECO} [ns]", 50, -1.6, 1.6, 0., 100.);
970  meHitTvsZ_ =
971  ibook.bookProfile("BtlHitTvsZ", "BTL RECO ToA vs Z;Z_{RECO} [cm];ToA_{RECO} [ns]", 50, -260., 260., 0., 100.);
972  meHitLongPos_ = ibook.book1D("BtlLongPos", "BTL RECO hits longitudinal position;long. pos._{RECO}", 50, -5, 5);
973  meTimeRes_ = ibook.book1D("BtlTimeRes", "BTL time resolution;T_{RECO}-T_{SIM}", 100, -0.5, 0.5);
974  meTimeResVsE_ = ibook.bookProfile(
975  "BtlTimeResvsE", "BTL time resolution vs hit energy;E_{RECO} [MeV];T_{RECO}-T_{SIM}", 50, 0., 20., -0.5, 0.5, "S");
976  meEnergyRes_ = ibook.book1D("BtlEnergyRes", "BTL energy resolution;E_{RECO}-E_{SIM}", 100, -0.5, 0.5);
977  meEnergyRelResVsE_ = ibook.bookProfile("BtlEnergyRelResvsE",
978  "BTL relative energy resolution vs hit energy;E_{RECO} [MeV];E_{RECO}-E_{SIM}",
979  50,
980  0.,
981  20.,
982  -0.15,
983  0.15,
984  "S");
985  meLongPosPull_ = ibook.book1D("BtlLongPosPull",
986  "BTL longitudinal position pull;X^{loc}_{RECO}-X^{loc}_{SIM}/#sigma_{xloc_{RECO}}",
987  100,
988  -5.,
989  5.);
991  "BtlLongposPullvsE",
992  "BTL longitudinal position pull vs E;E_{SIM} [MeV];X^{loc}_{RECO}-X^{loc}_{SIM}/#sigma_{xloc_{RECO}}",
993  20,
994  0.,
995  20.,
996  -5.,
997  5.,
998  "S");
1000  "BtlLongposPullvsEta",
1001  "BTL longitudinal position pull vs #eta;|#eta_{RECO}|;X^{loc}_{RECO}-X^{loc}_{SIM}/#sigma_{xloc_{RECO}}",
1002  32,
1003  0,
1004  1.55,
1005  -5.,
1006  5.,
1007  "S");
1008  meTPullvsE_ = ibook.bookProfile(
1009  "BtlTPullvsE", "BTL time pull vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}", 20, 0., 20., -5., 5., "S");
1010  meTPullvsEta_ = ibook.bookProfile("BtlTPullvsEta",
1011  "BTL time pull vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1012  30,
1013  0,
1014  1.55,
1015  -5.,
1016  5.,
1017  "S");
1018 
1019  meUnmatchedRecHit_ = ibook.book1D(
1020  "UnmatchedRecHit", "log10(#BTL crystals with rechits but no simhit);log10(#BTL rechits)", 80, -2., 6.);
1021 
1022  meNclusters_ = ibook.book1D("BtlNclusters", "Number of BTL RECO clusters;log_{10}(N_{RECO})", 100, 0., 5.25);
1023  meCluTime_ = ibook.book1D("BtlCluTime", "BTL cluster time ToA;ToA [ns]", 250, 0, 25);
1024  meCluTimeError_ = ibook.book1D("BtlCluTimeError", "BTL cluster time error;#sigma_{t} [ns]", 100, 0, 0.1);
1025  meCluEnergy_ = ibook.book1D("BtlCluEnergy", "BTL cluster energy;E_{RECO} [MeV]", 100, 0, 20);
1026  meCluPhi_ = ibook.book1D("BtlCluPhi", "BTL cluster #phi;#phi_{RECO} [rad]", 144, -3.2, 3.2);
1027  meCluEta_ = ibook.book1D("BtlCluEta", "BTL cluster #eta;#eta_{RECO}", 100, -1.55, 1.55);
1028  meCluHits_ = ibook.book1D("BtlCluHitNumber", "BTL hits per cluster; Cluster size", 10, 0, 10);
1029  meCluZvsPhi_ = ibook.book2D(
1030  "BtlOccupancy", "BTL cluster Z vs #phi;Z_{RECO} [cm]; #phi_{RECO} [rad]", 144, -260., 260., 50, -3.2, 3.2);
1032  "BtlCluEnergyVsEta", "BTL cluster energy vs #eta; |#eta_{RECO}|; E_{RECO} [cm]", 30, 0., 1.55, 0., 20., "S");
1033  meCluHitsvsEta_ = ibook.bookProfile(
1034  "BtlCluHitsVsEta", "BTL hits per cluster vs #eta; |#eta_{RECO}|;Cluster size", 30, 0., 1.55, 0., 10., "S");
1035 
1036  meCluTimeRes_ = ibook.book1D("BtlCluTimeRes", "BTL cluster time resolution;T_{RECO}-T_{SIM} [ns]", 100, -0.5, 0.5);
1037  meCluEnergyRes_ =
1038  ibook.book1D("BtlCluEnergyRes", "BTL cluster energy resolution;E_{RECO}-E_{SIM} [MeV]", 100, -0.5, 0.5);
1039  meCluTResvsE_ = ibook.bookProfile("BtlCluTResvsE",
1040  "BTL cluster time resolution vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM}) [ns]",
1041  20,
1042  0.,
1043  20.,
1044  -0.5,
1045  0.5,
1046  "S");
1047  meCluTResvsEta_ = ibook.bookProfile("BtlCluTResvsEta",
1048  "BTL cluster time resolution vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM}) [ns]",
1049  30,
1050  0,
1051  1.55,
1052  -0.5,
1053  0.5,
1054  "S");
1055  meCluTPullvsE_ = ibook.bookProfile("BtlCluTPullvsE",
1056  "BTL cluster time pull vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1057  20,
1058  0.,
1059  20.,
1060  -5.,
1061  5.,
1062  "S");
1064  ibook.bookProfile("BtlCluTPullvsEta",
1065  "BTL cluster time pull vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1066  30,
1067  0,
1068  1.55,
1069  -5.,
1070  5.,
1071  "S");
1072  meCluRhoRes_ =
1073  ibook.book1D("BtlCluRhoRes", "BTL cluster #rho resolution;#rho_{RECO}-#rho_{SIM} [cm]", 100, -0.5, 0.5);
1074  meCluPhiRes_ =
1075  ibook.book1D("BtlCluPhiRes", "BTL cluster #phi resolution;#phi_{RECO}-#phi_{SIM} [rad]", 100, -0.03, 0.03);
1076  meCluZRes_ = ibook.book1D("BtlCluZRes", "BTL cluster Z resolution;Z_{RECO}-Z_{SIM} [cm]", 100, -0.2, 0.2);
1077  meCluLocalXRes_ =
1078  ibook.book1D("BtlCluLocalXRes", "BTL cluster local X resolution;X_{RECO}-X_{SIM} [cm]", 100, -3.1, 3.1);
1080  "BtlCluLocalYResZGlobPlus", "BTL cluster local Y resolution (glob Z > 0);Y_{RECO}-Y_{SIM} [cm]", 100, -0.2, 0.2);
1082  "BtlCluLocalYResZGlobMinus", "BTL cluster local Y resolution (glob Z < 0);Y_{RECO}-Y_{SIM} [cm]", 100, -0.2, 0.2);
1083  if (optionalPlots_) {
1085  ibook.book1D("BtlCluSingCrystalLocalYRes",
1086  "BTL cluster local Y resolution (single Crystal clusters);Y_{RECO}-Y_{SIM} [cm]",
1087  100,
1088  -0.2,
1089  0.2);
1091  ibook.book1D("BtlCluSingCrystalLocalYResZGlobPlus",
1092  "BTL cluster local Y resolution (single Crystal clusters, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1093  100,
1094  -0.2,
1095  0.2);
1097  ibook.book1D("BtlCluSingCrystalLocalYResZGlobMinus",
1098  "BTL cluster local Y resolution (single Crystal clusters, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1099  100,
1100  -0.2,
1101  0.2);
1103  ibook.book1D("BtlCluMultiCrystalLocalYRes",
1104  "BTL cluster local Y resolution (Multi-Crystal clusters);Y_{RECO}-Y_{SIM} [cm]",
1105  100,
1106  -0.2,
1107  0.2);
1109  ibook.book1D("BtlCluMultiCrystalLocalYResZGlobPlus",
1110  "BTL cluster local Y resolution (Multi-Crystal clusters, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1111  100,
1112  -0.2,
1113  0.2);
1115  ibook.book1D("BtlCluMultiCrystalLocalYResZGlobMinus",
1116  "BTL cluster local Y resolution (Multi-Crystal clusters, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1117  100,
1118  -0.2,
1119  0.2);
1120  meCluCentralLocalYRes_ = ibook.book1D("BtlCluCentralLocalYRes",
1121  "BTL cluster local Y resolution (central region);Y_{RECO}-Y_{SIM} [cm]",
1122  100,
1123  -0.2,
1124  0.2);
1126  ibook.book1D("BtlCluCentralLocalYResZGlobPlus",
1127  "BTL cluster local Y resolution (central region, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1128  100,
1129  -0.2,
1130  0.2);
1132  ibook.book1D("BtlCluCentralLocalYResZGlobMinus",
1133  "BTL cluster local Y resolution (central region, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1134  100,
1135  -0.2,
1136  0.2);
1137  meCluForwardLocalYRes_ = ibook.book1D("BtlCluForwardLocalYRes",
1138  "BTL cluster local Y resolution (forward region);Y_{RECO}-Y_{SIM} [cm]",
1139  100,
1140  -0.2,
1141  0.2);
1143  ibook.book1D("BtlCluForwardPlusLocalYRes",
1144  "BTL cluster local Y resolution (forward region, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1145  100,
1146  -0.2,
1147  0.2);
1149  ibook.book1D("BtlCluForwardMinusLocalYRes",
1150  "BTL cluster local Y resolution (forward region, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1151  100,
1152  -0.2,
1153  0.2);
1154  }
1156  "BtlCluLocalYPullZGlobPlus", "BTL cluster local Y pull (glob Z > 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]", 100, -5., 5.);
1157  meCluLocalYPullZGlobMinus_ = ibook.book1D("BtlCluLocalYPullZGlobMinus",
1158  "BTL cluster local Y pull (glob Z < 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1159  100,
1160  -5.,
1161  5.);
1162 
1164  ibook.book1D("BtlCluLocalXPull", "BTL cluster local X pull;X_{RECO}-X_{SIM}/sigmaX_[RECO]", 100, -5., 5.);
1165 
1166  meCluZPull_ = ibook.book1D("BtlCluZPull", "BTL cluster Z pull;Z_{RECO}-Z_{SIM}/sigmaZ_[RECO]", 100, -5., 5.);
1167  meCluXLocalErr_ = ibook.book1D("BtlCluXLocalErr", "BTL cluster X local error;sigmaX_{RECO,loc} [cm]", 20, 0., 2.);
1168  meCluYLocalErr_ = ibook.book1D("BtlCluYLocalErr", "BTL cluster Y local error;sigmaY_{RECO,loc} [cm]", 20, 0., 0.4);
1169  if (optionalPlots_) {
1170  meCluYXLocal_ = ibook.book2D("BtlCluYXLocal",
1171  "BTL cluster local Y vs X;X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
1172  200,
1173  -9.5,
1174  9.5,
1175  200,
1176  -2.8,
1177  2.8);
1178  meCluYXLocalSim_ = ibook.book2D("BtlCluYXLocalSim",
1179  "BTL cluster local Y vs X;X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
1180  200,
1181  -9.5,
1182  9.5,
1183  200,
1184  -2.8,
1185  2.8);
1186  }
1187 
1188  // with MtdSimLayerCluster as truth
1189 
1191  ibook.book1D("BtlCluTrackIdOffset", "BTL cluster category (trackId offset); trackId offset", 4, 0.0, 4.0);
1192  meCluTimeRes_simLC_ = ibook.book1D("BtlCluTimeRes_simLC",
1193  "BTL cluster time resolution (wrt MtdSimLayerClusters);T_{RECO}-T_{SIM} [ns]",
1194  100,
1195  -0.5,
1196  0.5);
1197  meCluEnergyRes_simLC_ = ibook.book1D("BtlCluEnergyRes_simLC",
1198  "BTL cluster energy resolution (wrt MtdSimLayerClusters);E_{RECO}-E_{SIM} [MeV]",
1199  100,
1200  -0.5,
1201  0.5);
1203  "BtlCluTResvsE_simLC",
1204  "BTL cluster time resolution (wrt MtdSimLayerClusters) vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM}) [ns]",
1205  20,
1206  0.,
1207  20.,
1208  -0.5,
1209  0.5,
1210  "S");
1212  "BtlCluTResvsEta_simLC",
1213  "BTL cluster time resolution (wrt MtdSimLayerClusters) vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM}) [ns]",
1214  30,
1215  0,
1216  1.55,
1217  -0.5,
1218  0.5,
1219  "S");
1221  "BtlCluTPullvsE_simLC",
1222  "BTL cluster time pull (wrt MtdSimLayerClusters) vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1223  20,
1224  0.,
1225  20.,
1226  -5.,
1227  5.,
1228  "S");
1230  "BtlCluTPullvsEta_simLC",
1231  "BTL cluster time pull (wrt MtdSimLayerClusters) vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1232  30,
1233  0,
1234  1.55,
1235  -5.,
1236  5.,
1237  "S");
1238  meCluRhoRes_simLC_ = ibook.book1D("BtlCluRhoRes_simLC",
1239  "BTL cluster #rho resolution (wrt MtdSimLayerClusters);#rho_{RECO}-#rho_{SIM} [cm]",
1240  100,
1241  -0.5,
1242  0.5);
1244  ibook.book1D("BtlCluPhiRes_simLC",
1245  "BTL cluster #phi resolution (wrt MtdSimLayerClusters);#phi_{RECO}-#phi_{SIM} [rad]",
1246  100,
1247  -0.03,
1248  0.03);
1249  meCluZRes_simLC_ = ibook.book1D(
1250  "BtlCluZRes_simLC", "BTL cluster Z resolution (wrt MtdSimLayerClusters);Z_{RECO}-Z_{SIM} [cm]", 100, -0.2, 0.2);
1251  meCluLocalXRes_simLC_ = ibook.book1D("BtlCluLocalXRes_simLC",
1252  "BTL cluster local X resolution (wrt MtdSimLayerClusters);X_{RECO}-X_{SIM} [cm]",
1253  100,
1254  -3.1,
1255  3.1);
1257  ibook.book1D("BtlCluLocalYResZGlobPlus_simLC",
1258  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, glob Z > 0);Y_{RECO}-Y_{SIM} [cm]",
1259  100,
1260  -0.2,
1261  0.2);
1263  ibook.book1D("BtlCluLocalYResZGlobMinus_simLC",
1264  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, glob Z < 0);Y_{RECO}-Y_{SIM} [cm]",
1265  100,
1266  -0.2,
1267  0.2);
1268  if (optionalPlots_) {
1270  "BtlCluSingCrystalLocalYRes_simLC",
1271  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, single Crystal clusters);Y_{RECO}-Y_{SIM} [cm]",
1272  100,
1273  -0.2,
1274  0.2);
1276  ibook.book1D("BtlCluSingCrystalLocalYResZGlobPlus_simLC",
1277  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, single Crystal clusters, Z glob > "
1278  "0);Y_{RECO}-Y_{SIM} [cm]",
1279  100,
1280  -0.2,
1281  0.2);
1283  ibook.book1D("BtlCluSingCrystalLocalYResZGlobMinus_simLC",
1284  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, single Crystal clusters, Z glob < "
1285  "0);Y_{RECO}-Y_{SIM} [cm]",
1286  100,
1287  -0.2,
1288  0.2);
1290  "BtlCluMultiCrystalLocalYRes_simLC",
1291  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, Multi-Crystal clusters);Y_{RECO}-Y_{SIM} [cm]",
1292  100,
1293  -0.2,
1294  0.2);
1296  ibook.book1D("BtlCluMultiCrystalLocalYResZGlobPlus_simLC",
1297  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, Multi-Crystal clusters, Z glob > "
1298  "0);Y_{RECO}-Y_{SIM} [cm]",
1299  100,
1300  -0.2,
1301  0.2);
1303  ibook.book1D("BtlCluMultiCrystalLocalYResZGlobMinus_simLC",
1304  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, Multi-Crystal clusters, Z glob < "
1305  "0);Y_{RECO}-Y_{SIM} [cm]",
1306  100,
1307  -0.2,
1308  0.2);
1310  ibook.book1D("BtlCluCentralLocalYRes_simLC",
1311  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, central region);Y_{RECO}-Y_{SIM} [cm]",
1312  100,
1313  -0.2,
1314  0.2);
1316  "BtlCluCentralLocalYResZGlobPlus_simLC",
1317  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, central region, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1318  100,
1319  -0.2,
1320  0.2);
1322  "BtlCluCentralLocalYResZGlobMinus_simLC",
1323  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, central region, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1324  100,
1325  -0.2,
1326  0.2);
1328  ibook.book1D("BtlCluForwardLocalYRes_simLC",
1329  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, forward region);Y_{RECO}-Y_{SIM} [cm]",
1330  100,
1331  -0.2,
1332  0.2);
1334  "BtlCluForwardPlusLocalYRes_simLC",
1335  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, forward region, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1336  100,
1337  -0.2,
1338  0.2);
1340  "BtlCluForwardMinusLocalYRes_simLC",
1341  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, forward region, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1342  100,
1343  -0.2,
1344  0.2);
1345  }
1346  meCluLocalYPullZGlobPlus_simLC_ = ibook.book1D("BtlCluLocalYPullZGlobPlus_simLC",
1347  "BTL cluster local Y pull (glob Z > 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1348  100,
1349  -5.,
1350  5.);
1352  ibook.book1D("BtlCluLocalYPullZGlobMinus_simLC",
1353  "BTL cluster local Y pull (wrt MtdSimLayerClusters, glob Z < 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1354  100,
1355  -5.,
1356  5.);
1357 
1359  ibook.book1D("BtlCluLocalXPull_simLC",
1360  "BTL cluster local X pull (wrt MtdSimLayerClusters);X_{RECO}-X_{SIM}/sigmaX_[RECO]",
1361  100,
1362  -5.,
1363  5.);
1364 
1365  meCluZPull_simLC_ = ibook.book1D(
1366  "BtlCluZPull_simLC", "BTL cluster Z pull (wrt MtdSimLayerClusters);Z_{RECO}-Z_{SIM}/sigmaZ_[RECO]", 100, -5., 5.);
1367  if (optionalPlots_) {
1369  ibook.book2D("BtlCluYXLocalSim_simLC",
1370  "BTL cluster local Y vs X (MtdSimLayerClusters);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
1371  200,
1372  -9.5,
1373  9.5,
1374  200,
1375  -2.8,
1376  2.8);
1377  }
1378 
1380 
1382  ibook.book1D("BtlCluTimeRes_simLC_fromIndirectHits",
1383  "BTL cluster time resolution (wrt MtdSimLayerClusters, non-direct hits);T_{RECO}-T_{SIM} [ns]",
1384  100,
1385  -0.5,
1386  0.5);
1388  ibook.book1D("BtlCluEnergyRes_simLC_fromIndirectHits",
1389  "BTL cluster energy resolution (wrt MtdSimLayerClusters, non-direct hits);E_{RECO}-E_{SIM} [MeV]",
1390  100,
1391  -0.5,
1392  0.5);
1394  ibook.bookProfile("BtlCluTResvsE_simLC_fromIndirectHits",
1395  "BTL cluster time resolution (wrt MtdSimLayerClusters, non-direct hits) vs E;E_{SIM} "
1396  "[MeV];(T_{RECO}-T_{SIM}) [ns]",
1397  20,
1398  0.,
1399  20.,
1400  -0.5,
1401  0.5,
1402  "S");
1404  ibook.bookProfile("BtlCluTResvsEta_simLC_fromIndirectHits",
1405  "BTL cluster time resolution (wrt MtdSimLayerClusters, non-direct hits) vs "
1406  "#eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM}) [ns]",
1407  30,
1408  0,
1409  1.55,
1410  -0.5,
1411  0.5,
1412  "S");
1414  ibook.bookProfile("BtlCluTPullvsE_simLC_fromIndirectHits",
1415  "BTL cluster time pull (wrt MtdSimLayerClusters, non-direct hits) vs E;E_{SIM} "
1416  "[MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1417  20,
1418  0.,
1419  20.,
1420  -5.,
1421  5.,
1422  "S");
1424  ibook.bookProfile("BtlCluTPullvsEta_simLC_fromIndirectHits",
1425  "BTL cluster time pull (wrt MtdSimLayerClusters, non-direct hits) vs "
1426  "#eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1427  30,
1428  0,
1429  1.55,
1430  -5.,
1431  5.,
1432  "S");
1434  ibook.book1D("BtlCluRhoRes_simLC_fromIndirectHits",
1435  "BTL cluster #rho resolution (wrt MtdSimLayerClusters, non-direct hits);#rho_{RECO}-#rho_{SIM} [cm]",
1436  100,
1437  -0.5,
1438  0.5);
1440  "BtlCluPhiRes_simLC_fromIndirectHits",
1441  "BTL cluster #phi resolution (wrt MtdSimLayerClusters, non-direct hits);#phi_{RECO}-#phi_{SIM} [rad]",
1442  100,
1443  -0.03,
1444  0.03);
1446  ibook.book1D("BtlCluZRes_simLC_fromIndirectHits",
1447  "BTL cluster Z resolution (wrt MtdSimLayerClusters, non-direct hits);Z_{RECO}-Z_{SIM} [cm]",
1448  100,
1449  -0.2,
1450  0.2);
1452  ibook.book1D("BtlCluLocalXRes_simLC_fromIndirectHits",
1453  "BTL cluster local X resolution (wrt MtdSimLayerClusters, non-direct hits);X_{RECO}-X_{SIM} [cm]",
1454  100,
1455  -3.1,
1456  3.1);
1458  "BtlCluLocalYResZGlobPlus_simLC_fromIndirectHits",
1459  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, glob Z > 0);Y_{RECO}-Y_{SIM} [cm]",
1460  100,
1461  -0.2,
1462  0.2);
1464  "BtlCluLocalYResZGlobMinus_simLC_fromIndirectHits",
1465  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, glob Z < 0);Y_{RECO}-Y_{SIM} [cm]",
1466  100,
1467  -0.2,
1468  0.2);
1469  if (optionalPlots_) {
1471  ibook.book1D("BtlCluSingCrystalLocalYRes_simLC_fromIndirectHits",
1472  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, single Crystal "
1473  "clusters);Y_{RECO}-Y_{SIM} [cm]",
1474  100,
1475  -0.2,
1476  0.2);
1478  "BtlCluSingCrystalLocalYResZGlobPlus_simLC_fromIndirectHits",
1479  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, single Crystal clusters, Z glob > "
1480  "0);Y_{RECO}-Y_{SIM} [cm]",
1481  100,
1482  -0.2,
1483  0.2);
1485  "BtlCluSingCrystalLocalYResZGlobMinus_simLC_fromIndirectHits",
1486  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, single Crystal clusters, Z glob < "
1487  "0);Y_{RECO}-Y_{SIM} [cm]",
1488  100,
1489  -0.2,
1490  0.2);
1492  ibook.book1D("BtlCluMultiCrystalLocalYRes_simLC_fromIndirectHits",
1493  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, Multi-Crystal "
1494  "clusters);Y_{RECO}-Y_{SIM} [cm]",
1495  100,
1496  -0.2,
1497  0.2);
1499  "BtlCluMultiCrystalLocalYResZGlobPlus_simLC_fromIndirectHits",
1500  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, Multi-Crystal clusters, Z glob > "
1501  "0);Y_{RECO}-Y_{SIM} [cm]",
1502  100,
1503  -0.2,
1504  0.2);
1506  "BtlCluMultiCrystalLocalYResZGlobMinus_simLC_fromIndirectHits",
1507  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, Multi-Crystal clusters, Z glob < "
1508  "0);Y_{RECO}-Y_{SIM} [cm]",
1509  100,
1510  -0.2,
1511  0.2);
1513  ibook.book1D("BtlCluCentralLocalYRes_simLC_fromIndirectHits",
1514  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, central "
1515  "region);Y_{RECO}-Y_{SIM} [cm]",
1516  100,
1517  -0.2,
1518  0.2);
1520  ibook.book1D("BtlCluCentralLocalYResZGlobPlus_simLC_fromIndirectHits",
1521  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, central region, Z glob "
1522  "> 0);Y_{RECO}-Y_{SIM} [cm]",
1523  100,
1524  -0.2,
1525  0.2);
1527  ibook.book1D("BtlCluCentralLocalYResZGlobMinus_simLC_fromIndirectHits",
1528  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, central region, Z glob "
1529  "< 0);Y_{RECO}-Y_{SIM} [cm]",
1530  100,
1531  -0.2,
1532  0.2);
1534  ibook.book1D("BtlCluForwardLocalYRes_simLC_fromIndirectHits",
1535  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, forward "
1536  "region);Y_{RECO}-Y_{SIM} [cm]",
1537  100,
1538  -0.2,
1539  0.2);
1541  ibook.book1D("BtlCluForwardPlusLocalYRes_simLC_fromIndirectHits",
1542  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, forward region, Z glob "
1543  "> 0);Y_{RECO}-Y_{SIM} [cm]",
1544  100,
1545  -0.2,
1546  0.2);
1548  ibook.book1D("BtlCluForwardMinusLocalYRes_simLC_fromIndirectHits",
1549  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, forward region, Z glob "
1550  "< 0);Y_{RECO}-Y_{SIM} [cm]",
1551  100,
1552  -0.2,
1553  0.2);
1554  }
1556  ibook.book1D("BtlCluLocalYPullZGlobPlus_simLC_fromIndirectHits",
1557  "BTL cluster local Y pull (glob Z > 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1558  100,
1559  -5.,
1560  5.);
1562  "BtlCluLocalYPullZGlobMinus_simLC_fromIndirectHits",
1563  "BTL cluster local Y pull (wrt MtdSimLayerClusters, non-direct hits, glob Z < 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1564  100,
1565  -5.,
1566  5.);
1567 
1569  ibook.book1D("BtlCluLocalXPull_simLC_fromIndirectHits",
1570  "BTL cluster local X pull (wrt MtdSimLayerClusters, non-direct hits);X_{RECO}-X_{SIM}/sigmaX_[RECO]",
1571  100,
1572  -5.,
1573  5.);
1574 
1576  ibook.book1D("BtlCluZPull_simLC_fromIndirectHits",
1577  "BTL cluster Z pull (wrt MtdSimLayerClusters, non-direct hits);Z_{RECO}-Z_{SIM}/sigmaZ_[RECO]",
1578  100,
1579  -5.,
1580  5.);
1581  if (optionalPlots_) {
1583  ibook.book2D("BtlCluYXLocalSim_simLC_fromIndirectHits",
1584  "BTL cluster local Y vs X (MtdSimLayerClusters);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
1585  200,
1586  -9.5,
1587  9.5,
1588  200,
1589  -2.8,
1590  2.8);
1591  }
1592 
1594 
1596  ibook.book1D("BtlUnmatchedCluEnergy", "BTL unmatched cluster log10(energy);log10(E_{RECO} [MeV])", 5, -3, 2);
1597 
1598  // --- UncalibratedRecHits histograms
1599 
1600  meUncEneLVsX_ = ibook.bookProfile("BTLUncEneLVsX",
1601  "BTL uncalibrated hit amplitude left - average vs X;X [cm];Delta(Q_{left}) [pC]",
1602  20,
1603  -5.,
1604  5.,
1605  -640.,
1606  640.,
1607  "S");
1608  meUncEneRVsX_ = ibook.bookProfile("BTLUncEneRVsX",
1609  "BTL uncalibrated hit amplitude right - average vs X;X [cm];Delta(Q_{right}) [pC]",
1610  20,
1611  -5.,
1612  5.,
1613  -640.,
1614  640.,
1615  "S");
1616 
1617  meUncTimeLVsX_ = ibook.bookProfile("BTLUncTimeLVsX",
1618  "BTL uncalibrated hit time left - average vs X;X [cm];Delta(T_{left}) [MeV]",
1619  20,
1620  -5.,
1621  5.,
1622  -25.,
1623  25.,
1624  "S");
1625  meUncTimeRVsX_ = ibook.bookProfile("BTLUncTimeRVsX",
1626  "BTL uncalibrated hit time right - average vs X;X [cm];Delta(T_{right}) [MeV]",
1627  20,
1628  -5.,
1629  5.,
1630  -25.,
1631  25.,
1632  "S");
1633 
1634  if (uncalibRecHitsPlots_) {
1635  for (unsigned int ihistoQ = 0; ihistoQ < nBinsQ_; ++ihistoQ) {
1636  std::string hname = Form("TimeResQ_%d", ihistoQ);
1637  std::string htitle = Form("BTL time resolution (Q bin = %d);T_{RECO} - T_{SIM} [ns]", ihistoQ);
1638  meTimeResQ_[ihistoQ] = ibook.book1D(hname, htitle, 200, -0.3, 0.7);
1639 
1640  for (unsigned int ihistoEta = 0; ihistoEta < nBinsQEta_; ++ihistoEta) {
1641  hname = Form("TimeResQvsEta_%d_%d", ihistoQ, ihistoEta);
1642  htitle = Form("BTL time resolution (Q bin = %d, |#eta| bin = %d);T_{RECO} - T_{SIM} [ns]", ihistoQ, ihistoEta);
1643  meTimeResQvsEta_[ihistoQ][ihistoEta] = ibook.book1D(hname, htitle, 200, -0.3, 0.7);
1644 
1645  } // ihistoEta loop
1646 
1647  } // ihistoQ loop
1648 
1649  for (unsigned int ihistoEta = 0; ihistoEta < nBinsEta_; ++ihistoEta) {
1650  std::string hname = Form("TimeResEta_%d", ihistoEta);
1651  std::string htitle = Form("BTL time resolution (|#eta| bin = %d);T_{RECO} - T_{SIM} [ns]", ihistoEta);
1652  meTimeResEta_[ihistoEta] = ibook.book1D(hname, htitle, 200, -0.3, 0.7);
1653 
1654  for (unsigned int ihistoQ = 0; ihistoQ < nBinsEtaQ_; ++ihistoQ) {
1655  hname = Form("TimeResEtavsQ_%d_%d", ihistoEta, ihistoQ);
1656  htitle = Form("BTL time resolution (|#eta| bin = %d, Q bin = %d);T_{RECO} - T_{SIM} [ns]", ihistoEta, ihistoQ);
1657  meTimeResEtavsQ_[ihistoEta][ihistoQ] = ibook.book1D(hname, htitle, 200, -0.3, 0.7);
1658 
1659  } // ihistoQ loop
1660 
1661  } // ihistoEta loop
1662  }
1663 }
1664 
1665 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
1668 
1669  desc.add<std::string>("folder", "MTD/BTL/LocalReco");
1670  desc.add<edm::InputTag>("recHitsTag", edm::InputTag("mtdRecHits", "FTLBarrel"));
1671  desc.add<edm::InputTag>("uncalibRecHitsTag", edm::InputTag("mtdUncalibratedRecHits", "FTLBarrel"));
1672  desc.add<edm::InputTag>("simHitsTag", edm::InputTag("mix", "g4SimHitsFastTimerHitsBarrel"));
1673  desc.add<edm::InputTag>("recCluTag", edm::InputTag("mtdClusters", "FTLBarrel"));
1674  desc.add<edm::InputTag>("trkHitTag", edm::InputTag("mtdTrackingRecHits"));
1675  desc.add<edm::InputTag>("r2sAssociationMapTag", edm::InputTag("mtdRecoClusterToSimLayerClusterAssociation"));
1676  desc.add<double>("HitMinimumEnergy", 1.); // [MeV]
1677  desc.add<bool>("optionalPlots", false);
1678  desc.add<bool>("UncalibRecHitsPlots", false);
1679  desc.add<double>("HitMinimumAmplitude", 30.); // [pC]
1680 
1681  descriptions.add("btlLocalRecoValid", desc);
1682 }
1683 
MonitorElement * meCluLocalYPullZGlobPlus_simLC_fromIndirectHits_
MonitorElement * meCluTPullvsE_simLC_fromIndirectHits_
MonitorElement * meCluForwardMinusLocalYRes_
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
T perp() const
Definition: PV3DBase.h:69
MonitorElement * meCluTPullvsE_simLC_
MonitorElement * meCluCentralLocalYResZGlobPlus_simLC_fromIndirectHits_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
std::string folder_
float x() const
Definition: FTLCluster.h:120
int size() const
Definition: FTLCluster.h:153
MonitorElement * meCluLocalYResZGlobPlus_simLC_fromIndirectHits_
MonitorElement * meCluLocalXRes_simLC_fromIndirectHits_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * meCluSingCrystalLocalYResZGlobMinus_simLC_fromIndirectHits_
const edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
MonitorElement * meCluSingCrystalLocalYResZGlobMinus_
MonitorElement * meCluLocalYPullZGlobMinus_simLC_fromIndirectHits_
MonitorElement * meCluTimeRes_simLC_fromIndirectHits_
T z() const
Definition: PV3DBase.h:61
MonitorElement * meCluSingCrystalLocalYRes_simLC_
MonitorElement * meCluLocalYResZGlobMinus_simLC_fromIndirectHits_
virtual const Topology & topology() const
Definition: GeomDet.cc:67
MonitorElement * meCluForwardPlusLocalYRes_simLC_fromIndirectHits_
virtual const PixelTopology & specificTopology() const
MonitorElement * meCluLocalYResZGlobMinus_
MonitorElement * meCluPhiRes_simLC_fromIndirectHits_
MonitorElement * meCluMultiCrystalLocalYResZGlobMinus_simLC_
MonitorElement * meCluSingCrystalLocalYRes_
const edm::ESGetToken< MTDClusterParameterEstimator, MTDCPERecord > cpeToken_
MonitorElement * meCluCentralLocalYResZGlobPlus_
MonitorElement * meCluCentralLocalYRes_simLC_fromIndirectHits_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meCluForwardLocalYRes_
int mtdSide() const
Definition: MTDDetId.h:59
MonitorElement * meCluCentralLocalYResZGlobMinus_simLC_fromIndirectHits_
MonitorElement * meCluLocalXPull_simLC_
MonitorElement * meCluSingCrystalLocalYResZGlobMinus_simLC_
MonitorElement * meCluForwardLocalYRes_simLC_fromIndirectHits_
MonitorElement * meCluYXLocalSim_simLC_fromIndirectHits_
Definition: MTDHit.h:4
MonitorElement * meCluLocalXRes_simLC_
static constexpr float binWidthQ_
MonitorElement * meCluYXLocalSim_simLC_
MonitorElement * meCluCentralLocalYResZGlobMinus_
MonitorElement * meCluMultiCrystalLocalYRes_
MonitorElement * meCluEnergyRes_simLC_
MonitorElement * meUnmatchedCluEnergy_
static constexpr int nBinsEtaQ_
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
edm::EDGetTokenT< MTDTrackingDetSetVector > mtdTrackingHitToken_
MonitorElement * meCluMultiCrystalLocalYResZGlobMinus_
MonitorElement * meLongPosPullvsEta_
MonitorElement * meCluTResvsEta_simLC_
Detector identifier base class for the MIP Timing Layer.
Definition: MTDDetId.h:21
MonitorElement * meCluForwardPlusLocalYRes_
constexpr NumType convertUnitsTo(double desiredUnits, NumType val)
Definition: GeantUnits.h:73
bool isSameCluster(const FTLCluster &, const FTLCluster &)
MonitorElement * meCluSingCrystalLocalYResZGlobPlus_simLC_fromIndirectHits_
MonitorElement * meCluZPull_simLC_fromIndirectHits_
void Fill(long long x)
U second(std::pair< T, U > const &p)
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
float y() const
Definition: FTLCluster.h:125
MonitorElement * meCluTimeRes_simLC_
int iEvent
Definition: GenABIO.cc:224
MonitorElement * meCluCentralLocalYResZGlobMinus_simLC_
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:408
MonitorElement * meCluLocalYResZGlobPlus_
static constexpr float binWidthEta_
T sqrt(T t)
Definition: SSEVec.h:23
MonitorElement * meCluMultiCrystalLocalYResZGlobMinus_simLC_fromIndirectHits_
MonitorElement * meCluSingCrystalLocalYResZGlobPlus_
MonitorElement * meCluCentralLocalYRes_simLC_
MonitorElement * meCluZRes_simLC_fromIndirectHits_
edm::EDGetTokenT< FTLClusterCollection > btlRecCluToken_
static constexpr float binsQEta_[nBinsQEta_+1]
MonitorElement * meCluMultiCrystalLocalYRes_simLC_fromIndirectHits_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * meCluMultiCrystalLocalYResZGlobPlus_simLC_fromIndirectHits_
MonitorElement * meCluMultiCrystalLocalYResZGlobPlus_simLC_
int mtdRR() const
Definition: MTDDetId.h:64
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
static constexpr int nBinsQEta_
int nrows() const override
MonitorElement * meCluForwardLocalYRes_simLC_
MonitorElement * meLocalOccupancy_
MonitorElement * meTimeResEta_[nBinsEta_]
MonitorElement * meCluCentralLocalYRes_
MonitorElement * meCluTResvsE_simLC_
BtlLocalRecoValidation(const edm::ParameterSet &)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
edm::EDGetTokenT< FTLUncalibratedRecHitCollection > btlUncalibRecHitsToken_
MonitorElement * meCluTrackIdOffset_
edm::EDGetTokenT< MtdRecoClusterToSimLayerClusterAssociationMap > r2sAssociationMapToken_
MonitorElement * meCluSingCrystalLocalYResZGlobPlus_simLC_
MonitorElement * meCluTResvsEta_simLC_fromIndirectHits_
MonitorElement * meCluLocalYPullZGlobPlus_simLC_
const edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
MonitorElement * meCluTResvsE_simLC_fromIndirectHits_
MonitorElement * meCluEnergyRes_simLC_fromIndirectHits_
Definition: DetId.h:17
MonitorElement * meCluForwardPlusLocalYRes_simLC_
const DetId & id() const
Definition: FTLCluster.h:190
constexpr NumType convertMmToCm(NumType millimeters)
Definition: angle_units.h:44
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meCluCentralLocalYResZGlobPlus_simLC_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
edm::EDGetTokenT< FTLRecHitCollection > btlRecHitsToken_
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:221
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(const edm::Event &, const edm::EventSetup &) override
static constexpr int nBinsQ_
MonitorElement * meCluLocalYPullZGlobMinus_
MonitorElement * meTimeResQvsEta_[nBinsQ_][nBinsQEta_]
static constexpr float binsEtaQ_[nBinsEtaQ_+1]
MonitorElement * meCluMultiCrystalLocalYRes_simLC_
MonitorElement * meCluLocalYPullZGlobPlus_
HLT enums.
MonitorElement * meTimeResEtavsQ_[nBinsEta_][nBinsEtaQ_]
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
Definition: BTLDetId.h:19
MonitorElement * meCluForwardMinusLocalYRes_simLC_
MonitorElement * meCluMultiCrystalLocalYResZGlobPlus_
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:141
static constexpr int nBinsEta_
MonitorElement * meCluLocalYResZGlobMinus_simLC_
float time() const
Definition: FTLCluster.h:142
MonitorElement * meCluRhoRes_simLC_fromIndirectHits_
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)
MonitorElement * meCluSingCrystalLocalYRes_simLC_fromIndirectHits_
Log< level::Warning, false > LogWarning
MonitorElement * meCluLocalXPull_simLC_fromIndirectHits_
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
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
edm::EDGetTokenT< CrossingFrame< PSimHit > > btlSimHitsToken_
MonitorElement * meTimeResQ_[nBinsQ_]
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType
MonitorElement * meCluTPullvsEta_simLC_fromIndirectHits_
MonitorElement * meCluLocalYResZGlobPlus_simLC_
Definition: Run.h:45
MonitorElement * meCluLocalYPullZGlobMinus_simLC_
MonitorElement * meCluForwardMinusLocalYRes_simLC_fromIndirectHits_
MonitorElement * meCluTPullvsEta_simLC_
#define LogDebug(id)