From 614ea98cbd71d0504379452213bed67b24ef6b7f Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 8 Apr 2024 12:26:51 +0200 Subject: [PATCH 01/14] testing commit --- .../LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc index e644b38ae45f7..35c5d59a28944 100644 --- a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc +++ b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc @@ -78,6 +78,7 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS continue; } DetId detId = mod.id(); + DetId rocId = mod.id(); //--The following will be used when we make a theshold for the clusters. //--Keeping this for features that may be implemented later. From 136f195acd7ce2fd970ba39e74e3fffc33ddf287 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 8 Apr 2024 15:42:28 +0200 Subject: [PATCH 02/14] adding ROC increments --- .../plugins/AlcaPCCEventProducer.cc | 2 +- .../Luminosity/interface/PixelClusterCounts.h | 27 +++++++++++++++++++ .../interface/PixelClusterCountsInEvent.h | 12 +++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc index 35c5d59a28944..741c9e68ff5b7 100644 --- a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc +++ b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc @@ -78,7 +78,6 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS continue; } DetId detId = mod.id(); - DetId rocId = mod.id(); //--The following will be used when we make a theshold for the clusters. //--Keeping this for features that may be implemented later. @@ -90,6 +89,7 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS //} int nCluster = mod.size(); thePCCob->increment(detId(), nCluster); + thePCCob->incrementRoc(detId(), nCluster); // modify to include real ROCs thePCCob->setbxID(bx); } diff --git a/DataFormats/Luminosity/interface/PixelClusterCounts.h b/DataFormats/Luminosity/interface/PixelClusterCounts.h index 5581a1e36135f..93ad31a9b51e2 100644 --- a/DataFormats/Luminosity/interface/PixelClusterCounts.h +++ b/DataFormats/Luminosity/interface/PixelClusterCounts.h @@ -31,26 +31,47 @@ namespace reco { m_counts.at(LumiConstants::numBX * modIndex + bxID - 1) += count; } + void incrementRoc(int rD, unsigned int bxID, int count) { + size_t rocIndex = std::distance(m_RocID.begin(), std::find(m_RocID.begin(), m_RocID.end(), rD)); + if (rocIndex == m_RocID.size()) { + m_RocID.push_back(rD); + m_countsRoc.resize(m_countsRoc.size() + LumiConstants::numBX, 0); + } + m_countsRoc.at(LumiConstants::numBX * rocIndex + bxID - 1) += count; + } + void eventCounter(unsigned int bxID) { m_events.at(bxID - 1)++; } void add(reco::PixelClusterCountsInEvent const& pccInEvent) { std::vector const& countsInEvent = pccInEvent.counts(); + std::vector const& rocCountsInEvent = pccInEvent.rocCounts(); std::vector const& modIDInEvent = pccInEvent.modID(); + std::vector const& rocIDInEvent = pccInEvent.rocID(); int bxIDInEvent = pccInEvent.bxID(); for (unsigned int i = 0; i < modIDInEvent.size(); i++) { increment(modIDInEvent[i], bxIDInEvent, countsInEvent.at(i)); } + for (unsigned int i = 0; i < rocIDInEvent.size(); i++) { + incrementRoc(rocIDInEvent[i], bxIDInEvent, rocCountsInEvent.at(i)); + } } void merge(reco::PixelClusterCounts const& pcc) { std::vector const& counts = pcc.readCounts(); + std::vector const& countsRoc = pcc.readRocCounts(); std::vector const& modIDs = pcc.readModID(); + std::vector const& rocIDs = pcc.readRocID(); std::vector const& events = pcc.readEvents(); for (unsigned int i = 0; i < modIDs.size(); i++) { for (unsigned int bxID = 0; bxID < LumiConstants::numBX; ++bxID) { increment(modIDs[i], bxID + 1, counts.at(i * LumiConstants::numBX + bxID)); } } + for (unsigned int i = 0; i < rocIDs.size(); i++) { + for (unsigned int bxID = 0; bxID < LumiConstants::numBX; ++bxID) { + incrementRoc(rocIDs[i], bxID + 1, countsRoc.at(i * LumiConstants::numBX + bxID)); + } + } for (unsigned int i = 0; i < LumiConstants::numBX; ++i) { m_events[i] += events[i]; } @@ -58,19 +79,25 @@ namespace reco { void reset() { m_counts.clear(); + m_countsRoc.clear(); m_ModID.clear(); + m_RocID.clear(); m_events.clear(); m_events.resize(LumiConstants::numBX, 0); } std::vector const& readCounts() const { return (m_counts); } + std::vector const& readRocCounts() const { return (m_countsRoc); } std::vector const& readEvents() const { return (m_events); } std::vector const& readModID() const { return (m_ModID); } + std::vector const& readRocID() const { return (m_RocID); } private: std::vector m_counts; + std::vector m_countsRoc; std::vector m_events; std::vector m_ModID; + std::vector m_RocID; }; } // namespace reco diff --git a/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h b/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h index e5ffa4886796f..3c0465237f670 100644 --- a/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h +++ b/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h @@ -25,17 +25,29 @@ namespace reco { m_counts[modIndex] += count; } + void incrementRoc(int rD, int count) { + size_t rocIndex = std::distance(m_RocID.begin(), std::find(m_RocID.begin(), m_RocID.end(), rD)); + if (rocIndex == m_RocID.size()) { + m_RocID.push_back(mD); + m_counts.push_back(0); + } + m_counts[rocIndex] += count; + } + void setbxID(unsigned int inputbxID) { m_bxID = inputbxID; } std::vector const& counts() const { return (m_counts); } std::vector const& modID() const { return (m_ModID); } + std::vector const& rocID() const { return (m_RocID); } + unsigned int const& bxID() const { return m_bxID; } private: std::vector m_counts; std::vector m_ModID; + std::vector m_RocID; unsigned int m_bxID; }; From 873067ea5c06b705ed20c70aeca2d63820fb47b6 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 8 Apr 2024 15:49:46 +0200 Subject: [PATCH 03/14] fixing ROC counter --- .../Luminosity/interface/PixelClusterCountsInEvent.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h b/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h index 3c0465237f670..3362e3f1b6d6e 100644 --- a/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h +++ b/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h @@ -28,16 +28,18 @@ namespace reco { void incrementRoc(int rD, int count) { size_t rocIndex = std::distance(m_RocID.begin(), std::find(m_RocID.begin(), m_RocID.end(), rD)); if (rocIndex == m_RocID.size()) { - m_RocID.push_back(mD); - m_counts.push_back(0); + m_RocID.push_back(rD); + m_countsRoc.push_back(0); } - m_counts[rocIndex] += count; + m_countsRoc[rocIndex] += count; } void setbxID(unsigned int inputbxID) { m_bxID = inputbxID; } std::vector const& counts() const { return (m_counts); } + std::vector const& counts() const { return (m_countsRoc); } + std::vector const& modID() const { return (m_ModID); } std::vector const& rocID() const { return (m_RocID); } @@ -46,6 +48,7 @@ namespace reco { private: std::vector m_counts; + std::vector m_countsRoc; std::vector m_ModID; std::vector m_RocID; unsigned int m_bxID; From 9c7dc370f9730f393d41b26a4b0ede03a490c938 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 8 Apr 2024 15:52:44 +0200 Subject: [PATCH 04/14] fixing minor bug --- DataFormats/Luminosity/interface/PixelClusterCounts.h | 2 +- DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DataFormats/Luminosity/interface/PixelClusterCounts.h b/DataFormats/Luminosity/interface/PixelClusterCounts.h index 93ad31a9b51e2..1b4b190092030 100644 --- a/DataFormats/Luminosity/interface/PixelClusterCounts.h +++ b/DataFormats/Luminosity/interface/PixelClusterCounts.h @@ -44,7 +44,7 @@ namespace reco { void add(reco::PixelClusterCountsInEvent const& pccInEvent) { std::vector const& countsInEvent = pccInEvent.counts(); - std::vector const& rocCountsInEvent = pccInEvent.rocCounts(); + std::vector const& rocCountsInEvent = pccInEvent.countsRoc(); std::vector const& modIDInEvent = pccInEvent.modID(); std::vector const& rocIDInEvent = pccInEvent.rocID(); int bxIDInEvent = pccInEvent.bxID(); diff --git a/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h b/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h index 3362e3f1b6d6e..94227393ea11a 100644 --- a/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h +++ b/DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h @@ -38,7 +38,7 @@ namespace reco { std::vector const& counts() const { return (m_counts); } - std::vector const& counts() const { return (m_countsRoc); } + std::vector const& countsRoc() const { return (m_countsRoc); } std::vector const& modID() const { return (m_ModID); } From 313e4ebb90bc5f105fd9f6c2abc3cc0c4b676d7f Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 8 Apr 2024 16:02:26 +0200 Subject: [PATCH 05/14] sending fake RocID --- .../LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc index 741c9e68ff5b7..2e116cf61a8b5 100644 --- a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc +++ b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc @@ -89,7 +89,7 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS //} int nCluster = mod.size(); thePCCob->increment(detId(), nCluster); - thePCCob->incrementRoc(detId(), nCluster); // modify to include real ROCs + thePCCob->incrementRoc(0, 1); // modify to include real ROCs thePCCob->setbxID(bx); } From 103b35fe309765af346409c9682d845c86275633 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 8 Apr 2024 16:59:47 +0200 Subject: [PATCH 06/14] trying to fix issue --- .../LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc index 2e116cf61a8b5..5045db083495c 100644 --- a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc +++ b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc @@ -89,7 +89,7 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS //} int nCluster = mod.size(); thePCCob->increment(detId(), nCluster); - thePCCob->incrementRoc(0, 1); // modify to include real ROCs + thePCCob->incrementRoc(detId(), 1); // modify to include real ROCs thePCCob->setbxID(bx); } From 6b419f467963e9a42604e58d0e106198677f4a46 Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 9 Apr 2024 16:53:58 +0200 Subject: [PATCH 07/14] updating class version --- DataFormats/Luminosity/src/classes_def.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DataFormats/Luminosity/src/classes_def.xml b/DataFormats/Luminosity/src/classes_def.xml index 47e92b0d46c8d..37f04e63bb0a1 100644 --- a/DataFormats/Luminosity/src/classes_def.xml +++ b/DataFormats/Luminosity/src/classes_def.xml @@ -47,11 +47,11 @@ - + - + From 3faccb72f3cae94ac2671fcc9859e2d86be8153e Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 9 Apr 2024 17:10:46 +0200 Subject: [PATCH 08/14] update for class version --- DataFormats/Luminosity/src/classes_def.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DataFormats/Luminosity/src/classes_def.xml b/DataFormats/Luminosity/src/classes_def.xml index 37f04e63bb0a1..b661af7235e3e 100644 --- a/DataFormats/Luminosity/src/classes_def.xml +++ b/DataFormats/Luminosity/src/classes_def.xml @@ -46,11 +46,11 @@ - + - + From 3c53ff3efe42090aab732589fd17bbdb298c119c Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 13 May 2024 15:35:17 +0200 Subject: [PATCH 09/14] added per ROC increment --- .../plugins/AlcaPCCEventProducer.cc | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc index 5045db083495c..7ee9be52b2eb4 100644 --- a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc +++ b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc @@ -45,6 +45,10 @@ class AlcaPCCEventProducer : public edm::stream::EDProducer<> { int countEvt_; //counter int countLumi_; //counter + const int rowsperroc = 52; + const int colsperroc = 80; + const int nROCcolumns = 8; + std::unique_ptr thePCCob; }; @@ -79,17 +83,32 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS } DetId detId = mod.id(); - //--The following will be used when we make a theshold for the clusters. - //--Keeping this for features that may be implemented later. - // -- clusters on this det + // Iterate over Clusters in module to fill per ROC + // histogram //edmNew::DetSet::const_iterator di; - //int nClusterCount=0; //for (di = mod.begin(); di != mod.end(); ++di) { - // nClusterCount++; - //} + + for (auto const& cluster : mod) { + for (int i = 0; i < cluster.size(); ++i) { + const auto pix = cluster.pixel(i); + int mr0 = pix.x; /* constant column direction is along x-axis */ + int mc0 = pix.y; /* constant row direction is along y-axis */ + int irow = mr0 / rowsperroc; + int icol = mc0 / colsperroc; + + /* generate the folling roc index that is going to map with ROC id as + 8 9 10 11 12 13 14 15 + 0 1 2 3 4 5 6 7 */ + int key = icol + irow * nROCcolumns; + // TODO: add roc threshold to config if(di.adc > fRocThreshold_) { + if (pix.adc > 8) { + thePCCob->incrementRoc(((detId << 7) + key), 1); + } + } + } + int nCluster = mod.size(); thePCCob->increment(detId(), nCluster); - thePCCob->incrementRoc(detId(), 1); // modify to include real ROCs thePCCob->setbxID(bx); } From a0c25bda8e2abc7e8844aa0e8f787d7172e49682 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 13 May 2024 23:08:42 +0200 Subject: [PATCH 10/14] clean up before merge --- .../plugins/AlcaPCCEventProducer.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc index 7ee9be52b2eb4..0f8a7d14997e0 100644 --- a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc +++ b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc @@ -9,6 +9,7 @@ ________________________________________________________________**/ // C++ standard #include + // CMS #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h" #include "DataFormats/DetId/interface/DetId.h" @@ -28,6 +29,7 @@ ________________________________________________________________**/ #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "TMath.h" + //The class class AlcaPCCEventProducer : public edm::stream::EDProducer<> { public: @@ -83,11 +85,7 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS } DetId detId = mod.id(); - // Iterate over Clusters in module to fill per ROC - // histogram - //edmNew::DetSet::const_iterator di; - //for (di = mod.begin(); di != mod.end(); ++di) { - + // Iterate over Clusters in module to fill per ROC histogram for (auto const& cluster : mod) { for (int i = 0; i < cluster.size(); ++i) { const auto pix = cluster.pixel(i); @@ -100,8 +98,9 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 */ int key = icol + irow * nROCcolumns; + // TODO: add roc threshold to config if(di.adc > fRocThreshold_) { - if (pix.adc > 8) { + if (pix.adc > 1) { thePCCob->incrementRoc(((detId << 7) + key), 1); } } From 8257a61e7a098232152594dbea187fd90f0b5458 Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 14 May 2024 15:52:46 +0200 Subject: [PATCH 11/14] cleaning up --- .../plugins/AlcaPCCEventProducer.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc index 0f8a7d14997e0..6f6271f8937b7 100644 --- a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc +++ b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc @@ -88,11 +88,10 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS // Iterate over Clusters in module to fill per ROC histogram for (auto const& cluster : mod) { for (int i = 0; i < cluster.size(); ++i) { + const auto pix = cluster.pixel(i); - int mr0 = pix.x; /* constant column direction is along x-axis */ - int mc0 = pix.y; /* constant row direction is along y-axis */ - int irow = mr0 / rowsperroc; - int icol = mc0 / colsperroc; + int irow = pix.x / rowsperroc; /* constant column direction is along x-axis */ + int icol = pix.y / colsperroc; /* constant row direction is along y-axis */ /* generate the folling roc index that is going to map with ROC id as 8 9 10 11 12 13 14 15 @@ -100,7 +99,7 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS int key = icol + irow * nROCcolumns; // TODO: add roc threshold to config if(di.adc > fRocThreshold_) { - if (pix.adc > 1) { + if (pix.adc > 0) { thePCCob->incrementRoc(((detId << 7) + key), 1); } } From 50646020addb6636e3dc68aa2d50e7a0e38cbc99 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 17 May 2024 15:33:49 +0200 Subject: [PATCH 12/14] code-format applied --- .../LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc index 6f6271f8937b7..91df639eb0b34 100644 --- a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc +++ b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc @@ -88,7 +88,6 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS // Iterate over Clusters in module to fill per ROC histogram for (auto const& cluster : mod) { for (int i = 0; i < cluster.size(); ++i) { - const auto pix = cluster.pixel(i); int irow = pix.x / rowsperroc; /* constant column direction is along x-axis */ int icol = pix.y / colsperroc; /* constant row direction is along y-axis */ @@ -100,7 +99,7 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS // TODO: add roc threshold to config if(di.adc > fRocThreshold_) { if (pix.adc > 0) { - thePCCob->incrementRoc(((detId << 7) + key), 1); + thePCCob->incrementRoc(((detId << 7) + key), 1); } } } From 236ea975907d0155799ef09cd5afee3696201dad Mon Sep 17 00:00:00 2001 From: Alexey Shevelev <61614704+duff-ae@users.noreply.github.com> Date: Mon, 20 May 2024 11:39:51 +0200 Subject: [PATCH 13/14] Update Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc Co-authored-by: Andrea Perrotta --- .../plugins/AlcaPCCEventProducer.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc index 91df639eb0b34..908f612b5d92b 100644 --- a/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc +++ b/Calibration/LumiAlCaRecoProducers/plugins/AlcaPCCEventProducer.cc @@ -89,16 +89,14 @@ void AlcaPCCEventProducer::produce(edm::Event& iEvent, const edm::EventSetup& iS for (auto const& cluster : mod) { for (int i = 0; i < cluster.size(); ++i) { const auto pix = cluster.pixel(i); - int irow = pix.x / rowsperroc; /* constant column direction is along x-axis */ - int icol = pix.y / colsperroc; /* constant row direction is along y-axis */ - - /* generate the folling roc index that is going to map with ROC id as - 8 9 10 11 12 13 14 15 - 0 1 2 3 4 5 6 7 */ - int key = icol + irow * nROCcolumns; - // TODO: add roc threshold to config if(di.adc > fRocThreshold_) { if (pix.adc > 0) { + int irow = pix.x / rowsperroc; /* constant column direction is along x-axis */ + int icol = pix.y / colsperroc; /* constant row direction is along y-axis */ + /* generate the folling roc index that is going to map with ROC id as + 8 9 10 11 12 13 14 15 + 0 1 2 3 4 5 6 7 */ + int key = icol + irow * nROCcolumns; thePCCob->incrementRoc(((detId << 7) + key), 1); } } From 324ea2a1ee53d3ed5b72487c68b58618c005b2dd Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 20 May 2024 11:49:47 +0200 Subject: [PATCH 14/14] returning class version and checksum --- DataFormats/Luminosity/src/classes_def.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DataFormats/Luminosity/src/classes_def.xml b/DataFormats/Luminosity/src/classes_def.xml index b661af7235e3e..52c6c5668725f 100644 --- a/DataFormats/Luminosity/src/classes_def.xml +++ b/DataFormats/Luminosity/src/classes_def.xml @@ -48,10 +48,12 @@ + +