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  LogTrace("BtlLocalRecoValidation") << "@RH detid " << recHit.id().rawId() << " r/c/X/dX " << recHit.row() << " "
381  << recHit.column() << " " << recHit.position() << " " << recHit.positionError()
382  << " E,T,dT " << recHit.energy() << " " << recHit.time() << " "
383  << recHit.timeError();
384 
385  BTLDetId detId = recHit.id();
386  DetId geoId = detId.geographicalId(MTDTopologyMode::crysLayoutFromTopoMode(topology->getMTDTopologyMode()));
387  const MTDGeomDet* thedet = geom->idToDet(geoId);
388  if (thedet == nullptr)
389  throw cms::Exception("BtlLocalRecoValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
390  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
391  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
392  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
393 
394  Local3DPoint local_point(0., 0., 0.);
395  local_point = topo.pixelToModuleLocalPoint(local_point, detId.row(topo.nrows()), detId.column(topo.nrows()));
396  const auto& global_point = thedet->toGlobal(local_point);
397 
398  meHitEnergy_->Fill(recHit.energy());
399  meHitLogEnergy_->Fill(log10(recHit.energy()));
400  meHitTime_->Fill(recHit.time());
401  meHitTimeError_->Fill(recHit.timeError());
402  meHitLongPos_->Fill(recHit.position());
403 
404  meOccupancy_->Fill(global_point.z(), global_point.phi());
405 
406  if (optionalPlots_) {
407  meLocalOccupancy_->Fill(local_point.x() + recHit.position(), local_point.y());
408  }
409  meHitXlocal_->Fill(local_point.x());
410  meHitYlocal_->Fill(local_point.y());
411  meHitZlocal_->Fill(local_point.z());
412  meHitZ_->Fill(global_point.z());
413  meHitPhi_->Fill(global_point.phi());
414  meHitEta_->Fill(global_point.eta());
415 
416  meHitTvsE_->Fill(recHit.energy(), recHit.time());
417  meHitEvsPhi_->Fill(global_point.phi(), recHit.energy());
418  meHitEvsEta_->Fill(global_point.eta(), recHit.energy());
419  meHitEvsZ_->Fill(global_point.z(), recHit.energy());
420  meHitTvsPhi_->Fill(global_point.phi(), recHit.time());
421  meHitTvsEta_->Fill(global_point.eta(), recHit.time());
422  meHitTvsZ_->Fill(global_point.z(), recHit.time());
423 
424  // Resolution histograms
425  LogDebug("BtlLocalRecoValidation") << "RecoHit DetId= " << detId.rawId()
426  << " sim hits in id= " << m_btlSimHits.count(detId.rawId());
427  if (m_btlSimHits.count(detId.rawId()) == 1 && m_btlSimHits[detId.rawId()].energy > hitMinEnergy_) {
428  float longpos_res = recHit.position() - convertMmToCm(m_btlSimHits[detId.rawId()].x);
429  float time_res = recHit.time() - m_btlSimHits[detId.rawId()].time;
430  float energy_res = recHit.energy() - m_btlSimHits[detId.rawId()].energy;
431 
432  Local3DPoint local_point_sim(convertMmToCm(m_btlSimHits[detId.rawId()].x),
433  convertMmToCm(m_btlSimHits[detId.rawId()].y),
434  convertMmToCm(m_btlSimHits[detId.rawId()].z));
435  local_point_sim =
436  topo.pixelToModuleLocalPoint(local_point_sim, detId.row(topo.nrows()), detId.column(topo.nrows()));
437  const auto& global_point_sim = thedet->toGlobal(local_point_sim);
438 
439  meTimeRes_->Fill(time_res);
440  meTimeResVsE_->Fill(recHit.energy(), time_res);
441  meEnergyRes_->Fill(energy_res);
442  meEnergyRelResVsE_->Fill(recHit.energy(), energy_res / recHit.energy());
443 
444  meLongPosPull_->Fill(longpos_res / recHit.positionError());
445  meLongPosPullvsEta_->Fill(std::abs(global_point_sim.eta()), longpos_res / recHit.positionError());
446  meLongPosPullvsE_->Fill(m_btlSimHits[detId.rawId()].energy, longpos_res / recHit.positionError());
447 
448  meTPullvsEta_->Fill(std::abs(global_point_sim.eta()), time_res / recHit.timeError());
449  meTPullvsE_->Fill(m_btlSimHits[detId.rawId()].energy, time_res / recHit.timeError());
450  } else if (m_btlSimHits.count(detId.rawId()) == 0) {
451  n_reco_btl_nosimhit++;
452  LogDebug("BtlLocalRecoValidation") << "BTL rec hit with no corresponding sim hit in crystal, DetId= "
453  << detId.rawId() << " geoId= " << geoId.rawId() << " ene= " << recHit.energy()
454  << " time= " << recHit.time();
455  }
456 
457  n_reco_btl++;
458 
459  } // recHit loop
460 
461  if (n_reco_btl > 0) {
462  meNhits_->Fill(std::log10(n_reco_btl));
463  }
464  if (n_reco_btl_nosimhit == 0) {
465  meUnmatchedRecHit_->Fill(-1.5);
466  } else {
467  meUnmatchedRecHit_->Fill(std::log10(n_reco_btl_nosimhit));
468  }
469 
470  // --- Loop over the BTL RECO clusters ---
471  unsigned int n_clus_btl(0);
472  for (const auto& DetSetClu : *btlRecCluHandle) {
473  for (const auto& cluster : DetSetClu) {
474  if (cluster.energy() < hitMinEnergy_)
475  continue;
476  BTLDetId cluId = cluster.id();
477  DetId detIdObject(cluId);
478  const auto& genericDet = geom->idToDetUnit(detIdObject);
479  if (genericDet == nullptr) {
480  throw cms::Exception("BtlLocalRecoValidation")
481  << "GeographicalID: " << std::hex << cluId << " is invalid!" << std::dec << std::endl;
482  }
483  n_clus_btl++;
484 
485  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(genericDet->topology());
486  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
487 
488  MTDClusterParameterEstimator::ReturnType tuple = cpe.getParameters(cluster, *genericDet);
489 
490  // --- Cluster position in the module reference frame
491  LocalPoint local_point(std::get<0>(tuple));
492  const auto& global_point = genericDet->toGlobal(local_point);
493 
494  meCluEnergy_->Fill(cluster.energy());
495  meCluTime_->Fill(cluster.time());
496  meCluTimeError_->Fill(cluster.timeError());
497  meCluPhi_->Fill(global_point.phi());
498  meCluEta_->Fill(global_point.eta());
499  meCluZvsPhi_->Fill(global_point.z(), global_point.phi());
500  meCluHits_->Fill(cluster.size());
501 
502  // --- Get the SIM hits associated to the cluster and calculate
503  // the cluster SIM energy, time and position
504 
505  double cluEneSIM = 0.;
506  double cluTimeSIM = 0.;
507  double cluLocXSIM = 0.;
508  double cluLocYSIM = 0.;
509  double cluLocZSIM = 0.;
510 
511  if (optionalPlots_) {
512  for (int ihit = 0; ihit < cluster.size(); ++ihit) {
513  int hit_row = cluster.minHitRow() + cluster.hitOffset()[ihit * 2];
514  int hit_col = cluster.minHitCol() + cluster.hitOffset()[ihit * 2 + 1];
515 
516  // Match the RECO hit to the corresponding SIM hit
517  for (const auto& recHit : *btlRecHitsHandle) {
518  BTLDetId hitId(recHit.id().rawId());
519 
520  if (m_btlSimHits.count(hitId.rawId()) == 0)
521  continue;
522 
523  // Check the hit position
524  if (hitId.mtdSide() != cluId.mtdSide() || hitId.mtdRR() != cluId.mtdRR() || recHit.row() != hit_row ||
525  recHit.column() != hit_col)
526  continue;
527 
528  // Check the hit energy and time
529  if (recHit.energy() != cluster.hitENERGY()[ihit] || recHit.time() != cluster.hitTIME()[ihit])
530  continue;
531 
532  // SIM hit's position in the module reference frame
533  Local3DPoint local_point_sim(convertMmToCm(m_btlSimHits[recHit.id().rawId()].x),
534  convertMmToCm(m_btlSimHits[recHit.id().rawId()].y),
535  convertMmToCm(m_btlSimHits[recHit.id().rawId()].z));
536  local_point_sim =
537  topo.pixelToModuleLocalPoint(local_point_sim, hitId.row(topo.nrows()), hitId.column(topo.nrows()));
538 
539  // Calculate the SIM cluster's position in the module reference frame
540  cluLocXSIM += local_point_sim.x() * m_btlSimHits[recHit.id().rawId()].energy;
541  cluLocYSIM += local_point_sim.y() * m_btlSimHits[recHit.id().rawId()].energy;
542  cluLocZSIM += local_point_sim.z() * m_btlSimHits[recHit.id().rawId()].energy;
543 
544  // Calculate the SIM cluster energy and time
545  cluEneSIM += m_btlSimHits[recHit.id().rawId()].energy;
546  cluTimeSIM += m_btlSimHits[recHit.id().rawId()].time * m_btlSimHits[recHit.id().rawId()].energy;
547 
548  break;
549 
550  } // recHit loop
551 
552  } // ihit loop
553  }
554 
555  // Find the MTDTrackingRecHit corresponding to the cluster
556  const MTDTrackingRecHit* comp(nullptr);
557  bool matchClu = false;
558  const auto& trkHits = (*mtdTrkHitHandle)[detIdObject];
559  for (const auto& trkHit : trkHits) {
560  if (isSameCluster(trkHit.mtdCluster(), cluster)) {
561  comp = trkHit.clone();
562  matchClu = true;
563  break;
564  }
565  }
566  if (!matchClu) {
567  edm::LogWarning("BtlLocalRecoValidation")
568  << "No valid TrackingRecHit corresponding to cluster, detId = " << detIdObject.rawId();
569  }
570 
571  // --- Fill the cluster resolution histograms
572  if (optionalPlots_) {
573  if (cluTimeSIM > 0. && cluEneSIM > 0.) {
574  cluTimeSIM /= cluEneSIM;
575 
576  Local3DPoint cluLocalPosSIM(cluLocXSIM / cluEneSIM, cluLocYSIM / cluEneSIM, cluLocZSIM / cluEneSIM);
577  const auto& cluGlobalPosSIM = genericDet->toGlobal(cluLocalPosSIM);
578 
579  float time_res = cluster.time() - cluTimeSIM;
580  float energy_res = cluster.energy() - cluEneSIM;
581  meCluTimeRes_->Fill(time_res);
582  meCluEnergyRes_->Fill(energy_res);
583 
584  float rho_res = global_point.perp() - cluGlobalPosSIM.perp();
585  float phi_res = global_point.phi() - cluGlobalPosSIM.phi();
586 
587  meCluRhoRes_->Fill(rho_res);
588  meCluPhiRes_->Fill(phi_res);
589 
590  float xlocal_res = local_point.x() - cluLocalPosSIM.x();
591  float ylocal_res = local_point.y() - cluLocalPosSIM.y();
592 
593  float z_res = global_point.z() - cluGlobalPosSIM.z();
594 
595  meCluZRes_->Fill(z_res);
596 
597  if (matchClu && comp != nullptr) {
598  meCluLocalXRes_->Fill(xlocal_res);
599 
600  if (global_point.z() > 0) {
601  meCluLocalYResZGlobPlus_->Fill(ylocal_res);
602  meCluLocalYPullZGlobPlus_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
603  } else {
604  meCluLocalYResZGlobMinus_->Fill(ylocal_res);
605  meCluLocalYPullZGlobMinus_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
606  }
607  if (cluster.size() == 1) { // single-crystal clusters
608  meCluSingCrystalLocalYRes_->Fill(ylocal_res);
609  if (global_point.z() > 0) {
611  } else {
613  }
614  } // end of single-crystal clusters
615  else {
616  if (cluster.size() > 1) { // multi-crystal clusters
617  meCluMultiCrystalLocalYRes_->Fill(ylocal_res);
618  if (global_point.z() > 0) {
620  } else {
622  }
623  }
624  } // end of multi-crystal clusters
625 
626  if (abs(global_point.eta()) < 0.3) {
627  meCluCentralLocalYRes_->Fill(ylocal_res);
628  if (global_point.z() > 0) {
630  } else {
632  }
633 
634  } else {
635  if (abs(global_point.eta()) > 1) {
636  meCluForwardLocalYRes_->Fill(ylocal_res);
637  if (global_point.z() > 0) {
638  meCluForwardPlusLocalYRes_->Fill(ylocal_res);
639  } else {
640  meCluForwardMinusLocalYRes_->Fill(ylocal_res);
641  }
642  }
643  }
644 
645  meCluYXLocal_->Fill(local_point.x(), local_point.y());
646  meCluYXLocalSim_->Fill(cluLocalPosSIM.x(), cluLocalPosSIM.y());
647 
648  meCluLocalXPull_->Fill(xlocal_res / std::sqrt(comp->localPositionError().xx()));
649  meCluZPull_->Fill(z_res / std::sqrt(comp->globalPositionError().czz()));
650  meCluXLocalErr_->Fill(std::sqrt(comp->localPositionError().xx()));
651  meCluYLocalErr_->Fill(std::sqrt(comp->localPositionError().yy()));
652  }
653 
654  meCluEnergyvsEta_->Fill(std::abs(cluGlobalPosSIM.eta()), cluster.energy());
655  meCluHitsvsEta_->Fill(std::abs(cluGlobalPosSIM.eta()), cluster.size());
656 
657  meCluTResvsEta_->Fill(std::abs(cluGlobalPosSIM.eta()), time_res);
658  meCluTResvsE_->Fill(cluEneSIM, time_res);
659 
660  meCluTPullvsEta_->Fill(std::abs(cluGlobalPosSIM.eta()), time_res / cluster.timeError());
661  meCluTPullvsE_->Fill(cluEneSIM, time_res / cluster.timeError());
662 
663  } // if ( cluTimeSIM > 0. && cluEneSIM > 0. )
664  else {
665  meUnmatchedCluEnergy_->Fill(std::log10(cluster.energy()));
666  }
667  }
668 
669  // --- Fill the cluster resolution histograms using MtdSimLayerClusters as mtd truth
670  edm::Ref<edmNew::DetSetVector<FTLCluster>, FTLCluster> clusterRef = edmNew::makeRefTo(btlRecCluHandle, &cluster);
671  auto itp = r2sAssociationMap.equal_range(clusterRef);
672  if (itp.first != itp.second) {
673  std::vector<MtdSimLayerClusterRef> simClustersRefs =
674  (*itp.first).second; // the range of itp.first, itp.second should be always 1
675  for (unsigned int i = 0; i < simClustersRefs.size(); i++) {
676  auto simClusterRef = simClustersRefs[i];
677 
678  float simClusEnergy = convertUnitsTo(0.001_MeV, (*simClusterRef).simLCEnergy()); // GeV --> MeV
679  float simClusTime = (*simClusterRef).simLCTime();
680  LocalPoint simClusLocalPos = (*simClusterRef).simLCPos();
681  const auto& simClusGlobalPos = genericDet->toGlobal(simClusLocalPos);
682  unsigned int idOffset = (*simClusterRef).trackIdOffset();
683 
684  float time_res = cluster.time() - simClusTime;
685  float energy_res = cluster.energy() - simClusEnergy;
686  float rho_res = global_point.perp() - simClusGlobalPos.perp();
687  float phi_res = global_point.phi() - simClusGlobalPos.phi();
688  float z_res = global_point.z() - simClusGlobalPos.z();
689  float xlocal_res = local_point.x() - simClusLocalPos.x();
690  float ylocal_res = local_point.y() - simClusLocalPos.y();
691 
692  meCluTrackIdOffset_->Fill(float(idOffset));
693 
694  // -- Fill for direct hits
695  if (idOffset == 0) {
696  meCluTimeRes_simLC_->Fill(time_res);
697  meCluEnergyRes_simLC_->Fill(energy_res);
698  meCluRhoRes_simLC_->Fill(rho_res);
699  meCluPhiRes_simLC_->Fill(phi_res);
700  meCluZRes_simLC_->Fill(z_res);
701 
702  if (matchClu && comp != nullptr) {
703  meCluLocalXRes_simLC_->Fill(xlocal_res);
704 
705  if (global_point.z() > 0) {
707  meCluLocalYPullZGlobPlus_simLC_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
708  } else {
710  meCluLocalYPullZGlobMinus_simLC_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
711  }
712  if (optionalPlots_) {
713  if (cluster.size() == 1) { // single-crystal clusters
715  if (global_point.z() > 0) {
717  } else {
719  }
720  } // end of single-crystal clusters
721  else {
722  if (cluster.size() > 1) { // multi-crystal clusters
724  if (global_point.z() > 0) {
726  } else {
728  }
729  }
730  } // end of multi-crystal clusters
731 
732  if (abs(global_point.eta()) < 0.3) {
733  meCluCentralLocalYRes_simLC_->Fill(ylocal_res);
734  if (global_point.z() > 0) {
736  } else {
738  }
739  } else {
740  if (abs(global_point.eta()) > 1) {
741  meCluForwardLocalYRes_simLC_->Fill(ylocal_res);
742  if (global_point.z() > 0) {
744  } else {
746  }
747  }
748  }
749  } //end of optional plots
750 
751  meCluLocalXPull_simLC_->Fill(xlocal_res / std::sqrt(comp->localPositionError().xx()));
752  meCluZPull_simLC_->Fill(z_res / std::sqrt(comp->globalPositionError().czz()));
753  }
754 
755  meCluTResvsEta_simLC_->Fill(std::abs(simClusGlobalPos.eta()), time_res);
756  meCluTResvsE_simLC_->Fill(simClusEnergy, time_res);
757 
758  meCluTPullvsEta_simLC_->Fill(std::abs(simClusGlobalPos.eta()), time_res / cluster.timeError());
759  meCluTPullvsE_simLC_->Fill(simClusEnergy, time_res / cluster.timeError());
760 
761  } // if idOffset == 0
762  else {
768 
769  if (matchClu && comp != nullptr) {
771 
772  if (global_point.z() > 0) {
775  std::sqrt(comp->localPositionError().yy()));
776  } else {
779  std::sqrt(comp->localPositionError().yy()));
780  }
781  if (optionalPlots_) {
782  if (cluster.size() == 1) { // single-crystal clusters
784  if (global_point.z() > 0) {
786  } else {
788  }
789  } // end of single-crystal clusters
790  else {
791  if (cluster.size() > 1) { // multi-crystal clusters
793  if (global_point.z() > 0) {
795  } else {
797  }
798  }
799  } // end of multi-crystal clusters
800 
801  if (abs(global_point.eta()) < 0.3) {
803  if (global_point.z() > 0) {
805  } else {
807  }
808  } else {
809  if (abs(global_point.eta()) > 1) {
811  if (global_point.z() > 0) {
813  } else {
815  }
816  }
817  }
818  } //end of optional plots
819 
820  meCluLocalXPull_simLC_fromIndirectHits_->Fill(xlocal_res / std::sqrt(comp->localPositionError().xx()));
821  meCluZPull_simLC_fromIndirectHits_->Fill(z_res / std::sqrt(comp->globalPositionError().czz()));
822  }
823 
824  meCluTResvsEta_simLC_fromIndirectHits_->Fill(std::abs(simClusGlobalPos.eta()), time_res);
825  meCluTResvsE_simLC_fromIndirectHits_->Fill(simClusEnergy, time_res);
826 
827  meCluTPullvsEta_simLC_fromIndirectHits_->Fill(std::abs(simClusGlobalPos.eta()),
828  time_res / cluster.timeError());
829  meCluTPullvsE_simLC_fromIndirectHits_->Fill(simClusEnergy, time_res / cluster.timeError());
830  }
831 
832  } // simLayerClusterRefs loop
833  }
834 
835  } // cluster loop
836 
837  } // DetSetClu loop
838 
839  if (n_clus_btl > 0)
840  meNclusters_->Fill(log10(n_clus_btl));
841 
842  // --- This is to count the number of processed events, needed in the harvesting step
843  meNevents_->Fill(0.5);
844 
845  // --- Loop over the BTL Uncalibrated RECO hits
846  if (optionalPlots_) {
847  auto btlUncalibRecHitsHandle = makeValid(iEvent.getHandle(btlUncalibRecHitsToken_));
848  for (const auto& uRecHit : *btlUncalibRecHitsHandle) {
849  BTLDetId detId = uRecHit.id();
850 
851  LogTrace("BtlLocalRecoValidation") << "@URH detid " << detId.rawId() << " A " << uRecHit.amplitude().first << " "
852  << uRecHit.amplitude().second << " T " << uRecHit.time().first << " "
853  << uRecHit.time().second;
854 
855  // --- Skip UncalibratedRecHits not matched to SimHits
856  if (m_btlSimHits.count(detId.rawId()) != 1)
857  continue;
858 
859  // --- Combine the information from the left and right BTL cell sides
860 
861  float nHits = 0.;
862  float hit_amplitude = 0.;
863  float hit_time = 0.;
864 
865  // left side:
866  if (uRecHit.amplitude().first > 0.) {
867  hit_amplitude += uRecHit.amplitude().first;
868  hit_time += uRecHit.time().first;
869  nHits += 1.;
870  }
871  // right side:
872  if (uRecHit.amplitude().second > 0.) {
873  hit_amplitude += uRecHit.amplitude().second;
874  hit_time += uRecHit.time().second;
875  nHits += 1.;
876  }
877 
878  hit_amplitude /= nHits;
879  hit_time /= nHits;
880 
881  LogDebug("BtlLocalRecoValidation") << "#unc " << nHits << " A/T " << hit_amplitude << " " << hit_time;
882  if (nHits == 0.) {
883  edm::LogWarning("BtlLocalRecoValidation") << "Empty uncalibrated hit in DetId " << detId;
884  continue;
885  }
886 
887  hit_amplitude /= nHits;
888  hit_time /= nHits;
889 
890  if (hit_amplitude < hitMinAmplitude_)
891  continue;
892 
893  // --- Fill the histograms
894 
895  meUncEneRVsX_->Fill(uRecHit.position(), uRecHit.amplitude().first - hit_amplitude);
896  meUncEneLVsX_->Fill(uRecHit.position(), uRecHit.amplitude().second - hit_amplitude);
897 
898  meUncTimeRVsX_->Fill(uRecHit.position(), uRecHit.time().first - hit_time);
899  meUncTimeLVsX_->Fill(uRecHit.position(), uRecHit.time().second - hit_time);
900 
901  if (uncalibRecHitsPlots_) {
902  DetId geoId = detId.geographicalId(MTDTopologyMode::crysLayoutFromTopoMode(topology->getMTDTopologyMode()));
903  const MTDGeomDet* thedet = geom->idToDet(geoId);
904  if (thedet == nullptr)
905  throw cms::Exception("BtlLocalRecoValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
906  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
907  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
908  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
909 
910  Local3DPoint local_point(0., 0., 0.);
911  local_point = topo.pixelToModuleLocalPoint(local_point, detId.row(topo.nrows()), detId.column(topo.nrows()));
912  const auto& global_point = thedet->toGlobal(local_point);
913 
914  float time_res = hit_time - m_btlSimHits[detId.rawId()].time;
915 
916  // amplitude histograms
917 
918  int qBin = (int)(hit_amplitude / binWidthQ_);
919  if (qBin > nBinsQ_ - 1)
920  qBin = nBinsQ_ - 1;
921 
922  meTimeResQ_[qBin]->Fill(time_res);
923 
924  int etaBin = 0;
925  for (int ibin = 1; ibin < nBinsQEta_; ++ibin)
926  if (fabs(global_point.eta()) >= binsQEta_[ibin] && fabs(global_point.eta()) < binsQEta_[ibin + 1])
927  etaBin = ibin;
928 
929  meTimeResQvsEta_[qBin][etaBin]->Fill(time_res);
930 
931  // eta histograms
932 
933  etaBin = (int)(fabs(global_point.eta()) / binWidthEta_);
934  if (etaBin > nBinsEta_ - 1)
935  etaBin = nBinsEta_ - 1;
936 
937  meTimeResEta_[etaBin]->Fill(time_res);
938 
939  qBin = 0;
940  for (int ibin = 1; ibin < nBinsEtaQ_; ++ibin)
941  if (hit_amplitude >= binsEtaQ_[ibin] && hit_amplitude < binsEtaQ_[ibin + 1])
942  qBin = ibin;
943 
944  meTimeResEtavsQ_[etaBin][qBin]->Fill(time_res);
945  }
946  } // uRecHit loop}
947  }
948 }
949 
950 // ------------ method for histogram booking ------------
952  edm::Run const& run,
953  edm::EventSetup const& iSetup) {
954  ibook.setCurrentFolder(folder_);
955 
956  // --- histograms booking
957 
958  meNevents_ = ibook.book1D("BtlNevents", "Number of events", 1, 0., 1.);
959 
960  meNhits_ = ibook.book1D("BtlNhits", "Number of BTL RECO hits;log_{10}(N_{RECO})", 100, 0., 5.25);
961 
962  meHitEnergy_ = ibook.book1D("BtlHitEnergy", "BTL RECO hits energy;E_{RECO} [MeV]", 100, 0., 20.);
963  meHitLogEnergy_ = ibook.book1D("BtlHitLogEnergy", "BTL RECO hits energy;log_{10}(E_{RECO} [MeV])", 16, -0.1, 1.5);
964  meHitTime_ = ibook.book1D("BtlHitTime", "BTL RECO hits ToA;ToA_{RECO} [ns]", 100, 0., 25.);
965  meHitTimeError_ = ibook.book1D("BtlHitTimeError", "BTL RECO hits ToA error;#sigma^{ToA}_{RECO} [ns]", 50, 0., 0.1);
966  meOccupancy_ = ibook.book2D(
967  "BtlOccupancy", "BTL RECO hits occupancy;Z_{RECO} [cm]; #phi_{RECO} [rad]", 65, -260., 260., 126, -3.2, 3.2);
968  if (optionalPlots_) {
969  meLocalOccupancy_ = ibook.book2D(
970  "BtlLocalOccupancy", "BTL RECO hits local occupancy;X_{RECO} [cm]; Y_{RECO} [cm]", 100, 10., 10., 60, -3., 3.);
971  }
972  meHitXlocal_ = ibook.book1D("BtlHitXlocal", "BTL RECO local X;X_{RECO}^{LOC} [cm]", 100, -10., 10.);
973  meHitYlocal_ = ibook.book1D("BtlHitYlocal", "BTL RECO local Y;Y_{RECO}^{LOC} [cm]", 60, -3, 3);
974  meHitZlocal_ = ibook.book1D("BtlHitZlocal", "BTL RECO local z;z_{RECO}^{LOC} [cm]", 8, -0.4, 0.4);
975  meHitZ_ = ibook.book1D("BtlHitZ", "BTL RECO hits Z;Z_{RECO} [cm]", 100, -260., 260.);
976  meHitPhi_ = ibook.book1D("BtlHitPhi", "BTL RECO hits #phi;#phi_{RECO} [rad]", 126, -3.2, 3.2);
977  meHitEta_ = ibook.book1D("BtlHitEta", "BTL RECO hits #eta;#eta_{RECO}", 100, -1.55, 1.55);
978  meHitTvsE_ =
979  ibook.bookProfile("BtlHitTvsE", "BTL RECO ToA vs energy;E_{RECO} [MeV];ToA_{RECO} [ns]", 50, 0., 20., 0., 100.);
980  meHitEvsPhi_ = ibook.bookProfile(
981  "BtlHitEvsPhi", "BTL RECO energy vs #phi;#phi_{RECO} [rad];E_{RECO} [MeV]", 50, -3.2, 3.2, 0., 100.);
982  meHitEvsEta_ = ibook.bookProfile(
983  "BtlHitEvsEta", "BTL RECO energy vs #eta;#eta_{RECO};E_{RECO} [MeV]", 50, -1.55, 1.55, 0., 100.);
984  meHitEvsZ_ =
985  ibook.bookProfile("BtlHitEvsZ", "BTL RECO energy vs Z;Z_{RECO} [cm];E_{RECO} [MeV]", 50, -260., 260., 0., 100.);
986  meHitTvsPhi_ = ibook.bookProfile(
987  "BtlHitTvsPhi", "BTL RECO ToA vs #phi;#phi_{RECO} [rad];ToA_{RECO} [ns]", 50, -3.2, 3.2, 0., 100.);
988  meHitTvsEta_ =
989  ibook.bookProfile("BtlHitTvsEta", "BTL RECO ToA vs #eta;#eta_{RECO};ToA_{RECO} [ns]", 50, -1.6, 1.6, 0., 100.);
990  meHitTvsZ_ =
991  ibook.bookProfile("BtlHitTvsZ", "BTL RECO ToA vs Z;Z_{RECO} [cm];ToA_{RECO} [ns]", 50, -260., 260., 0., 100.);
992  meHitLongPos_ = ibook.book1D("BtlLongPos", "BTL RECO hits longitudinal position;long. pos._{RECO}", 50, -5, 5);
993  meTimeRes_ = ibook.book1D("BtlTimeRes", "BTL time resolution;T_{RECO}-T_{SIM}", 100, -0.5, 0.5);
994  meTimeResVsE_ = ibook.bookProfile(
995  "BtlTimeResvsE", "BTL time resolution vs hit energy;E_{RECO} [MeV];T_{RECO}-T_{SIM}", 50, 0., 20., -0.5, 0.5, "S");
996  meEnergyRes_ = ibook.book1D("BtlEnergyRes", "BTL energy resolution;E_{RECO}-E_{SIM}", 100, -0.5, 0.5);
997  meEnergyRelResVsE_ = ibook.bookProfile("BtlEnergyRelResvsE",
998  "BTL relative energy resolution vs hit energy;E_{RECO} [MeV];E_{RECO}-E_{SIM}",
999  50,
1000  0.,
1001  20.,
1002  -0.15,
1003  0.15,
1004  "S");
1005  meLongPosPull_ = ibook.book1D("BtlLongPosPull",
1006  "BTL longitudinal position pull;X^{loc}_{RECO}-X^{loc}_{SIM}/#sigma_{xloc_{RECO}}",
1007  100,
1008  -5.,
1009  5.);
1011  "BtlLongposPullvsE",
1012  "BTL longitudinal position pull vs E;E_{SIM} [MeV];X^{loc}_{RECO}-X^{loc}_{SIM}/#sigma_{xloc_{RECO}}",
1013  20,
1014  0.,
1015  20.,
1016  -5.,
1017  5.,
1018  "S");
1020  "BtlLongposPullvsEta",
1021  "BTL longitudinal position pull vs #eta;|#eta_{RECO}|;X^{loc}_{RECO}-X^{loc}_{SIM}/#sigma_{xloc_{RECO}}",
1022  32,
1023  0,
1024  1.55,
1025  -5.,
1026  5.,
1027  "S");
1028  meTPullvsE_ = ibook.bookProfile(
1029  "BtlTPullvsE", "BTL time pull vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}", 20, 0., 20., -5., 5., "S");
1030  meTPullvsEta_ = ibook.bookProfile("BtlTPullvsEta",
1031  "BTL time pull vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1032  30,
1033  0,
1034  1.55,
1035  -5.,
1036  5.,
1037  "S");
1038 
1039  meUnmatchedRecHit_ = ibook.book1D(
1040  "UnmatchedRecHit", "log10(#BTL crystals with rechits but no simhit);log10(#BTL rechits)", 80, -2., 6.);
1041 
1042  meNclusters_ = ibook.book1D("BtlNclusters", "Number of BTL RECO clusters;log_{10}(N_{RECO})", 100, 0., 5.25);
1043  meCluTime_ = ibook.book1D("BtlCluTime", "BTL cluster time ToA;ToA [ns]", 250, 0, 25);
1044  meCluTimeError_ = ibook.book1D("BtlCluTimeError", "BTL cluster time error;#sigma_{t} [ns]", 100, 0, 0.1);
1045  meCluEnergy_ = ibook.book1D("BtlCluEnergy", "BTL cluster energy;E_{RECO} [MeV]", 100, 0, 20);
1046  meCluPhi_ = ibook.book1D("BtlCluPhi", "BTL cluster #phi;#phi_{RECO} [rad]", 144, -3.2, 3.2);
1047  meCluEta_ = ibook.book1D("BtlCluEta", "BTL cluster #eta;#eta_{RECO}", 100, -1.55, 1.55);
1048  meCluHits_ = ibook.book1D("BtlCluHitNumber", "BTL hits per cluster; Cluster size", 10, 0, 10);
1049  meCluZvsPhi_ = ibook.book2D(
1050  "BtlOccupancy", "BTL cluster Z vs #phi;Z_{RECO} [cm]; #phi_{RECO} [rad]", 144, -260., 260., 50, -3.2, 3.2);
1051 
1052  if (optionalPlots_) {
1054  "BtlCluEnergyVsEta", "BTL cluster energy vs #eta; |#eta_{RECO}|; E_{RECO} [cm]", 30, 0., 1.55, 0., 20., "S");
1055  meCluHitsvsEta_ = ibook.bookProfile(
1056  "BtlCluHitsVsEta", "BTL hits per cluster vs #eta; |#eta_{RECO}|;Cluster size", 30, 0., 1.55, 0., 10., "S");
1057 
1058  meCluTimeRes_ = ibook.book1D("BtlCluTimeRes", "BTL cluster time resolution;T_{RECO}-T_{SIM} [ns]", 100, -0.5, 0.5);
1059  meCluEnergyRes_ =
1060  ibook.book1D("BtlCluEnergyRes", "BTL cluster energy resolution;E_{RECO}-E_{SIM} [MeV]", 100, -0.5, 0.5);
1061  meCluTResvsE_ = ibook.bookProfile("BtlCluTResvsE",
1062  "BTL cluster time resolution vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM}) [ns]",
1063  20,
1064  0.,
1065  20.,
1066  -0.5,
1067  0.5,
1068  "S");
1069  meCluTResvsEta_ = ibook.bookProfile("BtlCluTResvsEta",
1070  "BTL cluster time resolution vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM}) [ns]",
1071  30,
1072  0,
1073  1.55,
1074  -0.5,
1075  0.5,
1076  "S");
1077  meCluTPullvsE_ = ibook.bookProfile("BtlCluTPullvsE",
1078  "BTL cluster time pull vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1079  20,
1080  0.,
1081  20.,
1082  -5.,
1083  5.,
1084  "S");
1086  ibook.bookProfile("BtlCluTPullvsEta",
1087  "BTL cluster time pull vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1088  30,
1089  0,
1090  1.55,
1091  -5.,
1092  5.,
1093  "S");
1094  meCluRhoRes_ =
1095  ibook.book1D("BtlCluRhoRes", "BTL cluster #rho resolution;#rho_{RECO}-#rho_{SIM} [cm]", 100, -0.5, 0.5);
1096  meCluPhiRes_ =
1097  ibook.book1D("BtlCluPhiRes", "BTL cluster #phi resolution;#phi_{RECO}-#phi_{SIM} [rad]", 100, -0.03, 0.03);
1098  meCluZRes_ = ibook.book1D("BtlCluZRes", "BTL cluster Z resolution;Z_{RECO}-Z_{SIM} [cm]", 100, -0.2, 0.2);
1099  meCluLocalXRes_ =
1100  ibook.book1D("BtlCluLocalXRes", "BTL cluster local X resolution;X_{RECO}-X_{SIM} [cm]", 100, -3.1, 3.1);
1102  "BtlCluLocalYResZGlobPlus", "BTL cluster local Y resolution (glob Z > 0);Y_{RECO}-Y_{SIM} [cm]", 100, -0.2, 0.2);
1103  meCluLocalYResZGlobMinus_ = ibook.book1D("BtlCluLocalYResZGlobMinus",
1104  "BTL cluster local Y resolution (glob Z < 0);Y_{RECO}-Y_{SIM} [cm]",
1105  100,
1106  -0.2,
1107  0.2);
1109  ibook.book1D("BtlCluSingCrystalLocalYRes",
1110  "BTL cluster local Y resolution (single Crystal clusters);Y_{RECO}-Y_{SIM} [cm]",
1111  100,
1112  -0.2,
1113  0.2);
1115  ibook.book1D("BtlCluSingCrystalLocalYResZGlobPlus",
1116  "BTL cluster local Y resolution (single Crystal clusters, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1117  100,
1118  -0.2,
1119  0.2);
1121  ibook.book1D("BtlCluSingCrystalLocalYResZGlobMinus",
1122  "BTL cluster local Y resolution (single Crystal clusters, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1123  100,
1124  -0.2,
1125  0.2);
1127  ibook.book1D("BtlCluMultiCrystalLocalYRes",
1128  "BTL cluster local Y resolution (Multi-Crystal clusters);Y_{RECO}-Y_{SIM} [cm]",
1129  100,
1130  -0.2,
1131  0.2);
1133  ibook.book1D("BtlCluMultiCrystalLocalYResZGlobPlus",
1134  "BTL cluster local Y resolution (Multi-Crystal clusters, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1135  100,
1136  -0.2,
1137  0.2);
1139  ibook.book1D("BtlCluMultiCrystalLocalYResZGlobMinus",
1140  "BTL cluster local Y resolution (Multi-Crystal clusters, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1141  100,
1142  -0.2,
1143  0.2);
1144  meCluCentralLocalYRes_ = ibook.book1D("BtlCluCentralLocalYRes",
1145  "BTL cluster local Y resolution (central region);Y_{RECO}-Y_{SIM} [cm]",
1146  100,
1147  -0.2,
1148  0.2);
1150  ibook.book1D("BtlCluCentralLocalYResZGlobPlus",
1151  "BTL cluster local Y resolution (central region, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1152  100,
1153  -0.2,
1154  0.2);
1156  ibook.book1D("BtlCluCentralLocalYResZGlobMinus",
1157  "BTL cluster local Y resolution (central region, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1158  100,
1159  -0.2,
1160  0.2);
1161  meCluForwardLocalYRes_ = ibook.book1D("BtlCluForwardLocalYRes",
1162  "BTL cluster local Y resolution (forward region);Y_{RECO}-Y_{SIM} [cm]",
1163  100,
1164  -0.2,
1165  0.2);
1167  ibook.book1D("BtlCluForwardPlusLocalYRes",
1168  "BTL cluster local Y resolution (forward region, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1169  100,
1170  -0.2,
1171  0.2);
1173  ibook.book1D("BtlCluForwardMinusLocalYRes",
1174  "BTL cluster local Y resolution (forward region, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1175  100,
1176  -0.2,
1177  0.2);
1178 
1179  meCluLocalYPullZGlobPlus_ = ibook.book1D("BtlCluLocalYPullZGlobPlus",
1180  "BTL cluster local Y pull (glob Z > 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1181  100,
1182  -5.,
1183  5.);
1184  meCluLocalYPullZGlobMinus_ = ibook.book1D("BtlCluLocalYPullZGlobMinus",
1185  "BTL cluster local Y pull (glob Z < 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1186  100,
1187  -5.,
1188  5.);
1189 
1191  ibook.book1D("BtlCluLocalXPull", "BTL cluster local X pull;X_{RECO}-X_{SIM}/sigmaX_[RECO]", 100, -5., 5.);
1192 
1193  meCluZPull_ = ibook.book1D("BtlCluZPull", "BTL cluster Z pull;Z_{RECO}-Z_{SIM}/sigmaZ_[RECO]", 100, -5., 5.);
1194  meCluXLocalErr_ = ibook.book1D("BtlCluXLocalErr", "BTL cluster X local error;sigmaX_{RECO,loc} [cm]", 20, 0., 2.);
1195  meCluYLocalErr_ = ibook.book1D("BtlCluYLocalErr", "BTL cluster Y local error;sigmaY_{RECO,loc} [cm]", 20, 0., 0.4);
1196  meCluYXLocal_ = ibook.book2D("BtlCluYXLocal",
1197  "BTL cluster local Y vs X;X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
1198  200,
1199  -9.5,
1200  9.5,
1201  200,
1202  -2.8,
1203  2.8);
1204  meCluYXLocalSim_ = ibook.book2D("BtlCluYXLocalSim",
1205  "BTL cluster local Y vs X;X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
1206  200,
1207  -9.5,
1208  9.5,
1209  200,
1210  -2.8,
1211  2.8);
1213  ibook.book1D("BtlUnmatchedCluEnergy", "BTL unmatched cluster log10(energy);log10(E_{RECO} [MeV])", 5, -3, 2);
1214  }
1215 
1216  // with MtdSimLayerCluster as truth
1217 
1219  ibook.book1D("BtlCluTrackIdOffset", "BTL cluster category (trackId offset); trackId offset", 4, 0.0, 4.0);
1220  meCluTimeRes_simLC_ = ibook.book1D("BtlCluTimeRes_simLC",
1221  "BTL cluster time resolution (wrt MtdSimLayerClusters);T_{RECO}-T_{SIM} [ns]",
1222  100,
1223  -0.5,
1224  0.5);
1225  meCluEnergyRes_simLC_ = ibook.book1D("BtlCluEnergyRes_simLC",
1226  "BTL cluster energy resolution (wrt MtdSimLayerClusters);E_{RECO}-E_{SIM} [MeV]",
1227  100,
1228  -0.5,
1229  0.5);
1231  "BtlCluTResvsE_simLC",
1232  "BTL cluster time resolution (wrt MtdSimLayerClusters) vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM}) [ns]",
1233  20,
1234  0.,
1235  20.,
1236  -0.5,
1237  0.5,
1238  "S");
1240  "BtlCluTResvsEta_simLC",
1241  "BTL cluster time resolution (wrt MtdSimLayerClusters) vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM}) [ns]",
1242  30,
1243  0,
1244  1.55,
1245  -0.5,
1246  0.5,
1247  "S");
1249  "BtlCluTPullvsE_simLC",
1250  "BTL cluster time pull (wrt MtdSimLayerClusters) vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1251  20,
1252  0.,
1253  20.,
1254  -5.,
1255  5.,
1256  "S");
1258  "BtlCluTPullvsEta_simLC",
1259  "BTL cluster time pull (wrt MtdSimLayerClusters) vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1260  30,
1261  0,
1262  1.55,
1263  -5.,
1264  5.,
1265  "S");
1266  meCluRhoRes_simLC_ = ibook.book1D("BtlCluRhoRes_simLC",
1267  "BTL cluster #rho resolution (wrt MtdSimLayerClusters);#rho_{RECO}-#rho_{SIM} [cm]",
1268  100,
1269  -0.5,
1270  0.5);
1272  ibook.book1D("BtlCluPhiRes_simLC",
1273  "BTL cluster #phi resolution (wrt MtdSimLayerClusters);#phi_{RECO}-#phi_{SIM} [rad]",
1274  100,
1275  -0.03,
1276  0.03);
1277  meCluZRes_simLC_ = ibook.book1D(
1278  "BtlCluZRes_simLC", "BTL cluster Z resolution (wrt MtdSimLayerClusters);Z_{RECO}-Z_{SIM} [cm]", 100, -0.2, 0.2);
1279  meCluLocalXRes_simLC_ = ibook.book1D("BtlCluLocalXRes_simLC",
1280  "BTL cluster local X resolution (wrt MtdSimLayerClusters);X_{RECO}-X_{SIM} [cm]",
1281  100,
1282  -3.1,
1283  3.1);
1285  ibook.book1D("BtlCluLocalYResZGlobPlus_simLC",
1286  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, glob Z > 0);Y_{RECO}-Y_{SIM} [cm]",
1287  100,
1288  -0.2,
1289  0.2);
1291  ibook.book1D("BtlCluLocalYResZGlobMinus_simLC",
1292  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, glob Z < 0);Y_{RECO}-Y_{SIM} [cm]",
1293  100,
1294  -0.2,
1295  0.2);
1296  if (optionalPlots_) {
1298  "BtlCluSingCrystalLocalYRes_simLC",
1299  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, single Crystal clusters);Y_{RECO}-Y_{SIM} [cm]",
1300  100,
1301  -0.2,
1302  0.2);
1304  ibook.book1D("BtlCluSingCrystalLocalYResZGlobPlus_simLC",
1305  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, single Crystal clusters, Z glob > "
1306  "0);Y_{RECO}-Y_{SIM} [cm]",
1307  100,
1308  -0.2,
1309  0.2);
1311  ibook.book1D("BtlCluSingCrystalLocalYResZGlobMinus_simLC",
1312  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, single Crystal clusters, Z glob < "
1313  "0);Y_{RECO}-Y_{SIM} [cm]",
1314  100,
1315  -0.2,
1316  0.2);
1318  "BtlCluMultiCrystalLocalYRes_simLC",
1319  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, Multi-Crystal clusters);Y_{RECO}-Y_{SIM} [cm]",
1320  100,
1321  -0.2,
1322  0.2);
1324  ibook.book1D("BtlCluMultiCrystalLocalYResZGlobPlus_simLC",
1325  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, Multi-Crystal clusters, Z glob > "
1326  "0);Y_{RECO}-Y_{SIM} [cm]",
1327  100,
1328  -0.2,
1329  0.2);
1331  ibook.book1D("BtlCluMultiCrystalLocalYResZGlobMinus_simLC",
1332  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, Multi-Crystal clusters, Z glob < "
1333  "0);Y_{RECO}-Y_{SIM} [cm]",
1334  100,
1335  -0.2,
1336  0.2);
1338  ibook.book1D("BtlCluCentralLocalYRes_simLC",
1339  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, central region);Y_{RECO}-Y_{SIM} [cm]",
1340  100,
1341  -0.2,
1342  0.2);
1344  "BtlCluCentralLocalYResZGlobPlus_simLC",
1345  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, central region, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1346  100,
1347  -0.2,
1348  0.2);
1350  "BtlCluCentralLocalYResZGlobMinus_simLC",
1351  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, central region, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1352  100,
1353  -0.2,
1354  0.2);
1356  ibook.book1D("BtlCluForwardLocalYRes_simLC",
1357  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, forward region);Y_{RECO}-Y_{SIM} [cm]",
1358  100,
1359  -0.2,
1360  0.2);
1362  "BtlCluForwardPlusLocalYRes_simLC",
1363  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, forward region, Z glob > 0);Y_{RECO}-Y_{SIM} [cm]",
1364  100,
1365  -0.2,
1366  0.2);
1368  "BtlCluForwardMinusLocalYRes_simLC",
1369  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, forward region, Z glob < 0);Y_{RECO}-Y_{SIM} [cm]",
1370  100,
1371  -0.2,
1372  0.2);
1373  }
1374  meCluLocalYPullZGlobPlus_simLC_ = ibook.book1D("BtlCluLocalYPullZGlobPlus_simLC",
1375  "BTL cluster local Y pull (glob Z > 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1376  100,
1377  -5.,
1378  5.);
1380  ibook.book1D("BtlCluLocalYPullZGlobMinus_simLC",
1381  "BTL cluster local Y pull (wrt MtdSimLayerClusters, glob Z < 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1382  100,
1383  -5.,
1384  5.);
1385 
1387  ibook.book1D("BtlCluLocalXPull_simLC",
1388  "BTL cluster local X pull (wrt MtdSimLayerClusters);X_{RECO}-X_{SIM}/sigmaX_[RECO]",
1389  100,
1390  -5.,
1391  5.);
1392 
1393  meCluZPull_simLC_ = ibook.book1D(
1394  "BtlCluZPull_simLC", "BTL cluster Z pull (wrt MtdSimLayerClusters);Z_{RECO}-Z_{SIM}/sigmaZ_[RECO]", 100, -5., 5.);
1395  if (optionalPlots_) {
1397  ibook.book2D("BtlCluYXLocalSim_simLC",
1398  "BTL cluster local Y vs X (MtdSimLayerClusters);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
1399  200,
1400  -9.5,
1401  9.5,
1402  200,
1403  -2.8,
1404  2.8);
1405  }
1406 
1408 
1410  ibook.book1D("BtlCluTimeRes_simLC_fromIndirectHits",
1411  "BTL cluster time resolution (wrt MtdSimLayerClusters, non-direct hits);T_{RECO}-T_{SIM} [ns]",
1412  100,
1413  -0.5,
1414  0.5);
1416  ibook.book1D("BtlCluEnergyRes_simLC_fromIndirectHits",
1417  "BTL cluster energy resolution (wrt MtdSimLayerClusters, non-direct hits);E_{RECO}-E_{SIM} [MeV]",
1418  100,
1419  -0.5,
1420  0.5);
1422  ibook.bookProfile("BtlCluTResvsE_simLC_fromIndirectHits",
1423  "BTL cluster time resolution (wrt MtdSimLayerClusters, non-direct hits) vs E;E_{SIM} "
1424  "[MeV];(T_{RECO}-T_{SIM}) [ns]",
1425  20,
1426  0.,
1427  20.,
1428  -0.5,
1429  0.5,
1430  "S");
1432  ibook.bookProfile("BtlCluTResvsEta_simLC_fromIndirectHits",
1433  "BTL cluster time resolution (wrt MtdSimLayerClusters, non-direct hits) vs "
1434  "#eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM}) [ns]",
1435  30,
1436  0,
1437  1.55,
1438  -0.5,
1439  0.5,
1440  "S");
1442  ibook.bookProfile("BtlCluTPullvsE_simLC_fromIndirectHits",
1443  "BTL cluster time pull (wrt MtdSimLayerClusters, non-direct hits) vs E;E_{SIM} "
1444  "[MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1445  20,
1446  0.,
1447  20.,
1448  -5.,
1449  5.,
1450  "S");
1452  ibook.bookProfile("BtlCluTPullvsEta_simLC_fromIndirectHits",
1453  "BTL cluster time pull (wrt MtdSimLayerClusters, non-direct hits) vs "
1454  "#eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1455  30,
1456  0,
1457  1.55,
1458  -5.,
1459  5.,
1460  "S");
1462  ibook.book1D("BtlCluRhoRes_simLC_fromIndirectHits",
1463  "BTL cluster #rho resolution (wrt MtdSimLayerClusters, non-direct hits);#rho_{RECO}-#rho_{SIM} [cm]",
1464  100,
1465  -0.5,
1466  0.5);
1468  "BtlCluPhiRes_simLC_fromIndirectHits",
1469  "BTL cluster #phi resolution (wrt MtdSimLayerClusters, non-direct hits);#phi_{RECO}-#phi_{SIM} [rad]",
1470  100,
1471  -0.03,
1472  0.03);
1474  ibook.book1D("BtlCluZRes_simLC_fromIndirectHits",
1475  "BTL cluster Z resolution (wrt MtdSimLayerClusters, non-direct hits);Z_{RECO}-Z_{SIM} [cm]",
1476  100,
1477  -0.2,
1478  0.2);
1480  ibook.book1D("BtlCluLocalXRes_simLC_fromIndirectHits",
1481  "BTL cluster local X resolution (wrt MtdSimLayerClusters, non-direct hits);X_{RECO}-X_{SIM} [cm]",
1482  100,
1483  -3.1,
1484  3.1);
1486  "BtlCluLocalYResZGlobPlus_simLC_fromIndirectHits",
1487  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, glob Z > 0);Y_{RECO}-Y_{SIM} [cm]",
1488  100,
1489  -0.2,
1490  0.2);
1492  "BtlCluLocalYResZGlobMinus_simLC_fromIndirectHits",
1493  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, glob Z < 0);Y_{RECO}-Y_{SIM} [cm]",
1494  100,
1495  -0.2,
1496  0.2);
1497  if (optionalPlots_) {
1499  ibook.book1D("BtlCluSingCrystalLocalYRes_simLC_fromIndirectHits",
1500  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, single Crystal "
1501  "clusters);Y_{RECO}-Y_{SIM} [cm]",
1502  100,
1503  -0.2,
1504  0.2);
1506  "BtlCluSingCrystalLocalYResZGlobPlus_simLC_fromIndirectHits",
1507  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, single Crystal clusters, Z glob > "
1508  "0);Y_{RECO}-Y_{SIM} [cm]",
1509  100,
1510  -0.2,
1511  0.2);
1513  "BtlCluSingCrystalLocalYResZGlobMinus_simLC_fromIndirectHits",
1514  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, single Crystal clusters, Z glob < "
1515  "0);Y_{RECO}-Y_{SIM} [cm]",
1516  100,
1517  -0.2,
1518  0.2);
1520  ibook.book1D("BtlCluMultiCrystalLocalYRes_simLC_fromIndirectHits",
1521  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, Multi-Crystal "
1522  "clusters);Y_{RECO}-Y_{SIM} [cm]",
1523  100,
1524  -0.2,
1525  0.2);
1527  "BtlCluMultiCrystalLocalYResZGlobPlus_simLC_fromIndirectHits",
1528  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, Multi-Crystal clusters, Z glob > "
1529  "0);Y_{RECO}-Y_{SIM} [cm]",
1530  100,
1531  -0.2,
1532  0.2);
1534  "BtlCluMultiCrystalLocalYResZGlobMinus_simLC_fromIndirectHits",
1535  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, Multi-Crystal clusters, Z glob < "
1536  "0);Y_{RECO}-Y_{SIM} [cm]",
1537  100,
1538  -0.2,
1539  0.2);
1541  ibook.book1D("BtlCluCentralLocalYRes_simLC_fromIndirectHits",
1542  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, central "
1543  "region);Y_{RECO}-Y_{SIM} [cm]",
1544  100,
1545  -0.2,
1546  0.2);
1548  ibook.book1D("BtlCluCentralLocalYResZGlobPlus_simLC_fromIndirectHits",
1549  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, central region, Z glob "
1550  "> 0);Y_{RECO}-Y_{SIM} [cm]",
1551  100,
1552  -0.2,
1553  0.2);
1555  ibook.book1D("BtlCluCentralLocalYResZGlobMinus_simLC_fromIndirectHits",
1556  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, central region, Z glob "
1557  "< 0);Y_{RECO}-Y_{SIM} [cm]",
1558  100,
1559  -0.2,
1560  0.2);
1562  ibook.book1D("BtlCluForwardLocalYRes_simLC_fromIndirectHits",
1563  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, forward "
1564  "region);Y_{RECO}-Y_{SIM} [cm]",
1565  100,
1566  -0.2,
1567  0.2);
1569  ibook.book1D("BtlCluForwardPlusLocalYRes_simLC_fromIndirectHits",
1570  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, forward region, Z glob "
1571  "> 0);Y_{RECO}-Y_{SIM} [cm]",
1572  100,
1573  -0.2,
1574  0.2);
1576  ibook.book1D("BtlCluForwardMinusLocalYRes_simLC_fromIndirectHits",
1577  "BTL cluster local Y resolution (wrt MtdSimLayerClusters, non-direct hits, forward region, Z glob "
1578  "< 0);Y_{RECO}-Y_{SIM} [cm]",
1579  100,
1580  -0.2,
1581  0.2);
1582  }
1584  ibook.book1D("BtlCluLocalYPullZGlobPlus_simLC_fromIndirectHits",
1585  "BTL cluster local Y pull (glob Z > 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1586  100,
1587  -5.,
1588  5.);
1590  "BtlCluLocalYPullZGlobMinus_simLC_fromIndirectHits",
1591  "BTL cluster local Y pull (wrt MtdSimLayerClusters, non-direct hits, glob Z < 0);Y_{RECO}-Y_{SIM}/sigmaY_[RECO]",
1592  100,
1593  -5.,
1594  5.);
1595 
1597  ibook.book1D("BtlCluLocalXPull_simLC_fromIndirectHits",
1598  "BTL cluster local X pull (wrt MtdSimLayerClusters, non-direct hits);X_{RECO}-X_{SIM}/sigmaX_[RECO]",
1599  100,
1600  -5.,
1601  5.);
1602 
1604  ibook.book1D("BtlCluZPull_simLC_fromIndirectHits",
1605  "BTL cluster Z pull (wrt MtdSimLayerClusters, non-direct hits);Z_{RECO}-Z_{SIM}/sigmaZ_[RECO]",
1606  100,
1607  -5.,
1608  5.);
1609  if (optionalPlots_) {
1611  ibook.book2D("BtlCluYXLocalSim_simLC_fromIndirectHits",
1612  "BTL cluster local Y vs X (MtdSimLayerClusters);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
1613  200,
1614  -9.5,
1615  9.5,
1616  200,
1617  -2.8,
1618  2.8);
1619  }
1620 
1621  // --- UncalibratedRecHits histograms
1622 
1623  if (optionalPlots_) {
1624  meUncEneLVsX_ = ibook.bookProfile("BTLUncEneLVsX",
1625  "BTL uncalibrated hit amplitude left - average vs X;X [cm];Delta(Q_{left}) [pC]",
1626  20,
1627  -5.,
1628  5.,
1629  -640.,
1630  640.,
1631  "S");
1632  meUncEneRVsX_ =
1633  ibook.bookProfile("BTLUncEneRVsX",
1634  "BTL uncalibrated hit amplitude right - average vs X;X [cm];Delta(Q_{right}) [pC]",
1635  20,
1636  -5.,
1637  5.,
1638  -640.,
1639  640.,
1640  "S");
1641 
1642  meUncTimeLVsX_ = ibook.bookProfile("BTLUncTimeLVsX",
1643  "BTL uncalibrated hit time left - average vs X;X [cm];Delta(T_{left}) [MeV]",
1644  20,
1645  -5.,
1646  5.,
1647  -25.,
1648  25.,
1649  "S");
1650  meUncTimeRVsX_ = ibook.bookProfile("BTLUncTimeRVsX",
1651  "BTL uncalibrated hit time right - average vs X;X [cm];Delta(T_{right}) [MeV]",
1652  20,
1653  -5.,
1654  5.,
1655  -25.,
1656  25.,
1657  "S");
1658  if (uncalibRecHitsPlots_) {
1659  for (unsigned int ihistoQ = 0; ihistoQ < nBinsQ_; ++ihistoQ) {
1660  std::string hname = Form("TimeResQ_%d", ihistoQ);
1661  std::string htitle = Form("BTL time resolution (Q bin = %d);T_{RECO} - T_{SIM} [ns]", ihistoQ);
1662  meTimeResQ_[ihistoQ] = ibook.book1D(hname, htitle, 200, -0.3, 0.7);
1663 
1664  for (unsigned int ihistoEta = 0; ihistoEta < nBinsQEta_; ++ihistoEta) {
1665  hname = Form("TimeResQvsEta_%d_%d", ihistoQ, ihistoEta);
1666  htitle =
1667  Form("BTL time resolution (Q bin = %d, |#eta| bin = %d);T_{RECO} - T_{SIM} [ns]", ihistoQ, ihistoEta);
1668  meTimeResQvsEta_[ihistoQ][ihistoEta] = ibook.book1D(hname, htitle, 200, -0.3, 0.7);
1669 
1670  } // ihistoEta loop
1671 
1672  } // ihistoQ loop
1673 
1674  for (unsigned int ihistoEta = 0; ihistoEta < nBinsEta_; ++ihistoEta) {
1675  std::string hname = Form("TimeResEta_%d", ihistoEta);
1676  std::string htitle = Form("BTL time resolution (|#eta| bin = %d);T_{RECO} - T_{SIM} [ns]", ihistoEta);
1677  meTimeResEta_[ihistoEta] = ibook.book1D(hname, htitle, 200, -0.3, 0.7);
1678 
1679  for (unsigned int ihistoQ = 0; ihistoQ < nBinsEtaQ_; ++ihistoQ) {
1680  hname = Form("TimeResEtavsQ_%d_%d", ihistoEta, ihistoQ);
1681  htitle =
1682  Form("BTL time resolution (|#eta| bin = %d, Q bin = %d);T_{RECO} - T_{SIM} [ns]", ihistoEta, ihistoQ);
1683  meTimeResEtavsQ_[ihistoEta][ihistoQ] = ibook.book1D(hname, htitle, 200, -0.3, 0.7);
1684 
1685  } // ihistoQ loop
1686 
1687  } // ihistoEta loop
1688  }
1689  }
1690 }
1691 
1692 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
1695 
1696  desc.add<std::string>("folder", "MTD/BTL/LocalReco");
1697  desc.add<edm::InputTag>("recHitsTag", edm::InputTag("mtdRecHits", "FTLBarrel"));
1698  desc.add<edm::InputTag>("uncalibRecHitsTag", edm::InputTag("mtdUncalibratedRecHits", "FTLBarrel"));
1699  desc.add<edm::InputTag>("simHitsTag", edm::InputTag("mix", "g4SimHitsFastTimerHitsBarrel"));
1700  desc.add<edm::InputTag>("recCluTag", edm::InputTag("mtdClusters", "FTLBarrel"));
1701  desc.add<edm::InputTag>("trkHitTag", edm::InputTag("mtdTrackingRecHits"));
1702  desc.add<edm::InputTag>("r2sAssociationMapTag", edm::InputTag("mtdRecoClusterToSimLayerClusterAssociation"));
1703  desc.add<double>("HitMinimumEnergy", 1.); // [MeV]
1704  desc.add<bool>("optionalPlots", false);
1705  desc.add<bool>("UncalibRecHitsPlots", false);
1706  desc.add<double>("HitMinimumAmplitude", 30.); // [pC]
1707 
1708  descriptions.add("btlLocalRecoValid", desc);
1709 }
1710 
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_
#define LogTrace(id)
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)