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 Jan 24, 2025
1 parent f26cad9 commit 43b2a62
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 34 deletions.
4 changes: 3 additions & 1 deletion Core/include/Acts/Seeding/GbtsGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ class GbtsGeometry {

int num_bins() const { return m_nEtaBins; }

Acts::Experimental::GbtsConnector *connector() const { return m_connector.get(); }
Acts::Experimental::GbtsConnector *connector() const {
return m_connector.get();
}

protected:
const GbtsLayer<space_point_t> *addNewLayer(const TrigInDetSiLayer &l,
Expand Down
14 changes: 7 additions & 7 deletions Core/include/Acts/Seeding/GbtsTrackingFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ struct GbtsEdgeState {
template <typename external_spacepoint_t>
class GbtsTrackingFilter {
public:
GbtsTrackingFilter(const std::vector<Acts::Experimental::TrigInDetSiLayer>& g,
std::vector<Acts::Experimental::GbtsEdge<external_spacepoint_t>>& sb,
std::unique_ptr<const Acts::Logger> logger =
Acts::getDefaultLogger("Filter",
Acts::Logging::Level::INFO))
GbtsTrackingFilter(
const std::vector<Acts::Experimental::TrigInDetSiLayer>& g,
std::vector<Acts::Experimental::GbtsEdge<external_spacepoint_t>>& sb,
std::unique_ptr<const Acts::Logger> logger =
Acts::getDefaultLogger("Filter", Acts::Logging::Level::INFO))
: m_geo(g), m_segStore(sb), m_logger(std::move(logger)) {}

void followTrack(Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS,
Expand Down Expand Up @@ -210,8 +210,8 @@ class GbtsTrackingFilter {
}
} else { // branching
int nBranches = 0;
for (typename std::list<Acts::Experimental::GbtsEdge<external_spacepoint_t>*>::iterator
sIt = lCont.begin();
for (typename std::list<Acts::Experimental::GbtsEdge<
external_spacepoint_t>*>::iterator sIt = lCont.begin();
sIt != lCont.end(); ++sIt, nBranches++) {
propagate((*sIt), new_ts); // recursive call
}
Expand Down
11 changes: 6 additions & 5 deletions Core/include/Acts/Seeding/SeedFinderGbts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ class SeedFinderGbts {

// inner
template <typename output_container_t>
void createSeeds(
const Acts::Experimental::RoiDescriptor & /*roi*/,
const Acts::Experimental::GbtsGeometry<external_spacepoint_t> & /*gbtsgeo*/,
output_container_t & /*out_cont*/);
void createSeeds(const Acts::Experimental::RoiDescriptor & /*roi*/,
const Acts::Experimental::GbtsGeometry<external_spacepoint_t>
& /*gbtsgeo*/,
output_container_t & /*out_cont*/);
// outer
std::vector<seed_t> createSeeds(
const Acts::Experimental::RoiDescriptor & /*roi*/,
const Acts::Experimental::GbtsGeometry<external_spacepoint_t> & /*gbtsgeo*/);
const Acts::Experimental::GbtsGeometry<external_spacepoint_t>
& /*gbtsgeo*/);

private:
enum Dim { DimPhi = 0, DimR = 1, DimZ = 2 };
Expand Down
24 changes: 14 additions & 10 deletions Core/include/Acts/Seeding/SeedFinderGbts.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,15 @@ void SeedFinderGbts<external_spacepoint_t>::runGbts_TrackFinder(

for (int inIdx = 0; inIdx < static_cast<int>(pN.m_in.size()); inIdx++) {
int inEdgeIdx = pN.m_in.at(inIdx);
Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS = &(edgeStorage.at(inEdgeIdx));
Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS =
&(edgeStorage.at(inEdgeIdx));
in_sort[inIdx].second = inEdgeIdx;
in_sort[inIdx].first = pS->m_p[0];
}
for (int outIdx = 0; outIdx < static_cast<int>(pN.m_out.size()); outIdx++) {
int outEdgeIdx = pN.m_out.at(outIdx);
Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS = &(edgeStorage.at(outEdgeIdx));
Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS =
&(edgeStorage.at(outEdgeIdx));
out_sort[outIdx].second = outEdgeIdx;
out_sort[outIdx].first = pS->m_p[0];
}
Expand All @@ -351,7 +353,8 @@ void SeedFinderGbts<external_spacepoint_t>::runGbts_TrackFinder(

int inEdgeIdx = in_sort[in_idx].second;

Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS = &(edgeStorage.at(inEdgeIdx));
Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS =
&(edgeStorage.at(inEdgeIdx));

pS->m_nNei = 0;
float tau1 = pS->m_p[0];
Expand Down Expand Up @@ -413,7 +416,8 @@ void SeedFinderGbts<external_spacepoint_t>::runGbts_TrackFinder(
std::vector<Acts::Experimental::GbtsEdge<external_spacepoint_t>*> v_old;

for (int edgeIndex = 0; edgeIndex < nEdges; edgeIndex++) {
Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS = &(edgeStorage.at(edgeIndex));
Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS =
&(edgeStorage.at(edgeIndex));
if (pS->m_nNei == 0) {
continue;
}
Expand Down Expand Up @@ -473,7 +477,8 @@ void SeedFinderGbts<external_spacepoint_t>::runGbts_TrackFinder(
vSeeds.reserve(m_config.MaxEdges / 2);

for (int edgeIndex = 0; edgeIndex < nEdges; edgeIndex++) {
Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS = &(edgeStorage.at(edgeIndex));
Acts::Experimental::GbtsEdge<external_spacepoint_t>* pS =
&(edgeStorage.at(edgeIndex));

if (pS->m_level < minLevel) {
continue;
Expand All @@ -484,8 +489,8 @@ void SeedFinderGbts<external_spacepoint_t>::runGbts_TrackFinder(

m_triplets.clear();

std::ranges::sort(
vSeeds, typename Acts::Experimental::GbtsEdge<external_spacepoint_t>::CompareLevel());
std::ranges::sort(vSeeds, typename Acts::Experimental::GbtsEdge<
external_spacepoint_t>::CompareLevel());

if (vSeeds.empty()) {
return;
Expand Down Expand Up @@ -516,9 +521,8 @@ void SeedFinderGbts<external_spacepoint_t>::runGbts_TrackFinder(

std::vector<const GbtsSP<external_spacepoint_t>*> vSP;

for (typename std::vector<
Acts::Experimental::GbtsEdge<external_spacepoint_t>*>::reverse_iterator sIt =
rs.m_vs.rbegin();
for (typename std::vector<Acts::Experimental::GbtsEdge<
external_spacepoint_t>*>::reverse_iterator sIt = rs.m_vs.rbegin();
sIt != rs.m_vs.rend(); ++sIt) {
(*sIt)->m_level = -1; // mark as collected

Expand Down
4 changes: 3 additions & 1 deletion Core/include/Acts/TrackFinding/GbtsConnector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class GbtsConnector {
float m_etaBin{};

std::map<int, std::vector<struct LayerGroup>> m_layerGroups;
std::map<int, std::vector<std::unique_ptr<Acts::Experimental::GbtsConnection>>> m_connMap;
std::map<int,
std::vector<std::unique_ptr<Acts::Experimental::GbtsConnection>>>
m_connMap;
};

} // namespace Acts::Experimental
6 changes: 3 additions & 3 deletions Core/src/TrackFinding/RoiDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

namespace Acts::Experimental {

Acts::Experimental::RoiDescriptor::RoiDescriptor(double eta, double etaMinus, double etaPlus,
double phi, double phiMinus, double phiPlus,
double zed, double zedMinus, double zedPlus)
Acts::Experimental::RoiDescriptor::RoiDescriptor(
double eta, double etaMinus, double etaPlus, double phi, double phiMinus,
double phiPlus, double zed, double zedMinus, double zedPlus)
: m_phi(phi),
m_eta(eta),
m_zed(zed),
Expand Down
15 changes: 8 additions & 7 deletions Examples/Algorithms/TrackFinding/src/GbtsSeedingAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ ActsExamples::ProcessCode ActsExamples::GbtsSeedingAlgorithm::execute(
finder.loadSpacePoints(GbtsSpacePoints);

// trigGbts file :
Acts::Experimental::RoiDescriptor internalRoi(0, -4.5, 4.5, 0, -std::numbers::pi,
std::numbers::pi, 0, -150., 150.);
Acts::Experimental::RoiDescriptor internalRoi(
0, -4.5, 4.5, 0, -std::numbers::pi, std::numbers::pi, 0, -150., 150.);
// ROI file:
// Acts::Experimental::RoiDescriptor internalRoi(0, -5, 5, 0, -std::numbers::pi,
// std::numbers::pi, 0, -225., 225.);
// Acts::Experimental::RoiDescriptor internalRoi(0, -5, 5, 0,
// -std::numbers::pi, std::numbers::pi, 0, -225., 225.);

// new version returns seeds
SimSeedContainer seeds = finder.createSeeds(internalRoi, *m_gbtsGeo);
Expand Down Expand Up @@ -154,7 +154,8 @@ ActsExamples::GbtsSeedingAlgorithm::MakeGbtsSpacePoints(
const AlgorithmContext &ctx,
std::map<std::pair<int, int>, std::pair<int, int>> map) const {
// create space point vectors
std::vector<Acts::Experimental::GbtsSP<ActsExamples::SimSpacePoint>> gbtsSpacePoints;
std::vector<Acts::Experimental::GbtsSP<ActsExamples::SimSpacePoint>>
gbtsSpacePoints;
gbtsSpacePoints.reserve(
m_inputSpacePoints.size()); // not sure if this is enough

Expand Down Expand Up @@ -329,8 +330,8 @@ ActsExamples::GbtsSeedingAlgorithm::LayerNumbering() const {

} else { // end so doesn't exists
// make new if one with Gbts ID doesn't exist:
Acts::Experimental::TrigInDetSiLayer new_Gbts_ID(combined_id, barrel_ec, rc, minBound,
maxBound);
Acts::Experimental::TrigInDetSiLayer new_Gbts_ID(combined_id, barrel_ec,
rc, minBound, maxBound);
input_vector.push_back(new_Gbts_ID);
count_vector.push_back(
1); // so the element exists and not divinding by 0
Expand Down

0 comments on commit 43b2a62

Please sign in to comment.