Skip to content

Commit

Permalink
AlignmentGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
LaraCalic committed Dec 11, 2023
1 parent f7106bc commit c37c59f
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,31 @@

namespace ActsExamples {

class AlignmentGroup {

public:
AlignmentGroup(const std::string& name, const std::vector<GeometryIdentifier>& geoIds)
: m_name(name), m_map(constructHierarchyMap(geoIds)) {
}

// Access the name of the group
std::string getNameOfGroup() const {
return m_name;
}

private:
std::string m_name; // storing the name in the class
GeometryHierarchyMap<bool> m_map;

GeometryHierarchyMap<bool> constructHierarchyMap(const std::vector<GeometryIdentifier>& geoIds) {
std::vector<GeometryHierarchyMap<bool>::InputElement> ies;
for (const auto& geoId : geoIds) {
ies.emplace_back(geoId, true);
}
return GeometryHierarchyMap<bool>(ies);
}
};

class AlignmentAlgorithm final : public IAlgorithm {
public:
using AlignmentResult = Acts::Result<ActsAlignment::AlignmentResult>;
Expand Down Expand Up @@ -82,6 +107,7 @@ class AlignmentAlgorithm final : public IAlgorithm {
std::size_t maxNumIterations = 100;
/// Number of tracks to be used for alignment
int maxNumTracks = -1;
std::vector<AlignmentGroup> m_groups;
};

/// Constructor of the alignment algorithm
Expand Down

0 comments on commit c37c59f

Please sign in to comment.