Skip to content

Commit

Permalink
revert cov inflation, fix kf outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminhuth committed Dec 19, 2024
1 parent 262c153 commit 3e34e7e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ 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
8 changes: 1 addition & 7 deletions Examples/Algorithms/TrackFitting/src/RefittingAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,10 @@ ActsExamples::ProcessCode ActsExamples::RefittingAlgorithm::execute(
Acts::PropagatorPlainOptions(ctx.geoContext, ctx.magFieldContext)};
options.doRefit = true;

Acts::BoundTrackParameters initialParams(
const 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()(i, i) *=
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, initialVarInflation);
fit, pickTrack);

{
py::class_<TrackFitterFunction, std::shared_ptr<TrackFitterFunction>>(
Expand Down
1 change: 0 additions & 1 deletion Examples/Scripts/Python/truth_tracking_gsf_refitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ 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
7 changes: 3 additions & 4 deletions Examples/Scripts/Python/truth_tracking_kalman_refitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ 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 Expand Up @@ -74,7 +73,7 @@ def runRefittingKf(
s.addWriter(
acts.examples.RootTrackSummaryWriter(
level=acts.logging.INFO,
inputTracks="tracks",
inputTracks="kf_refit_tracks",
inputParticles="particles_selected",
inputTrackParticleMatching="refit_track_particle_matching",
filePath=str(outputDir / "tracksummary_kf_refit.root"),
Expand All @@ -84,9 +83,9 @@ def runRefittingKf(
s.addWriter(
acts.examples.TrackFitterPerformanceWriter(
level=acts.logging.INFO,
inputTracks="tracks",
inputTracks="kf_refit_tracks",
inputParticles="particles_selected",
inputTrackParticleMatching="track_particle_matching",
inputTrackParticleMatching="refit_track_particle_matching",
filePath=str(outputDir / "performance_kf_refit.root"),
)
)
Expand Down

0 comments on commit 3e34e7e

Please sign in to comment.