From 6b7c85afdc452a7cd5dafd7aefbea6746e2a7316 Mon Sep 17 00:00:00 2001 From: rohasan Date: Mon, 7 Oct 2024 13:50:10 +0100 Subject: [PATCH] changing use of source links in core --- Core/include/Acts/Seeding/GbtsDataStorage.hpp | 15 +++++---------- .../TrackFinding/src/GbtsSeedingAlgorithm.cpp | 10 +++++++++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Core/include/Acts/Seeding/GbtsDataStorage.hpp b/Core/include/Acts/Seeding/GbtsDataStorage.hpp index 163a0aa2a74..5543185df5e 100644 --- a/Core/include/Acts/Seeding/GbtsDataStorage.hpp +++ b/Core/include/Acts/Seeding/GbtsDataStorage.hpp @@ -27,13 +27,11 @@ struct GbtsSP { const space_point_t *SP; // want inside to have pointer int gbtsID; int combined_ID; - GbtsSP(const space_point_t *sp, int id, int combined_id) - : SP(sp), gbtsID(id), combined_ID{combined_id} { - if (SP->sourceLinks().size() == 1) { // pixels have 1 SL - m_isPixel = true; - } else { - m_isPixel = false; - } + bool m_isPixel; + float m_phi; + float m_r; + GbtsSP(const space_point_t *sp, int id, int combined_id, bool isPixel) + : SP(sp), gbtsID(id), combined_ID{combined_id}, m_isPixel(isPixel) { m_phi = std::atan(SP->x() / SP->y()); m_r = std::sqrt((SP->x()*SP->x())+ (SP->y()*SP->y())) ; }; @@ -41,9 +39,6 @@ struct GbtsSP { bool isSCT() const { return !m_isPixel; } float phi() const { return m_phi; } float r() const {return m_r;} - bool m_isPixel; - float m_phi; - float m_r; }; template diff --git a/Examples/Algorithms/TrackFinding/src/GbtsSeedingAlgorithm.cpp b/Examples/Algorithms/TrackFinding/src/GbtsSeedingAlgorithm.cpp index 1e98c46efb2..889e399ffc5 100644 --- a/Examples/Algorithms/TrackFinding/src/GbtsSeedingAlgorithm.cpp +++ b/Examples/Algorithms/TrackFinding/src/GbtsSeedingAlgorithm.cpp @@ -251,9 +251,17 @@ ActsExamples::GbtsSeedingAlgorithm::MakeGbtsSpacePoints( // access IDs from map int eta_mod = Find->second.second; int combined_id = Gbts_id * 1000 + eta_mod; + + //check if SP is pixel, dependant of type of SP so must be done in examples + bool isPixel = false ; + if (source_link.size() == 1) { // pixels have 1 SL + isPixel = true; + } else { + isPixel = false; + } // fill Gbts vector with current sapce point and ID - gbtsSpacePoints.emplace_back(&spacePoint, Gbts_id, combined_id); //make new GbtsSP here ! + gbtsSpacePoints.emplace_back(&spacePoint, Gbts_id, combined_id, isPixel); //make new GbtsSP here ! } } ACTS_VERBOSE("Space points successfully assigned Gbts ID");