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

Add option to change tracker algorithm only keeping the best track #8617

Merged
merged 1 commit into from
Apr 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,17 @@ class TrackerDeviceDPL
o2::base::GeometryManager::loadGeometry();
}

auto keepAll = !ic.options().get<bool>("mid-tracker-keep-best");

auto geoTrans = createTransformationFromManager(gGeoManager);

mTracker = std::make_unique<Tracker>(geoTrans);

mHitMapBuilder = std::make_unique<HitMapBuilder>(geoTrans);

if (!mTracker->init(true)) {
if (!mTracker->init(keepAll)) {
LOG(error) << "Initialization of MID tracker device failed";
}

mHitMapBuilder = std::make_unique<HitMapBuilder>(geoTrans);

auto stop = [this]() {
LOG(info) << "Capacities: ROFRecords: " << mTracker->getTrackROFRecords().capacity() << " tracks: " << mTracker->getTracks().capacity() << " clusters: " << mTracker->getClusters().capacity();
double scaleFactor = 1.e6 / mNROFs;
Expand Down Expand Up @@ -143,7 +144,7 @@ framework::DataProcessorSpec getTrackerSpec(bool isMC)
{inputSpecs},
{outputSpecs},
of::adaptFromTask<o2::mid::TrackerDeviceDPL>(isMC),
of::Options{}};
of::Options{{"mid-tracker-keep-best", of::VariantType::Bool, false, {"Keep only best track (default is keep all)"}}}};
}
} // namespace mid
} // namespace o2