Skip to content

Commit

Permalink
Adding option to input to cluster width
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosie-Hasan committed Oct 15, 2024
1 parent 6571520 commit 2c1e7e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 9 additions & 5 deletions Core/include/Acts/Seeding/GbtsDataStorage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ struct GbtsSP {
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) {
float m_ClusterWidth ;
GbtsSP(const space_point_t *sp, int id, int combined_id, bool isPixel, float ClusterWidth)
: SP(sp), gbtsID(id), combined_ID{combined_id}, m_isPixel(isPixel), m_ClusterWidth(ClusterWidth) {
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 ClusterWidth() const { return m_ClusterWidth; }
};

template <typename space_point_t>
Expand Down Expand Up @@ -164,7 +166,7 @@ class GbtsDataStorage {
return -1;
}

int binIndex = pL->getEtaBin(sp.SP->z(), sp.SP->r());
int binIndex = pL->getEtaBin(sp.SP->z(), sp.r());

if (binIndex == -1) {
return -2;
Expand All @@ -177,7 +179,8 @@ class GbtsDataStorage {
float max_tau = 100.0;
// can't do this bit yet as dont have cluster width
if (useClusterWidth) {
float cluster_width = 1; // temporary while cluster width not available
float cluster_width = sp.ClusterWidth();
// if (cluster_width == 0) {continue;} //catch for casses that dont have cluster width available
min_tau = 6.7 * (cluster_width - 0.2);
max_tau =
1.6 + 0.15 / (cluster_width + 0.2) + 6.1 * (cluster_width - 0.2);
Expand All @@ -187,7 +190,8 @@ class GbtsDataStorage {
sp, min_tau, max_tau)); // adding ftf member to nodes
} else {
if (useClusterWidth) {
float cluster_width = 1; // temporary while cluster width not available
float cluster_width = sp.ClusterWidth();
// if (cluster_width == 0) {continue;} //catch for casses that dont have cluster width available
if (cluster_width > 0.2) {
return -3;
}
Expand Down
5 changes: 3 additions & 2 deletions Examples/Algorithms/TrackFinding/src/GbtsSeedingAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,15 @@ ActsExamples::GbtsSeedingAlgorithm::MakeGbtsSpacePoints(

//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
if (sourceLink.size() == 1) { // pixels have 1 SL
isPixel = true;
} else {
isPixel = false;
}

float ClusterWidth = 0 ; //false input as this is not available in examples
// fill Gbts vector with current sapce point and ID
gbtsSpacePoints.emplace_back(&spacePoint, Gbts_id, combined_id, isPixel); //make new GbtsSP here !
gbtsSpacePoints.emplace_back(&spacePoint, Gbts_id, combined_id, isPixel, ClusterWidth); //make new GbtsSP here !
}
}
ACTS_VERBOSE("Space points successfully assigned Gbts ID");
Expand Down

0 comments on commit 2c1e7e7

Please sign in to comment.