From b234ec1f4b0ec660731934fda60b9fcafb4ea622 Mon Sep 17 00:00:00 2001 From: simonge Date: Fri, 31 May 2024 14:15:18 +0100 Subject: [PATCH 1/5] Try swapping auto for podio::ObjectID --- src/algorithms/fardetectors/FarDetectorTrackerCluster.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc index 6832d13f11..219822e052 100644 --- a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc +++ b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc @@ -194,7 +194,7 @@ namespace eicrecon { hitPos.setTime (cluster.time); // Add raw hits to cluster - for(auto hit: cluster.rawHits){ + for(podio::ObjectID hit: cluster.rawHits){ hitPos.addToRawHits(hit); } From cefd91e32c3bf4b8d6931959dd3b8a1ed6366c9e Mon Sep 17 00:00:00 2001 From: simonge Date: Fri, 31 May 2024 15:41:22 +0100 Subject: [PATCH 2/5] Use edm4hep objectid rather than podio --- src/algorithms/fardetectors/FarDetectorTrackerCluster.cc | 4 ++-- src/algorithms/fardetectors/FarDetectorTrackerCluster.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc index 219822e052..36d25f77c5 100644 --- a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc +++ b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc @@ -112,7 +112,7 @@ namespace eicrecon { ROOT::VecOps::RVec clusterList = {maxIndex}; ROOT::VecOps::RVec clusterT; - std::vector clusterHits; + std::vector clusterHits; // Loop over hits, adding neighbouring hits as relevant while(clusterList.size()){ @@ -194,7 +194,7 @@ namespace eicrecon { hitPos.setTime (cluster.time); // Add raw hits to cluster - for(podio::ObjectID hit: cluster.rawHits){ + for(auto hit: cluster.rawHits){ hitPos.addToRawHits(hit); } diff --git a/src/algorithms/fardetectors/FarDetectorTrackerCluster.h b/src/algorithms/fardetectors/FarDetectorTrackerCluster.h index 94e7449fc8..648bc19f7d 100644 --- a/src/algorithms/fardetectors/FarDetectorTrackerCluster.h +++ b/src/algorithms/fardetectors/FarDetectorTrackerCluster.h @@ -28,7 +28,7 @@ struct FDTrackerCluster { double energy{0.0}; double time{0.0}; double timeError{0.0}; - std::vector rawHits; + std::vector rawHits; }; namespace eicrecon { From abfe475d89737e072ba2149994b901e5c2b95165 Mon Sep 17 00:00:00 2001 From: simonge Date: Mon, 26 Aug 2024 17:17:51 +0100 Subject: [PATCH 3/5] Try setting as edm4hep::ObjectID directly --- src/algorithms/fardetectors/FarDetectorTrackerCluster.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc index b12a61b738..426287e712 100644 --- a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc +++ b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc @@ -112,7 +112,7 @@ FarDetectorTrackerCluster::ClusterHits(const edm4eic::RawTrackerHitCollection& i ROOT::VecOps::RVec clusterList = {maxIndex}; ROOT::VecOps::RVec clusterT; - std::vector clusterHits; + std::vector clusterHits; // Loop over hits, adding neighbouring hits as relevant while (clusterList.size()) { @@ -134,7 +134,8 @@ FarDetectorTrackerCluster::ClusterHits(const edm4eic::RawTrackerHitCollection& i clusterList.erase(clusterList.begin()); // Adds raw hit to TrackerHit contribution - clusterHits.push_back((inputHits)[index].getObjectID()); + edm4hep::ObjectID hitID = (inputHits)[index].getObjectID(); + clusterHits.push_back(hitID); // Energy auto hitE = e[index]; From 3d7fce62426795637574ed3e413ed96ba3bd9a1f Mon Sep 17 00:00:00 2001 From: simonge Date: Mon, 26 Aug 2024 20:03:47 +0100 Subject: [PATCH 4/5] Try static casting --- src/algorithms/fardetectors/FarDetectorTrackerCluster.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc index 426287e712..cd84fd1847 100644 --- a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc +++ b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc @@ -134,7 +134,7 @@ FarDetectorTrackerCluster::ClusterHits(const edm4eic::RawTrackerHitCollection& i clusterList.erase(clusterList.begin()); // Adds raw hit to TrackerHit contribution - edm4hep::ObjectID hitID = (inputHits)[index].getObjectID(); + edm4hep::ObjectID hitID = static_cast(inputHits)[index].getObjectID(); clusterHits.push_back(hitID); // Energy From 3139ed5b5db3fda6d20baea6c4dbf5851aa8d88e Mon Sep 17 00:00:00 2001 From: simonge Date: Mon, 26 Aug 2024 20:57:02 +0100 Subject: [PATCH 5/5] Cast the right thing --- src/algorithms/fardetectors/FarDetectorTrackerCluster.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc index cd84fd1847..627d36fd00 100644 --- a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc +++ b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc @@ -134,7 +134,7 @@ FarDetectorTrackerCluster::ClusterHits(const edm4eic::RawTrackerHitCollection& i clusterList.erase(clusterList.begin()); // Adds raw hit to TrackerHit contribution - edm4hep::ObjectID hitID = static_cast(inputHits)[index].getObjectID(); + edm4hep::ObjectID hitID = static_cast((inputHits)[index].getObjectID()); clusterHits.push_back(hitID); // Energy