Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminhuth committed Dec 19, 2024
1 parent 52ed96f commit abd3155
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class RefittingAlgorithm final : public IAlgorithm {
std::shared_ptr<TrackFitterFunction> fit;
/// Pick a single track for debugging (-1 process all tracks)
int pickTrack = -1;
/// Inflate initial covariance.
std::array<double, 6> initialVarInflation = {1., 1., 1., 1., 1., 1.};
};

/// Constructor of the fitting algorithm
Expand Down
7 changes: 6 additions & 1 deletion Examples/Algorithms/TrackFitting/src/RefittingAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,15 @@ ActsExamples::ProcessCode ActsExamples::RefittingAlgorithm::execute(
Acts::PropagatorPlainOptions(ctx.geoContext, ctx.magFieldContext)};
options.doRefit = true;

const Acts::BoundTrackParameters initialParams(
Acts::BoundTrackParameters initialParams(
track.referenceSurface().getSharedPtr(), track.parameters(),
track.covariance(), track.particleHypothesis());

// Inflate covariance
for (auto i = 0ul; i < m_cfg.initialVarInflation.size(); ++i) {
initialParams.covariance().value() *= m_cfg.initialVarInflation.at(i);
}

trackSourceLinks.clear();
surfSequence.clear();

Expand Down
2 changes: 1 addition & 1 deletion Examples/Python/src/TrackFitting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void addTrackFitting(Context& ctx) {

ACTS_PYTHON_DECLARE_ALGORITHM(ActsExamples::RefittingAlgorithm, mex,
"RefittingAlgorithm", inputTracks, outputTracks,
fit, pickTrack);
fit, pickTrack, initialVarInflation);

{
py::class_<TrackFitterFunction, std::shared_ptr<TrackFitterFunction>>(
Expand Down
1 change: 1 addition & 0 deletions Examples/Scripts/Python/truth_tracking_gsf_refitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def runRefittingGsf(
acts.logging.INFO,
inputTracks="kf_tracks",
outputTracks="gsf_refit_tracks",
initialVarInflation=[100.0] * 6,
fit=acts.examples.makeGsfFitterFunction(
trackingGeometry, field, **gsfOptions
),
Expand Down
1 change: 1 addition & 0 deletions Examples/Scripts/Python/truth_tracking_kalman_refitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def runRefittingKf(
level=acts.logging.INFO,
inputTracks="kf_tracks",
outputTracks="kf_refit_tracks",
initialVarInflation=[100.0] * 6,
fit=acts.examples.makeKalmanFitterFunction(
trackingGeometry, field, **kalmanOptions
),
Expand Down

0 comments on commit abd3155

Please sign in to comment.