Skip to content

Commit

Permalink
fix: fix bugs and improve docs for prototracks-to-parameters algorithm (
Browse files Browse the repository at this point in the history
#2567)

Self explaining.
  • Loading branch information
benjaminhuth committed Oct 22, 2023
1 parent 134fdb1 commit 713ff52
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ namespace ActsExamples {
class PrototracksToParameters final : public IAlgorithm {
public:
struct Config {
/// The prototrack for that parameters should be computed
std::string inputProtoTracks;
/// The spacepoint collection
std::string inputSpacePoints;
/// The seeds created on-the-fly from which the parameters actually are
/// computed
std::string outputSeeds = "seeds-from-prototracks";
/// The prototracks for which parameters where computed successfully
std::string outputProtoTracks = "remaining-prototracks";
/// The output parameters
std::string outputParameters = "parameters";

/// Whether to make tight seeds (closest 3 hits to beampipe) or large
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ PrototracksToParameters::PrototracksToParameters(Config cfg,
if (m_cfg.geometry == nullptr) {
throw std::invalid_argument("No geometry given");
}
if (m_cfg.magneticField == nullptr) {
throw std::invalid_argument("No magnetic field given");
}

// Set up the track parameters covariance (the same for all tracks)
for (std::size_t i = Acts::eBoundLoc0; i < Acts::eBoundSize; ++i) {
Expand Down
8 changes: 4 additions & 4 deletions Examples/Python/src/ExaTrkXTrackFinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ void addExaTrkXTrackFinding(Context &ctx) {
py::arg("timing") = nullptr);
}

ACTS_PYTHON_DECLARE_ALGORITHM(ActsExamples::PrototracksToParameters, mex,
"PrototracksToParameters", inputProtoTracks,
inputSpacePoints, outputSeeds, outputParameters,
outputProtoTracks, geometry, buildTightSeeds);
ACTS_PYTHON_DECLARE_ALGORITHM(
ActsExamples::PrototracksToParameters, mex, "PrototracksToParameters",
inputProtoTracks, inputSpacePoints, outputSeeds, outputParameters,
outputProtoTracks, geometry, magneticField, buildTightSeeds);

ACTS_PYTHON_DECLARE_ALGORITHM(
ActsExamples::TrackFindingFromPrototrackAlgorithm, mex,
Expand Down

0 comments on commit 713ff52

Please sign in to comment.