149 return clu1.
id() == clu2.
id() && clu1.
size() == clu2.
size() && clu1.
x() == clu2.
x() && clu1.
y() == clu2.
y() &&
156 hitMinEnergy1Dis_(iConfig.getParameter<double>(
"hitMinimumEnergy1Dis")),
157 hitMinEnergy2Dis_(iConfig.getParameter<double>(
"hitMinimumEnergy2Dis")),
158 optionalPlots_(iConfig.getParameter<
bool>(
"optionalPlots")),
159 uncalibRecHitsPlots_(iConfig.getParameter<
bool>(
"UncalibRecHitsPlots")),
160 hitMinAmplitude_(iConfig.getParameter<double>(
"HitMinimumAmplitude")),
185 const MTDTopology* topology = topologyHandle.product();
189 bool topo1Dis =
false;
190 bool topo2Dis =
false;
204 for (
const auto&
hits : *mtdTrkHitHandle) {
205 if (
MTDDetId(
hits.id()).mtdSubDetector() == MTDDetId::MTDType::ETL) {
206 LogDebug(
"EtlLocalRecoValidation") <<
"MTD cluster DetId " <<
hits.id() <<
" # cluster " <<
hits.size();
209 <<
"MTD_TRH: " <<
hit.localPosition().
x() <<
"," <<
hit.localPosition().
y() <<
" : " 210 <<
hit.localPositionError().xx() <<
"," <<
hit.localPositionError().yy() <<
" : " <<
hit.time() <<
" : " 218 std::unordered_map<uint32_t, MTDHit> m_etlSimHits[4];
219 for (
auto const&
simHit : etlSimHits) {
228 if ((
id.
zside() == -1) && (
id.nDisc() == 1))
230 else if ((
id.
zside() == -1) && (
id.nDisc() == 2))
232 else if ((
id.
zside() == 1) && (
id.nDisc() == 1))
234 else if ((
id.
zside() == 1) && (
id.nDisc() == 2))
239 auto simHitIt = m_etlSimHits[idet].emplace(
id.
rawId(),
MTDHit()).first;
245 if ((simHitIt->second).time == 0 ||
simHit.tof() < (simHitIt->second).
time) {
248 auto hit_pos =
simHit.localPosition();
249 (simHitIt->second).
x = hit_pos.x();
250 (simHitIt->second).
y = hit_pos.y();
251 (simHitIt->second).
z = hit_pos.z();
257 unsigned int n_reco_etl[4] = {0, 0, 0, 0};
258 for (
const auto&
recHit : *etlRecHitsHandle) {
263 if (thedet ==
nullptr)
264 throw cms::Exception(
"EtlLocalRecoValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 265 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
270 const auto& global_point = thedet->
toGlobal(local_point);
275 if (
detId.zside() == -1) {
277 }
else if (
detId.zside() == 1) {
285 if (
detId.discSide() == 1) {
288 if ((
detId.zside() == -1) && (
detId.nDisc() == 1)) {
290 }
else if ((
detId.zside() == -1) && (
detId.nDisc() == 2)) {
292 }
else if ((
detId.zside() == 1) && (
detId.nDisc() == 1)) {
294 }
else if ((
detId.zside() == 1) && (
detId.nDisc() == 2)) {
307 if ((idet == 0) || (idet == 1)) {
311 if ((idet == 2) || (idet == 3)) {
318 if ((idet == 0) || (idet == 1)) {
321 if ((idet == 2) || (idet == 3)) {
337 if (m_etlSimHits[idet].
count(
detId.rawId()) == 1) {
340 float time_res =
recHit.time() - m_etlSimHits[idet][
detId.rawId()].time;
341 float energy_res =
recHit.energy() - m_etlSimHits[idet][
detId.rawId()].energy;
360 for (
int i = 0;
i < 4;
i++) {
366 for (
const auto& DetSetClu : *etlRecCluHandle) {
367 for (
const auto& cluster : DetSetClu) {
378 DetId detIdObject(cluId);
379 const auto& genericDet =
geom->idToDetUnit(detIdObject);
380 if (genericDet ==
nullptr) {
382 <<
"GeographicalID: " << std::hex << cluId <<
" is invalid!" <<
std::dec << std::endl;
389 const auto& global_point = genericDet->toGlobal(local_point);
394 if (cluId.
zside() == -1) {
396 }
else if (cluId.
zside() == 1) {
407 if ((cluId.
zside() == -1) && (cluId.
nDisc() == 1)) {
409 }
else if ((cluId.
zside() == -1) && (cluId.
nDisc() == 2)) {
411 }
else if ((cluId.
zside() == 1) && (cluId.
nDisc() == 1)) {
413 }
else if ((cluId.
zside() == 1) && (cluId.
nDisc() == 2)) {
433 double cluEneSIM = 0.;
434 double cluTimeSIM = 0.;
435 double cluLocXSIM = 0.;
436 double cluLocYSIM = 0.;
437 double cluLocZSIM = 0.;
439 for (
int ihit = 0; ihit < cluster.size(); ++ihit) {
440 int hit_row = cluster.minHitRow() + cluster.hitOffset()[ihit * 2];
441 int hit_col = cluster.minHitCol() + cluster.hitOffset()[ihit * 2 + 1];
444 for (
const auto&
recHit : *etlRecHitsHandle) {
447 if (m_etlSimHits[idet].
count(hitId.rawId()) == 0)
451 if (hitId.zside() != cluId.
zside() || hitId.mtdRR() != cluId.
mtdRR() || hitId.module() != cluId.
module() ||
456 if (
recHit.energy() != cluster.hitENERGY()[ihit] ||
recHit.time() != cluster.hitTIME()[ihit])
465 cluLocXSIM += local_point_sim.
x() * m_etlSimHits[idet][
recHit.id().rawId()].energy;
466 cluLocYSIM += local_point_sim.
y() * m_etlSimHits[idet][
recHit.id().rawId()].energy;
467 cluLocZSIM += local_point_sim.
z() * m_etlSimHits[idet][
recHit.id().rawId()].energy;
470 cluEneSIM += m_etlSimHits[idet][
recHit.id().rawId()].energy;
471 cluTimeSIM += m_etlSimHits[idet][
recHit.id().rawId()].time * m_etlSimHits[idet][
recHit.id().rawId()].energy;
481 bool matchClu =
false;
482 const auto& trkHits = (*mtdTrkHitHandle)[detIdObject];
483 for (
const auto& trkHit : trkHits) {
485 comp = trkHit.clone();
492 <<
"No valid TrackingRecHit corresponding to cluster, detId = " << detIdObject.
rawId();
496 int iside = (cluId.
zside() == -1 ? 0 : 1);
497 if (cluTimeSIM > 0. && cluEneSIM > 0.) {
498 cluTimeSIM /= cluEneSIM;
500 Local3DPoint cluLocalPosSIM(cluLocXSIM / cluEneSIM, cluLocYSIM / cluEneSIM, cluLocZSIM / cluEneSIM);
501 const auto& cluGlobalPosSIM = genericDet->toGlobal(cluLocalPosSIM);
503 float time_res = cluster.time() - cluTimeSIM;
504 float energy_res = cluster.energy() - cluEneSIM;
505 float x_res = global_point.x() - cluGlobalPosSIM.x();
506 float y_res = global_point.y() - cluGlobalPosSIM.y();
507 float z_res = global_point.z() - cluGlobalPosSIM.z();
518 if (matchClu &&
comp !=
nullptr) {
542 for (
const auto& uRecHit : *etlUncalibRecHitsHandle) {
548 if (m_etlSimHits[idet].
count(
detId.rawId()) != 1)
553 if (thedet ==
nullptr)
554 throw cms::Exception(
"EtlLocalRecoValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 555 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
561 const auto& global_point = thedet->
toGlobal(local_point);
568 float time_res = uRecHit.time().first - m_etlSimHits[idet][
detId.rawId()].time;
570 int iside = (
detId.zside() == -1 ? 0 : 1);
603 "Number of ETL RECO hits (-Z, Single(topo1D)/First(topo2D) disk);log_10(N_{RECO})",
608 ibook.
book1D(
"EtlNhitsZnegD2",
"Number of ETL RECO hits (-Z, Second disk);log_10(N_{RECO})", 100, 0., 5.25);
610 "Number of ETL RECO hits (+Z, Single(topo1D)/First(topo2D) disk);log_10(N_{RECO})",
615 ibook.
book1D(
"EtlNhitsZposD2",
"Number of ETL RECO hits (+Z, Second disk);log_10(N_{RECO})", 100, 0., 5.25);
617 "EtlHitEnergyZnegD1",
"ETL RECO hits energy (-Z, Single(topo1D)/First(topo2D) disk);E_{RECO} [MeV]", 40, 0., 1.);
619 ibook.
book1D(
"EtlHitEnergyZnegD2",
"ETL RECO hits energy (-Z, Second disk);E_{RECO} [MeV]", 40, 0., 1.);
621 "EtlHitEnergyZposD1",
"ETL RECO hits energy (+Z, Single(topo1D)/First(topo2D) disk);E_{RECO} [MeV]", 40, 0., 1.);
623 ibook.
book1D(
"EtlHitEnergyZposD2",
"ETL RECO hits energy (+Z, Second disk);E_{RECO} [MeV]", 40, 0., 1.);
625 "EtlHitTimeZnegD1",
"ETL RECO hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{RECO} [ns]", 100, 0., 25.);
626 meHitTime_[1] = ibook.
book1D(
"EtlHitTimeZnegD2",
"ETL RECO hits ToA (-Z, Second disk);ToA_{RECO} [ns]", 100, 0., 25.);
628 "EtlHitTimeZposD1",
"ETL RECO hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{RECO} [ns]", 100, 0., 25.);
629 meHitTime_[3] = ibook.
book1D(
"EtlHitTimeZposD2",
"ETL RECO hits ToA (+Z, Second disk);ToA_{RECO} [ns]", 100, 0., 25.);
631 ibook.
book1D(
"EtlHitTimeErrorZnegD1",
632 "ETL RECO hits ToA error (-Z, Single(topo1D)/First(topo2D) disk);#sigma^{ToA}_{RECO} [ns]",
637 "EtlHitTimeErrorZnegD2",
"ETL RECO hits ToA error(-Z, Second disk);#sigma^{ToA}_{RECO} [ns]", 50, 0., 0.1);
639 ibook.
book1D(
"EtlHitTimeErrorZposD1",
640 "ETL RECO hits ToA error (+Z, Single(topo1D)/First(topo2D) disk);#sigma^{ToA}_{RECO} [ns]",
645 "EtlHitTimeErrorZposD2",
"ETL RECO hits ToA error(+Z, Second disk);#sigma^{ToA}_{RECO} [ns]", 50, 0., 0.1);
649 ibook.
book2D(
"EtlOccupancyZnegD1",
650 "ETL RECO hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{RECO} [cm];Y_{RECO} [cm]",
658 "ETL RECO hits occupancy (-Z, Second disk);X_{RECO} [cm];Y_{RECO} [cm]",
666 ibook.
book2D(
"EtlOccupancyZposD1",
667 "ETL RECO hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{RECO} [cm];Y_{RECO} [cm]",
675 "ETL RECO hits occupancy (+Z, Second disk);X_{RECO} [cm];Y_{RECO} [cm]",
683 "ETL RECO hits local occupancy (-Z);X_{RECO} [cm];Y_{RECO} [cm]",
691 "ETL RECO hits local occupancy (+Z);X_{RECO} [cm];Y_{RECO} [cm]",
699 meHitXlocal_[0] = ibook.
book1D(
"EtlHitXlocalZneg",
"ETL RECO local X (-Z);X_{RECO}^{LOC} [cm]", 100, -2.2, 2.2);
700 meHitXlocal_[1] = ibook.
book1D(
"EtlHitXlocalZpos",
"ETL RECO local X (+Z);X_{RECO}^{LOC} [cm]", 100, -2.2, 2.2);
701 meHitYlocal_[0] = ibook.
book1D(
"EtlHitYlocalZneg",
"ETL RECO local Y (-Z);Y_{RECO}^{LOC} [cm]", 50, -1.1, 1.1);
702 meHitYlocal_[1] = ibook.
book1D(
"EtlHitYlocalZpos",
"ETL RECO local Y (-Z);Y_{RECO}^{LOC} [cm]", 50, -1.1, 1.1);
704 "EtlHitXZnegD1",
"ETL RECO hits X (-Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]", 100, -130., 130.);
705 meHitX_[1] = ibook.
book1D(
"EtlHitXZnegD2",
"ETL RECO hits X (-Z, Second Disk);X_{RECO} [cm]", 100, -130., 130.);
707 "EtlHitXZposD1",
"ETL RECO hits X (+Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]", 100, -130., 130.);
708 meHitX_[3] = ibook.
book1D(
"EtlHitXZposD2",
"ETL RECO hits X (+Z, Second Disk);X_{RECO} [cm]", 100, -130., 130.);
710 "EtlHitYZnegD1",
"ETL RECO hits Y (-Z, Single(topo1D)/First(topo2D) Disk);Y_{RECO} [cm]", 100, -130., 130.);
711 meHitY_[1] = ibook.
book1D(
"EtlHitYZnegD2",
"ETL RECO hits Y (-Z, Second Disk);Y_{RECO} [cm]", 100, -130., 130.);
713 "EtlHitYZposD1",
"ETL RECO hits Y (+Z, Single(topo1D)/First(topo2D) Disk);Y_{RECO} [cm]", 100, -130., 130.);
714 meHitY_[3] = ibook.
book1D(
"EtlHitYZposD2",
"ETL RECO hits Y (+Z, Second Disk);Y_{RECO} [cm]", 100, -130., 130.);
716 "EtlHitZZnegD1",
"ETL RECO hits Z (-Z, Single(topo1D)/First(topo2D) Disk);Z_{RECO} [cm]", 100, -302., -298.);
717 meHitZ_[1] = ibook.
book1D(
"EtlHitZZnegD2",
"ETL RECO hits Z (-Z, Second Disk);Z_{RECO} [cm]", 100, -304., -300.);
719 "EtlHitZZposD1",
"ETL RECO hits Z (+Z, Single(topo1D)/First(topo2D) Disk);Z_{RECO} [cm]", 100, 298., 302.);
720 meHitZ_[3] = ibook.
book1D(
"EtlHitZZposD2",
"ETL RECO hits Z (+Z, Second Disk);Z_{RECO} [cm]", 100, 300., 304.);
722 "EtlHitPhiZnegD1",
"ETL RECO hits #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
724 ibook.
book1D(
"EtlHitPhiZnegD2",
"ETL RECO hits #phi (-Z, Second Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
726 "EtlHitPhiZposD1",
"ETL RECO hits #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
728 ibook.
book1D(
"EtlHitPhiZposD2",
"ETL RECO hits #phi (+Z, Second Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
730 "EtlHitEtaZnegD1",
"ETL RECO hits #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, -3.2, -1.56);
731 meHitEta_[1] = ibook.
book1D(
"EtlHitEtaZnegD2",
"ETL RECO hits #eta (-Z, Second Disk);#eta_{RECO}", 100, -3.2, -1.56);
733 "EtlHitEtaZposD1",
"ETL RECO hits #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, 1.56, 3.2);
734 meHitEta_[3] = ibook.
book1D(
"EtlHitEtaZposD2",
"ETL RECO hits #eta (+Z, Second Disk);#eta_{RECO}", 100, 1.56, 3.2);
735 meTimeRes_ = ibook.
book1D(
"EtlTimeRes",
"ETL time resolution;T_{RECO}-T_{SIM}", 100, -0.5, 0.5);
736 meEnergyRes_ = ibook.
book1D(
"EtlEnergyRes",
"ETL energy resolution;E_{RECO}-E_{SIM}", 100, -0.5, 0.5);
739 "ETL RECO time vs energy (-Z, Single(topo1D)/First(topo2D) Disk);E_{RECO} [MeV];ToA_{RECO} [ns]",
746 "ETL RECO time vs energy (-Z, Second Disk);E_{RECO} [MeV];ToA_{RECO} [ns]",
754 "ETL RECO time vs energy (+Z, Single(topo1D)/First(topo2D) Disk);E_{RECO} [MeV];ToA_{RECO} [ns]",
761 "ETL RECO time vs energy (+Z, Second Disk);E_{RECO} [MeV];ToA_{RECO} [ns]",
768 "EtlHitEvsPhiZnegD1",
769 "ETL RECO energy vs #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];E_{RECO} [MeV]",
776 "ETL RECO energy vs #phi (-Z, Second Disk);#phi_{RECO} [rad];E_{RECO} [MeV]",
783 "EtlHitEvsPhiZposD1",
784 "ETL RECO energy vs #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];E_{RECO} [MeV]",
791 "ETL RECO energy vs #phi (+Z, Second Disk);#phi_{RECO} [rad];E_{RECO} [MeV]",
799 "ETL RECO energy vs #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};E_{RECO} [MeV]",
806 "ETL RECO energy vs #eta (-Z, Second Disk);#eta_{RECO};E_{RECO} [MeV]",
814 "ETL RECO energy vs #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};E_{RECO} [MeV]",
821 "ETL RECO energy vs #eta (+Z, Second Disk);#eta_{RECO};E_{RECO} [MeV]",
828 "EtlHitTvsPhiZnegD1",
829 "ETL RECO time vs #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
836 "ETL RECO time vs #phi (-Z, Second Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
843 "EtlHitTvsPhiZposD1",
844 "ETL RECO time vs #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
851 "ETL RECO time vs #phi (+Z, Second Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
859 "ETL RECO time vs #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};ToA_{RECO} [ns]",
866 "ETL RECO time vs #eta (-Z, Second Disk);#eta_{RECO};ToA_{RECO} [ns]",
874 "ETL RECO time vs #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};ToA_{RECO} [ns]",
881 "ETL RECO time vs #eta (+Z, Second Disk);#eta_{RECO};ToA_{RECO} [ns]",
888 "EtlTPullvsE",
"ETL time pull vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}", 20, 0., 2., -5., 5.,
"S");
890 "ETL time pull vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
898 ibook.
book1D(
"EtlCluTimeZnegD1",
"ETL cluster ToA (-Z, Single(topo1D)/First(topo2D) Disk);ToA [ns]", 250, 0, 25);
899 meCluTime_[1] = ibook.
book1D(
"EtlCluTimeZnegD2",
"ETL cluster ToA (-Z, Second Disk);ToA [ns]", 250, 0, 25);
901 ibook.
book1D(
"EtlCluTimeZposD1",
"ETL cluster ToA (+Z, Single(topo1D)/First(topo2D) Disk);ToA [ns]", 250, 0, 25);
902 meCluTime_[3] = ibook.
book1D(
"EtlCluTimeZposD2",
"ETL cluster ToA (+Z, Second Disk);ToA [ns]", 250, 0, 25);
904 "ETL cluster time error (-Z, Single(topo1D)/First(topo2D) Disk);#sigma_{t} [ns]",
909 ibook.
book1D(
"EtlCluTimeErrorZnegD2",
"ETL cluster time error (-Z, Second Disk);#sigma_{t} [ns]", 100, 0, 0.1);
911 "ETL cluster time error (+Z, Single(topo1D)/First(topo2D) Disk);#sigma_{t} [ns]",
916 ibook.
book1D(
"EtlCluTimeErrorZposD2",
"ETL cluster time error (+Z, Second Disk);#sigma_{t} [ns]", 100, 0, 0.1);
918 "EtlCluEnergyZnegD1",
"ETL cluster energy (-Z, Single(topo1D)/First(topo2D) Disk);E_{RECO} [MeV]", 40, 0, 2);
919 meCluEnergy_[1] = ibook.
book1D(
"EtlCluEnergyZnegD2",
"ETL cluster energy (-Z, Second Disk);E_{RECO} [MeV]", 40, 0, 2);
921 "EtlCluEnergyZposD1",
"ETL cluster energy (+Z, Single(topo1D)/First(topo2D) Disk);E_{RECO} [MeV]", 40, 0, 2);
922 meCluEnergy_[3] = ibook.
book1D(
"EtlCluEnergyZposD2",
"ETL cluster energy (+Z, Second Disk);E_{RECO} [MeV]", 40, 0, 2);
924 "EtlCluPhiZnegD1",
"ETL cluster #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
926 ibook.
book1D(
"EtlCluPhiZnegD2",
"ETL cluster #phi (-Z, Second Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
928 "EtlCluPhiZposD1",
"ETL cluster #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
930 ibook.
book1D(
"EtlCluPhiZposD2",
"ETL cluster #phi (+Z, Second Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
932 "EtlCluEtaZnegD1",
"ETL cluster #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, -3.2, -1.4);
933 meCluEta_[1] = ibook.
book1D(
"EtlCluEtaZnegD2",
"ETL cluster #eta (-Z, Second Disk);#eta_{RECO}", 100, -3.2, -1.4);
935 "EtlCluEtaZposD1",
"ETL cluster #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, 1.4, 3.2);
936 meCluEta_[3] = ibook.
book1D(
"EtlCluEtaZposD2",
"ETL cluster #eta (+Z, Second Disk);#eta_{RECO}", 100, 1.4, 3.2);
938 "EtlCluHitNumberZnegD1",
"ETL hits per cluster (-Z, Single(topo1D)/First(topo2D) Disk);Cluster size", 5, 0, 5);
939 meCluHits_[1] = ibook.
book1D(
"EtlCluHitNumberZnegD2",
"ETL hits per cluster (-Z, Second Disk);Cluster size", 5, 0, 5);
941 "EtlCluHitNumberZposD1",
"ETL hits per cluster (+Z, Single(topo1D)/First(topo2D) Disk);Cluster size", 5, 0, 5);
942 meCluHits_[3] = ibook.
book1D(
"EtlCluHitNumberZposD2",
"ETL hits per cluster (+Z, Second Disk);Cluster size", 5, 0, 5);
945 ibook.
book1D(
"EtlCluTimeResZneg",
"ETL cluster time resolution (-Z);T_{RECO}-T_{SIM} [ns]", 100, -0.5, 0.5);
947 ibook.
book1D(
"EtlCluTimeResZpos",
"ETL cluster time resolution (+Z);T_{RECO}-T_{SIM} [MeV]", 100, -0.5, 0.5);
949 ibook.
book1D(
"EtlCluEnergyResZneg",
"ETL cluster energy resolution (-Z);E_{RECO}-E_{SIM}", 100, -0.5, 0.5);
951 ibook.
book1D(
"EtlCluEnergyResZpos",
"ETL cluster energy resolution (+Z);E_{RECO}-E_{SIM}", 100, -0.5, 0.5);
955 "ETL cluster time pull vs E (-Z);E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
964 "ETL cluster time pull vs E (+Z);E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
973 "ETL cluster time pull vs #eta (-Z);|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
982 "ETL cluster time pull vs #eta (+Z);|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
989 meCluXRes_[0] = ibook.
book1D(
"EtlCluXResZneg",
"ETL cluster X resolution (-Z);X_{RECO}-X_{SIM} [cm]", 100, -0.1, 0.1);
990 meCluXRes_[1] = ibook.
book1D(
"EtlCluXResZpos",
"ETL cluster X resolution (+Z);X_{RECO}-X_{SIM} [cm]", 100, -0.1, 0.1);
991 meCluYRes_[0] = ibook.
book1D(
"EtlCluYResZneg",
"ETL cluster Y resolution (-Z);Y_{RECO}-Y_{SIM} [cm]", 100, -0.1, 0.1);
992 meCluYRes_[1] = ibook.
book1D(
"EtlCluYResZpos",
"ETL cluster Y resolution (+Z);Y_{RECO}-Y_{SIM} [cm]", 100, -0.1, 0.1);
994 ibook.
book1D(
"EtlCluZResZneg",
"ETL cluster Z resolution (-Z);Z_{RECO}-Z_{SIM} [cm]", 100, -0.003, 0.003);
996 ibook.
book1D(
"EtlCluZResZpos",
"ETL cluster Z resolution (+Z);Z_{RECO}-Z_{SIM} [cm]", 100, -0.003, 0.003);
998 ibook.
book1D(
"EtlCluXPullZneg",
"ETL cluster X pull (-Z);X_{RECO}-X_{SIM}/sigmaX_[RECO] [cm]", 100, -5., 5.);
1000 ibook.
book1D(
"EtlCluXPullZpos",
"ETL cluster X pull (+Z);X_{RECO}-X_{SIM}/sigmaX_[RECO] [cm]", 100, -5., 5.);
1002 ibook.
book1D(
"EtlCluYPullZneg",
"ETL cluster Y pull (-Z);Y_{RECO}-Y_{SIM}/sigmaY_[RECO] [cm]", 100, -5., 5.);
1004 ibook.
book1D(
"EtlCluYPullZpos",
"ETL cluster Y pull (+Z);Y_{RECO}-Y_{SIM}/sigmaY_[RECO] [cm]", 100, -5., 5.);
1006 ibook.
book1D(
"EtlCluXLocalErrNeg",
"ETL cluster X local error (-Z);sigmaX_{RECO,loc} [cm]", 50, 0., 0.2);
1008 ibook.
book1D(
"EtlCluXLocalErrPos",
"ETL cluster X local error (+Z);sigmaX_{RECO,loc} [cm]", 50, 0., 0.2);
1010 ibook.
book1D(
"EtlCluYLocalErrNeg",
"ETL cluster Y local error (-Z);sigmaY_{RECO,loc} [cm]", 50., 0., 0.2);
1012 ibook.
book1D(
"EtlCluYLocalErrPos",
"ETL cluster Y local error (+Z);sigmaY_{RECO,loc} [cm]", 50, 0., 0.2);
1015 ibook.
book2D(
"EtlCluOccupancyZnegD1",
1016 "ETL cluster X vs Y (-Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
1024 "ETL cluster X vs Y (-Z, Second Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
1032 ibook.
book2D(
"EtlCluOccupancyZposD1",
1033 "ETL cluster X vs Y (+Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
1041 "ETL cluster X vs Y (+Z, Second Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
1049 "ETL cluster local Y vs X (-Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
1057 "ETL cluster local Y vs X (+Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
1065 "ETL cluster local Y vs X (-Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
1073 "ETL cluster local Y vs X (+Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
1082 "EtlUnmatchedCluEnergyNeg",
"ETL unmatched cluster log10(energy) (-Z);log10(E_{RECO} [MeV])", 5, -3, 2);
1084 "EtlUnmatchedCluEnergyPos",
"ETL unmatched cluster log10(energy) (+Z);log10(E_{RECO} [MeV])", 5, -3, 2);
1090 for (
unsigned int iside = 0; iside < 2; ++iside) {
1091 for (
unsigned int ihistoQ = 0; ihistoQ <
nBinsQ_; ++ihistoQ) {
1092 std::string hname = Form(
"TimeResQ_%d_%d", iside, ihistoQ);
1094 Form(
"%s time resolution (Q bin = %d);T_{RECO} - T_{SIM} [ns]", det_name[iside].
data(), ihistoQ);
1099 for (
unsigned int ihistoEta = 0; ihistoEta <
nBinsEta_; ++ihistoEta) {
1100 std::string hname = Form(
"TimeResEta_%d_%d", iside, ihistoEta);
1102 Form(
"%s time resolution (|#eta| bin = %d);T_{RECO} - T_{SIM} [ns]", det_name[iside].
data(), ihistoEta);
1120 desc.add<
double>(
"hitMinimumEnergy1Dis", 1.);
1121 desc.add<
double>(
"hitMinimumEnergy2Dis", 0.001);
1122 desc.add<
bool>(
"optionalPlots",
false);
1123 desc.add<
bool>(
"UncalibRecHitsPlots",
false);
1124 desc.add<
double>(
"HitMinimumAmplitude", 0.33);
1126 descriptions.
add(
"etlLocalRecoValid",
desc);
MonitorElement * meHitZ_[4]
MonitorElement * meHitX_[4]
int getMTDTopologyMode() const
T getParameter(std::string const &) const
MonitorElement * meCluEta_[4]
edm::EDGetTokenT< FTLUncalibratedRecHitCollection > etlUncalibRecHitsToken_
edm::EDGetTokenT< CrossingFrame< PSimHit > > etlSimHitsToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
MonitorElement * meCluXRes_[2]
bool isSameCluster(const FTLCluster &, const FTLCluster &)
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * meHitTime_[4]
const edm::ESGetToken< MTDClusterParameterEstimator, MTDCPERecord > cpeToken_
virtual const Topology & topology() const
MonitorElement * meOccupancy_[4]
MonitorElement * meCluYLocalErr_[2]
MonitorElement * meCluTPullvsEta_[2]
virtual const PixelTopology & specificTopology() const
MonitorElement * meCluTimeError_[4]
static constexpr float etaMin_
MonitorElement * meCluOccupancy_[4]
MonitorElement * meCluTime_[4]
MonitorElement * meNhits_[4]
MonitorElement * meUnmatchedCluEnergy_[2]
MonitorElement * meTimeResEta_[2][nBinsEta_]
MonitorElement * meHitTvsE_[4]
MonitorElement * meCluEnergy_[4]
const float hitMinEnergy2Dis_
~EtlLocalRecoValidation() override
Detector identifier base class for the MIP Timing Layer.
constexpr NumType convertUnitsTo(double desiredUnits, NumType val)
MonitorElement * meTPullvsEta_
EtlLocalRecoValidation(const edm::ParameterSet &)
MonitorElement * meHitEvsEta_[4]
MonitorElement * meHitTvsEta_[4]
MonitorElement * meCluTimeRes_[2]
MonitorElement * meCluHits_[4]
const bool optionalPlots_
MonitorElement * meHitPhi_[4]
float localX(const float mpX) const override
edm::EDGetTokenT< FTLRecHitCollection > etlRecHitsToken_
MonitorElement * meHitEta_[4]
MonitorElement * meTPullvsE_
edm::EDGetTokenT< MTDTrackingDetSetVector > mtdTrackingHitToken_
const float hitMinEnergy1Dis_
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())
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meCluXPull_[2]
const edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
Abs< T >::type abs(const T &t)
MonitorElement * meHitTimeError_[4]
static constexpr int nBinsEta_
#define DEFINE_FWK_MODULE(type)
MonitorElement * meTimeRes_
const double hitMinAmplitude_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ETLDetId::EtlLayout etlLayoutFromTopoMode(const int &topoMode)
float localY(const float mpY) const override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
MonitorElement * meHitYlocal_[2]
MonitorElement * meTimeResQ_[2][nBinsQ_]
MonitorElement * meCluZRes_[2]
constexpr NumType convertMmToCm(NumType millimeters)
MonitorElement * meLocalOccupancy_[2]
const edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
MonitorElement * meCluYXLocal_[2]
MonitorElement * meHitY_[4]
constexpr uint32_t rawId() const
get the raw id
MonitorElement * meCluYXLocalSim_[2]
A 2D TrackerRecHit with time and time error information.
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static constexpr float binWidthEta_
Detector identifier class for the Endcap Timing Layer.
void analyze(const edm::Event &, const edm::EventSetup &) override
char data[epos_bytes_allocation]
edm::EDGetTokenT< FTLClusterCollection > etlRecCluToken_
MonitorElement * meHitTvsPhi_[4]
MonitorElement * meCluXLocalErr_[2]
MonitorElement * meHitEvsPhi_[4]
MonitorElement * meCluYPull_[2]
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
MonitorElement * meCluPhi_[4]
static constexpr float binWidthQ_
MonitorElement * meCluTPullvsE_[2]
MonitorElement * meHitEnergy_[4]
MonitorElement * meHitXlocal_[2]
Log< level::Warning, false > LogWarning
MonitorElement * meCluYRes_[2]
auto makeValid(const U &iOtherHandleType) noexcept(false)
const std::string folder_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType
static constexpr int nBinsQ_
const bool uncalibRecHitsPlots_
MonitorElement * meEnergyRes_
MonitorElement * meCluEnergyRes_[2]