Skip to content

Commit

Permalink
running clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosie-Hasan committed Dec 11, 2024
1 parent 35c79c3 commit 1a7b3a0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 32 deletions.
21 changes: 13 additions & 8 deletions Core/include/Acts/Seeding/GbtsDataStorage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,22 @@ struct GbtsSP {
int combined_ID;
bool m_isPixel;
float m_phi;
float m_r;
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) {
float m_r;
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::atan2(SP->y(), SP->x());
m_r = std::sqrt((SP->x()*SP->x())+ (SP->y()*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;}
float r() const { return m_r; }
float ClusterWidth() const { return m_ClusterWidth; }
};

Expand Down Expand Up @@ -165,7 +170,7 @@ class GbtsDataStorage {
float max_tau = 100.0;
// can't do this bit yet as dont have cluster width
if (useClusterWidth) {
float cluster_width = sp.ClusterWidth();
float cluster_width = sp.ClusterWidth();
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 @@ -176,7 +181,7 @@ class GbtsDataStorage {
sp, min_tau, max_tau)); // adding ftf member to nodes
} else {
if (useClusterWidth) {
float cluster_width = sp.ClusterWidth();
float cluster_width = sp.ClusterWidth();
if (cluster_width > 0.2) {
return -3;
}
Expand Down
12 changes: 6 additions & 6 deletions Core/include/Acts/Seeding/SeedFinderGbts.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,12 @@ void SeedFinderGbts<external_spacepoint_t>::runGbts_TrackFinder(
nEdges++;
}
} // loop over n2 (outer) nodes
} // loop over n1 (inner) nodes
} // loop over source eta bins
} // loop over dst eta bins
} // loop over L2(L1) layers
} // loop over dst layers
} // loop over the stages of doublet making
} // loop over n1 (inner) nodes
} // loop over source eta bins
} // loop over dst eta bins
} // loop over L2(L1) layers
} // loop over dst layers
} // loop over the stages of doublet making

std::vector<const GbtsNode<external_spacepoint_t>*> vNodes;

Expand Down
31 changes: 17 additions & 14 deletions Examples/Algorithms/TrackFinding/src/GbtsSeedingAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ ActsExamples::ProcessCode ActsExamples::GbtsSeedingAlgorithm::execute(
MakeGbtsSpacePoints(ctx, m_cfg.ActsGbtsMap);

for (auto sp : GbtsSpacePoints) {
ACTS_DEBUG("Gbts space points: " << " Gbts_id: " << sp.gbtsID << " z: "
<< sp.SP->z() << " r: " << sp.r()
<< " ACTS volume: "
<< sp.SP->sourceLinks()
.front()
.get<IndexSourceLink>()
.geometryId()
.volume()
<< "\n");
ACTS_DEBUG("Gbts space points: "
<< " Gbts_id: " << sp.gbtsID << " z: " << sp.SP->z()
<< " r: " << sp.r() << " ACTS volume: "
<< sp.SP->sourceLinks()
.front()
.get<IndexSourceLink>()
.geometryId()
.volume()
<< "\n");
}

// this is now calling on a core algorithm
Expand Down Expand Up @@ -219,18 +219,21 @@ 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, dependent of type of SP so must be done in examples
bool isPixel = false ;

// check if SP is pixel, dependent of type of SP so must be done in
// examples
bool isPixel = false;
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
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, ClusterWidth); //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
7 changes: 3 additions & 4 deletions Examples/Python/src/TrackFinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,9 @@ void addTrackFinding(Context& ctx) {

ACTS_PYTHON_DECLARE_ALGORITHM(
ActsExamples::GbtsSeedingAlgorithm, mex, "GbtsSeedingAlgorithm",
inputSpacePoints, outputSeeds, seedFinderConfig,
seedFinderOptions, layerMappingFile, geometrySelection, trackingGeometry,
ActsGbtsMap, fill_module_csv, inputClusters); //temp removed seedFilterConfig,

inputSpacePoints, outputSeeds, seedFinderConfig, seedFinderOptions,
layerMappingFile, geometrySelection, trackingGeometry, ActsGbtsMap,
fill_module_csv, inputClusters);

ACTS_PYTHON_DECLARE_ALGORITHM(
ActsExamples::HoughTransformSeeder, mex, "HoughTransformSeeder",
Expand Down

0 comments on commit 1a7b3a0

Please sign in to comment.