From 761f06adbf24b6df8cf03048f6a621ea1cae7819 Mon Sep 17 00:00:00 2001 From: Laurent Forthomme Date: Thu, 24 Oct 2019 11:29:21 +0200 Subject: [PATCH] Matching in Validation and CondFormats packages --- .../src/CTPPSRPAlignmentCorrectionsData.cc | 4 ++-- .../src/CTPPSRPAlignmentCorrectionsMethods.cc | 2 +- .../CTPPS/plugins/CTPPSAcceptancePlotter.cc | 2 +- .../plugins/CTPPSDirectProtonSimulation.cc | 2 +- .../CTPPSDirectProtonSimulationValidator.cc | 6 ++--- .../CTPPSProtonReconstructionPlotter.cc | 24 +++++++++---------- ...ProtonReconstructionSimulationValidator.cc | 2 +- .../CTPPSProtonReconstructionValidator.cc | 6 ++--- .../plugins/CTPPSTrackDistributionPlotter.cc | 10 ++++---- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/CondFormats/CTPPSReadoutObjects/src/CTPPSRPAlignmentCorrectionsData.cc b/CondFormats/CTPPSReadoutObjects/src/CTPPSRPAlignmentCorrectionsData.cc index 64eddbd66b091..55f46bcc69f35 100644 --- a/CondFormats/CTPPSReadoutObjects/src/CTPPSRPAlignmentCorrectionsData.cc +++ b/CondFormats/CTPPSReadoutObjects/src/CTPPSRPAlignmentCorrectionsData.cc @@ -50,7 +50,7 @@ CTPPSRPAlignmentCorrectionData CTPPSRPAlignmentCorrectionsData::getFullSensorCor CTPPSRPAlignmentCorrectionData align_corr; // try to get alignment correction of the full RP - auto rpIt = rps_.find(CTPPSDetId(id).getRPId()); + auto rpIt = rps_.find(CTPPSDetId(id).rpId()); if (rpIt != rps_.end()) align_corr = rpIt->second; @@ -132,4 +132,4 @@ std::ostream& operator<<(std::ostream& s, const CTPPSRPAlignmentCorrectionsData& return s; } -//---------------------------------------------------------------------------------------------------- \ No newline at end of file +//---------------------------------------------------------------------------------------------------- diff --git a/CondFormats/CTPPSReadoutObjects/src/CTPPSRPAlignmentCorrectionsMethods.cc b/CondFormats/CTPPSReadoutObjects/src/CTPPSRPAlignmentCorrectionsMethods.cc index 0086414318493..bc43bc66e399a 100644 --- a/CondFormats/CTPPSReadoutObjects/src/CTPPSRPAlignmentCorrectionsMethods.cc +++ b/CondFormats/CTPPSReadoutObjects/src/CTPPSRPAlignmentCorrectionsMethods.cc @@ -357,7 +357,7 @@ void CTPPSRPAlignmentCorrectionsMethods::writeXMLBlock(const CTPPSRPAlignmentCor for (auto it = sensors.begin(); it != sensors.end(); ++it) { CTPPSDetId sensorId(it->first); - unsigned int rpId = sensorId.getRPId(); + unsigned int rpId = sensorId.rpId(); unsigned int decRPId = sensorId.arm() * 100 + sensorId.station() * 10 + sensorId.rp(); // start a RP block diff --git a/Validation/CTPPS/plugins/CTPPSAcceptancePlotter.cc b/Validation/CTPPS/plugins/CTPPSAcceptancePlotter.cc index 25a06ad17fca6..5344c0d08d6ac 100644 --- a/Validation/CTPPS/plugins/CTPPSAcceptancePlotter.cc +++ b/Validation/CTPPS/plugins/CTPPSAcceptancePlotter.cc @@ -220,7 +220,7 @@ void CTPPSAcceptancePlotter::analyze(const edm::Event &iEvent, const edm::EventS // process tracks map trackPresent; for (const auto &trk : *hTracks) { - CTPPSDetId rpId(trk.getRPId()); + CTPPSDetId rpId(trk.rpId()); unsigned int rpDecId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp(); trackPresent[rpDecId] = true; } diff --git a/Validation/CTPPS/plugins/CTPPSDirectProtonSimulation.cc b/Validation/CTPPS/plugins/CTPPSDirectProtonSimulation.cc index 9f0339ac735e5..52fb79610ed8c 100644 --- a/Validation/CTPPS/plugins/CTPPSDirectProtonSimulation.cc +++ b/Validation/CTPPS/plugins/CTPPSDirectProtonSimulation.cc @@ -343,7 +343,7 @@ void CTPPSDirectProtonSimulation::processProton(const HepMC::GenVertex* in_vtx, continue; // loop over all sensors in the RP - for (const auto& detIdInt : geometry.getSensorsInRP(rpId)) { + for (const auto& detIdInt : geometry.sensorsInRP(rpId)) { CTPPSDetId detId(detIdInt); // determine the track impact point (in global coordinates) diff --git a/Validation/CTPPS/plugins/CTPPSDirectProtonSimulationValidator.cc b/Validation/CTPPS/plugins/CTPPSDirectProtonSimulationValidator.cc index b3dc6a8558067..d47b63b3b5c87 100644 --- a/Validation/CTPPS/plugins/CTPPSDirectProtonSimulationValidator.cc +++ b/Validation/CTPPS/plugins/CTPPSDirectProtonSimulationValidator.cc @@ -89,11 +89,11 @@ void CTPPSDirectProtonSimulationValidator::analyze(const edm::Event& iEvent, con // process tracks for (const auto& simuTrack : *simuTracks) { - const CTPPSDetId rpId(simuTrack.getRPId()); + const CTPPSDetId rpId(simuTrack.rpId()); for (const auto& recoTrack : *recoTracks) { - if (simuTrack.getRPId() == recoTrack.getRPId()) { + if (simuTrack.rpId() == recoTrack.rpId()) { unsigned int rpDecId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp(); - rpPlots_[rpDecId].fill(simuTrack.getX(), simuTrack.getY(), recoTrack.getX(), recoTrack.getY()); + rpPlots_[rpDecId].fill(simuTrack.x(), simuTrack.y(), recoTrack.x(), recoTrack.y()); } } } diff --git a/Validation/CTPPS/plugins/CTPPSProtonReconstructionPlotter.cc b/Validation/CTPPS/plugins/CTPPSProtonReconstructionPlotter.cc index f2f5e6861110c..7665193a8e58c 100644 --- a/Validation/CTPPS/plugins/CTPPSProtonReconstructionPlotter.cc +++ b/Validation/CTPPS/plugins/CTPPSProtonReconstructionPlotter.cc @@ -139,7 +139,7 @@ class CTPPSProtonReconstructionPlotter : public edm::one::EDAnalyzer<> { unsigned int n_tracking_RPs = 0, n_timing_RPs = 0; for (const auto &tr : p.contributingLocalTracks()) { - CTPPSDetId detId(tr->getRPId()); + CTPPSDetId detId(tr->rpId()); if (detId.subdetId() == CTPPSDetId::sdTrackingStrip || detId.subdetId() == CTPPSDetId::sdTrackingPixel) n_tracking_RPs++; if (detId.subdetId() == CTPPSDetId::sdTimingDiamond || detId.subdetId() == CTPPSDetId::sdTimingFastSilicon) @@ -376,7 +376,7 @@ void CTPPSProtonReconstructionPlotter::analyze(const edm::Event &event, const ed const CTPPSLocalTrackLite *tr_R_F = nullptr; for (const auto &tr : *hTracks) { - CTPPSDetId rpId(tr.getRPId()); + CTPPSDetId rpId(tr.rpId()); unsigned int decRPId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp(); if (decRPId == rpId_45_N_) @@ -390,25 +390,25 @@ void CTPPSProtonReconstructionPlotter::analyze(const edm::Event &event, const ed } if (tr_L_N && tr_L_F) { - p_x_L_diffNF_vs_x_L_N_->Fill(tr_L_N->getX(), tr_L_F->getX() - tr_L_N->getX()); - p_y_L_diffNF_vs_y_L_N_->Fill(tr_L_N->getY(), tr_L_F->getY() - tr_L_N->getY()); + p_x_L_diffNF_vs_x_L_N_->Fill(tr_L_N->x(), tr_L_F->x() - tr_L_N->x()); + p_y_L_diffNF_vs_y_L_N_->Fill(tr_L_N->y(), tr_L_F->y() - tr_L_N->y()); } if (tr_R_N && tr_R_F) { - p_x_R_diffNF_vs_x_R_N_->Fill(tr_R_N->getX(), tr_R_F->getX() - tr_R_N->getX()); - p_y_R_diffNF_vs_y_R_N_->Fill(tr_R_N->getY(), tr_R_F->getY() - tr_R_N->getY()); + p_x_R_diffNF_vs_x_R_N_->Fill(tr_R_N->x(), tr_R_F->x() - tr_R_N->x()); + p_y_R_diffNF_vs_y_R_N_->Fill(tr_R_N->y(), tr_R_F->y() - tr_R_N->y()); } // make single-RP-reco plots for (const auto &proton : *hRecoProtonsSingleRP) { - CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->getRPId()); + CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->rpId()); unsigned int decRPId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp(); singleRPPlots_[decRPId].fill(proton); } // make multi-RP-reco plots for (const auto &proton : *hRecoProtonsMultiRP) { - CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->getRPId()); + CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->rpId()); unsigned int armId = rpId.arm(); multiRPPlots_[armId].fill(proton); } @@ -417,8 +417,8 @@ void CTPPSProtonReconstructionPlotter::analyze(const edm::Event &event, const ed for (const auto &proton_s : *hRecoProtonsSingleRP) { for (const auto &proton_m : *hRecoProtonsMultiRP) { // only compare object from the same arm - CTPPSDetId rpId_s((*proton_s.contributingLocalTracks().begin())->getRPId()); - CTPPSDetId rpId_m((*proton_m.contributingLocalTracks().begin())->getRPId()); + CTPPSDetId rpId_s((*proton_s.contributingLocalTracks().begin())->rpId()); + CTPPSDetId rpId_m((*proton_m.contributingLocalTracks().begin())->rpId()); if (rpId_s.arm() != rpId_m.arm()) continue; @@ -436,7 +436,7 @@ void CTPPSProtonReconstructionPlotter::analyze(const edm::Event &event, const ed const reco::ForwardProton *p_arm1_s_N = nullptr, *p_arm1_s_F = nullptr, *p_arm1_m = nullptr; for (const auto &proton : *hRecoProtonsSingleRP) { - CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->getRPId()); + CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->rpId()); const unsigned int rpDecId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp(); if (rpDecId == rpId_45_N_) @@ -451,7 +451,7 @@ void CTPPSProtonReconstructionPlotter::analyze(const edm::Event &event, const ed } for (const auto &proton : *hRecoProtonsMultiRP) { - CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->getRPId()); + CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->rpId()); const unsigned int arm = rpId.arm(); if (arm == 0) diff --git a/Validation/CTPPS/plugins/CTPPSProtonReconstructionSimulationValidator.cc b/Validation/CTPPS/plugins/CTPPSProtonReconstructionSimulationValidator.cc index ead43ebf1cd01..2784c007649ca 100644 --- a/Validation/CTPPS/plugins/CTPPSProtonReconstructionSimulationValidator.cc +++ b/Validation/CTPPS/plugins/CTPPSProtonReconstructionSimulationValidator.cc @@ -275,7 +275,7 @@ void CTPPSProtonReconstructionSimulationValidator::analyze(const edm::Event &iEv if (rec_pr.method() == reco::ForwardProton::ReconstructionMethod::singleRP) { meth_idx = 0; - CTPPSDetId rpId((*rec_pr.contributingLocalTracks().begin())->getRPId()); + CTPPSDetId rpId((*rec_pr.contributingLocalTracks().begin())->rpId()); idx = 100 * rpId.arm() + 10 * rpId.station() + rpId.rp(); } diff --git a/Validation/CTPPS/plugins/CTPPSProtonReconstructionValidator.cc b/Validation/CTPPS/plugins/CTPPSProtonReconstructionValidator.cc index 77520d2128b58..2c72951a49b8e 100644 --- a/Validation/CTPPS/plugins/CTPPSProtonReconstructionValidator.cc +++ b/Validation/CTPPS/plugins/CTPPSProtonReconstructionValidator.cc @@ -97,7 +97,7 @@ void CTPPSProtonReconstructionValidator::analyze(const edm::Event& iEvent, const continue; for (const auto& tr : pr.contributingLocalTracks()) { - CTPPSDetId rpId(tr->getRPId()); + CTPPSDetId rpId(tr->rpId()); unsigned int rpDecId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp(); auto it = hOpticalFunctions->find(rpId); @@ -111,8 +111,8 @@ void CTPPSProtonReconstructionValidator::analyze(const edm::Event& iEvent, const LHCInterpolatedOpticalFunctionsSet::Kinematics k_out; it->second.transport(k_in, k_out); - const double de_x = (k_out.x - k_out_beam.x) * 10. - tr->getX(); // conversions: cm --> mm - const double de_y = (k_out.y - k_out_beam.y) * 10. - tr->getY(); // conversions: cm --> mm + const double de_x = (k_out.x - k_out_beam.x) * 10. - tr->x(); // conversions: cm --> mm + const double de_y = (k_out.y - k_out_beam.y) * 10. - tr->y(); // conversions: cm --> mm rp_plots_[rpDecId].fill(de_x, de_y); } diff --git a/Validation/CTPPS/plugins/CTPPSTrackDistributionPlotter.cc b/Validation/CTPPS/plugins/CTPPSTrackDistributionPlotter.cc index d1f2e446d2f49..e866f15e6bb69 100644 --- a/Validation/CTPPS/plugins/CTPPSTrackDistributionPlotter.cc +++ b/Validation/CTPPS/plugins/CTPPSTrackDistributionPlotter.cc @@ -103,22 +103,22 @@ void CTPPSTrackDistributionPlotter::analyze(const edm::Event& iEvent, const edm: // process tracks for (const auto& trk : *tracks) { - CTPPSDetId rpId(trk.getRPId()); + CTPPSDetId rpId(trk.rpId()); unsigned int rpDecId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp(); - rpPlots[rpDecId].fill(trk.getX(), trk.getY()); + rpPlots[rpDecId].fill(trk.x(), trk.y()); } for (const auto& t1 : *tracks) { - CTPPSDetId rpId1(t1.getRPId()); + CTPPSDetId rpId1(t1.rpId()); for (const auto& t2 : *tracks) { - CTPPSDetId rpId2(t2.getRPId()); + CTPPSDetId rpId2(t2.rpId()); if (rpId1.arm() != rpId2.arm()) continue; if (rpId1.station() == 0 && rpId2.station() == 2) - armPlots[rpId1.arm()].fill(t1.getX(), t1.getY(), t2.getX(), t2.getY()); + armPlots[rpId1.arm()].fill(t1.x(), t1.y(), t2.x(), t2.y()); } } }