Skip to content

Commit

Permalink
changing use of source links in core
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosie-Hasan committed Oct 7, 2024
1 parent bb5713c commit 6571520
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
15 changes: 5 additions & 10 deletions Core/include/Acts/Seeding/GbtsDataStorage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,18 @@ 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())) ;
};
bool isPixel() const { return m_isPixel; }
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 <typename space_point_t>
Expand Down
10 changes: 9 additions & 1 deletion Examples/Algorithms/TrackFinding/src/GbtsSeedingAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,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");
Expand Down

0 comments on commit 6571520

Please sign in to comment.