diff --git a/Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx b/Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx index 3b523f184bfaf..34a0ef774b918 100644 --- a/Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx +++ b/Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx @@ -52,16 +52,17 @@ class TrackerDeviceDPL o2::base::GeometryManager::loadGeometry(); } + auto keepAll = !ic.options().get("mid-tracker-keep-best"); + auto geoTrans = createTransformationFromManager(gGeoManager); mTracker = std::make_unique(geoTrans); - - mHitMapBuilder = std::make_unique(geoTrans); - - if (!mTracker->init(true)) { + if (!mTracker->init(keepAll)) { LOG(error) << "Initialization of MID tracker device failed"; } + mHitMapBuilder = std::make_unique(geoTrans); + auto stop = [this]() { LOG(info) << "Capacities: ROFRecords: " << mTracker->getTrackROFRecords().capacity() << " tracks: " << mTracker->getTracks().capacity() << " clusters: " << mTracker->getClusters().capacity(); double scaleFactor = 1.e6 / mNROFs; @@ -143,7 +144,7 @@ framework::DataProcessorSpec getTrackerSpec(bool isMC) {inputSpecs}, {outputSpecs}, of::adaptFromTask(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