Skip to content

Commit 482a96d

Browse files
committed
Made the booking and filling of local Y-X histograms optional and added check on REC0-SIM hits matching
1 parent 54adca0 commit 482a96d

File tree

2 files changed

+63
-53
lines changed

2 files changed

+63
-53
lines changed

Validation/MtdValidation/plugins/BtlLocalRecoValidation.cc

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,9 @@ void BtlLocalRecoValidation::analyze(const edm::Event& iEvent, const edm::EventS
341341
for (const auto& recHit : *btlRecHitsHandle) {
342342
BTLDetId hitId(recHit.id().rawId());
343343

344+
if (m_btlSimHits.count(hitId.rawId()) == 0)
345+
continue;
346+
344347
// Check the hit position
345348
if (hitId.mtdSide() != cluId.mtdSide() || hitId.mtdRR() != cluId.mtdRR() || recHit.row() != hit_row ||
346349
recHit.column() != hit_col)
@@ -396,14 +399,14 @@ void BtlLocalRecoValidation::analyze(const edm::Event& iEvent, const edm::EventS
396399
meCluXRes_->Fill(x_res);
397400
meCluYRes_->Fill(y_res);
398401
meCluZRes_->Fill(z_res);
402+
403+
meCluYXLocal_->Fill(local_point.x(), local_point.y());
404+
meCluYXLocalSim_->Fill(cluLocalPosSIM.x(), cluLocalPosSIM.y());
399405
}
400406

401407
meCluTPullvsEta_->Fill(std::abs(cluGlobalPosSIM.eta()), time_res / cluster.timeError());
402408
meCluTPullvsE_->Fill(cluEneSIM, time_res / cluster.timeError());
403409

404-
meCluYXLocal_->Fill(local_point.x(), local_point.y());
405-
meCluYXLocalSim_->Fill(cluLocalPosSIM.x(), cluLocalPosSIM.y());
406-
407410
} // if ( cluTimeSIM > 0. && cluEneSIM > 0. )
408411

409412
} // cluster loop
@@ -612,23 +615,23 @@ void BtlLocalRecoValidation::bookHistograms(DQMStore::IBooker& ibook,
612615
meCluXRes_ = ibook.book1D("BtlCluXRes", "BTL cluster X resolution;X_{RECO}-X_{SIM} [cm]", 100, -3.1, 3.1);
613616
meCluYRes_ = ibook.book1D("BtlCluYRes", "BTL cluster Y resolution;Y_{RECO}-Y_{SIM} [cm]", 100, -3.1, 3.1);
614617
meCluZRes_ = ibook.book1D("BtlCluZRes", "BTL cluster Z resolution;Z_{RECO}-Z_{SIM} [cm]", 100, -0.2, 0.2);
618+
meCluYXLocal_ = ibook.book2D("BtlCluYXLocal",
619+
"BTL cluster local Y vs X;X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
620+
200,
621+
-9.5,
622+
9.5,
623+
200,
624+
-2.8,
625+
2.8);
626+
meCluYXLocalSim_ = ibook.book2D("BtlCluYXLocalSim",
627+
"BTL cluster local Y vs X;X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
628+
200,
629+
-9.5,
630+
9.5,
631+
200,
632+
-2.8,
633+
2.8);
615634
}
616-
meCluYXLocal_ = ibook.book2D("BtlCluYXLocal",
617-
"BTL cluster local Y vs X;X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
618-
200,
619-
-9.5,
620-
9.5,
621-
200,
622-
-2.8,
623-
2.8);
624-
meCluYXLocalSim_ = ibook.book2D("BtlCluYXLocalSim",
625-
"BTL cluster local Y vs X;X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
626-
200,
627-
-9.5,
628-
9.5,
629-
200,
630-
-2.8,
631-
2.8);
632635

633636
// --- UncalibratedRecHits histograms
634637

Validation/MtdValidation/plugins/EtlLocalRecoValidation.cc

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ void EtlLocalRecoValidation::analyze(const edm::Event& iEvent, const edm::EventS
407407
for (const auto& recHit : *etlRecHitsHandle) {
408408
ETLDetId hitId(recHit.id().rawId());
409409

410+
if (m_etlSimHits[idet].count(hitId.rawId()) == 0)
411+
continue;
412+
410413
// Check the hit position
411414
if (hitId.zside() != cluId.zside() || hitId.mtdRR() != cluId.mtdRR() || hitId.module() != cluId.module() ||
412415
recHit.row() != hit_row || recHit.column() != hit_col)
@@ -458,8 +461,10 @@ void EtlLocalRecoValidation::analyze(const edm::Event& iEvent, const edm::EventS
458461
meCluTPullvsEta_[iside]->Fill(cluGlobalPosSIM.eta(), time_res / cluster.timeError());
459462
meCluTPullvsE_[iside]->Fill(cluEneSIM, time_res / cluster.timeError());
460463

461-
meCluYXLocal_[iside]->Fill(local_point.x(), local_point.y());
462-
meCluYXLocalSim_[iside]->Fill(cluLocalPosSIM.x(), cluLocalPosSIM.y());
464+
if (LocalPosDebug_) {
465+
meCluYXLocal_[iside]->Fill(local_point.x(), local_point.y());
466+
meCluYXLocalSim_[iside]->Fill(cluLocalPosSIM.x(), cluLocalPosSIM.y());
467+
}
463468

464469
} // if ( cluTimeSIM > 0. && cluEneSIM > 0. )
465470

@@ -956,38 +961,40 @@ void EtlLocalRecoValidation::bookHistograms(DQMStore::IBooker& ibook,
956961
ibook.book1D("EtlCluZResZneg", "ETL cluster Z resolution (-Z);Z_{RECO}-Z_{SIM} [cm]", 100, -0.003, 0.003);
957962
meCluZRes_[1] =
958963
ibook.book1D("EtlCluZResZpos", "ETL cluster Z resolution (+Z);Z_{RECO}-Z_{SIM} [cm]", 100, -0.003, 0.003);
959-
meCluYXLocal_[0] = ibook.book2D("EtlCluYXLocalZneg",
960-
"ETL cluster local Y vs X (-Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
961-
100,
962-
-2.2,
963-
2.2,
964-
100,
965-
-1.1,
966-
1.1);
967-
meCluYXLocal_[1] = ibook.book2D("EtlCluYXLocalZpos",
968-
"ETL cluster local Y vs X (+Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
969-
100,
970-
-2.2,
971-
2.2,
972-
100,
973-
-1.1,
974-
1.1);
975-
meCluYXLocalSim_[0] = ibook.book2D("EtlCluYXLocalSimZneg",
976-
"ETL cluster local Y vs X (-Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
977-
200,
978-
-2.2,
979-
2.2,
980-
200,
981-
-1.1,
982-
1.1);
983-
meCluYXLocalSim_[1] = ibook.book2D("EtlCluYXLocalSimZpos",
984-
"ETL cluster local Y vs X (+Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
985-
200,
986-
-2.2,
987-
2.2,
988-
200,
989-
-1.1,
990-
1.1);
964+
if (LocalPosDebug_) {
965+
meCluYXLocal_[0] = ibook.book2D("EtlCluYXLocalZneg",
966+
"ETL cluster local Y vs X (-Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
967+
100,
968+
-2.2,
969+
2.2,
970+
100,
971+
-1.1,
972+
1.1);
973+
meCluYXLocal_[1] = ibook.book2D("EtlCluYXLocalZpos",
974+
"ETL cluster local Y vs X (+Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
975+
100,
976+
-2.2,
977+
2.2,
978+
100,
979+
-1.1,
980+
1.1);
981+
meCluYXLocalSim_[0] = ibook.book2D("EtlCluYXLocalSimZneg",
982+
"ETL cluster local Y vs X (-Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
983+
200,
984+
-2.2,
985+
2.2,
986+
200,
987+
-1.1,
988+
1.1);
989+
meCluYXLocalSim_[1] = ibook.book2D("EtlCluYXLocalSimZpos",
990+
"ETL cluster local Y vs X (+Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
991+
200,
992+
-2.2,
993+
2.2,
994+
200,
995+
-1.1,
996+
1.1);
997+
}
991998

992999
// --- UncalibratedRecHits histograms
9931000

0 commit comments

Comments
 (0)