Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MkFit] Fix uninitialized MkFinder::m_prop_config in backward-fit. #37038

Merged
merged 2 commits into from Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion RecoTracker/MkFitCore/src/MkBuilder.cc
Expand Up @@ -583,6 +583,8 @@ namespace mkfit {

++rng;
} // end of loop over candidates in a tbb chunk

mkfndr->release();
}); // end parallel_for over candidates in a region
}); // end of parallel_for_each over regions
}
Expand Down Expand Up @@ -878,6 +880,7 @@ namespace mkfit {
}

} // end of layer loop
mkfndr->release();

// final sorting
for (int iseed = start_seed; iseed < end_seed; ++iseed) {
Expand Down Expand Up @@ -920,6 +923,7 @@ namespace mkfit {
// loop over layers
find_tracks_in_layers(*cloner, mkfndr.get(), iteration_dir, seeds.begin(), seeds.end(), region);

mkfndr->release();
cloner->release();
});
});
Expand Down Expand Up @@ -1283,9 +1287,9 @@ namespace mkfit {
EventOfCombCandidates &eoccs = m_event_of_comb_cands;
const SteeringParams &st_par = m_job->steering_params(region);
const PropagationConfig &prop_config = PropagationConfig::get_default();
mkfndr->setup_bkfit(prop_config);

int step = NN;

for (int icand = start_cand; icand < end_cand; icand += step) {
int end = std::min(icand + NN, end_cand);

Expand Down Expand Up @@ -1357,6 +1361,7 @@ namespace mkfit {
}
#endif
}
mkfndr->release();
}

} // end namespace mkfit
2 changes: 2 additions & 0 deletions RecoTracker/MkFitCore/src/MkFinder.cc
Expand Up @@ -44,6 +44,8 @@ namespace mkfit {
m_iteration_hit_mask = ihm;
}

void MkFinder::setup_bkfit(const PropagationConfig &pc) { m_prop_config = &pc; }

void MkFinder::release() {
m_prop_config = nullptr;
m_iteration_params = nullptr;
Expand Down
1 change: 1 addition & 0 deletions RecoTracker/MkFitCore/src/MkFinder.h
Expand Up @@ -44,6 +44,7 @@ namespace mkfit {
const IterationParams &ip,
const IterationLayerConfig &ilc,
const std::vector<bool> *ihm);
void setup_bkfit(const PropagationConfig &pc);
void release();

//----------------------------------------------------------------------------
Expand Down