Skip to content

Commit

Permalink
Add option to change tracker algorithm only keeping the best track
Browse files Browse the repository at this point in the history
  • Loading branch information
dstocco authored and davidrohr committed Apr 22, 2022
1 parent e41b80c commit d02cac2
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit d02cac2

Please sign in to comment.