Skip to content
Snippets Groups Projects
Commit e50e99d4 authored by Tim Adye's avatar Tim Adye Committed by Walter Lampl
Browse files

ActsTrackFinding new TrackSelector cuts

ActsTrackFinding new TrackSelector cuts
parent 24a50ea2
No related branches found
No related tags found
1 merge request!67711ActsTrackFinding new TrackSelector cuts
......@@ -47,7 +47,7 @@ def createActsConfigFlags():
actscf.addFlag('Acts.doPrintTrackStates', False)
actscf.addFlag('Acts.skipDuplicateSeeds', True)
actscf.addFlag('Acts.trackFindingChi2CutOff', 15.0)
actscf.addFlag('Acts.doTrackFindingTrackSelector', 1) # 0=no selection, 1=default track selection, 2=no eta-dependant cuts
actscf.addFlag('Acts.doTrackFindingTrackSelector', 1) # 0=no selection, 1=default track selection, 2=no eta-dependant cuts, 3=no holes/shared cuts
actscf.addFlag('Acts.trackFindingMaxHoles', []) # add eta-dependent cut for branch stopper
actscf.addFlag('Acts.doAmbiguityResolution', True)
......
......@@ -76,6 +76,9 @@ def ActsTrackFindingCfg(flags,
[p / Units.GeV * UnitConstants.GeV for p in tolist(flags.Tracking.ActiveConfig.minPT)])
kwargs.setdefault("minMeasurements",
tolist(flags.Tracking.ActiveConfig.minClusters))
if flags.Acts.doTrackFindingTrackSelector != 3:
kwargs.setdefault("maxHolesSelect", tolist(flags.Tracking.ActiveConfig.maxHoles))
kwargs.setdefault("maxSharedHits", tolist(flags.Tracking.ActiveConfig.maxShared))
if flags.Acts.doTrackFindingTrackSelector == 2:
# use the same cut for all eta for comparison with previous behaviour
kwargs["ptMin"] = [min(kwargs["ptMin"])]
......
......@@ -72,6 +72,7 @@ namespace ActsTrk
ATH_MSG_DEBUG(" " << m_etaBins);
ATH_MSG_DEBUG(" " << m_chi2CutOff);
ATH_MSG_DEBUG(" " << m_numMeasurementsCutOff);
ATH_MSG_DEBUG(" " << m_maxHoles);
ATH_MSG_DEBUG(" " << m_phiMin);
ATH_MSG_DEBUG(" " << m_phiMax);
ATH_MSG_DEBUG(" " << m_etaMin);
......@@ -81,6 +82,10 @@ namespace ActsTrk
ATH_MSG_DEBUG(" " << m_ptMin);
ATH_MSG_DEBUG(" " << m_ptMax);
ATH_MSG_DEBUG(" " << m_minMeasurements);
ATH_MSG_DEBUG(" " << m_maxHolesSelect);
ATH_MSG_DEBUG(" " << m_maxOutliers);
ATH_MSG_DEBUG(" " << m_maxSharedHits);
ATH_MSG_DEBUG(" " << m_maxChi2);
ATH_MSG_DEBUG(" " << m_statEtaBins);
ATH_MSG_DEBUG(" " << m_seedLabels);
ATH_MSG_DEBUG(" " << m_dumpAllStatEtaBins);
......@@ -182,10 +187,14 @@ namespace ActsTrk
setCut(cfg.ptMin, m_ptMin, cutIndex);
setCut(cfg.ptMax, m_ptMax, cutIndex);
setCut(cfg.minMeasurements, m_minMeasurements, cutIndex);
setCut(cfg.maxHoles, m_maxHolesSelect, cutIndex);
setCut(cfg.maxOutliers, m_maxOutliers, cutIndex);
setCut(cfg.maxSharedHits, m_maxSharedHits, cutIndex);
setCut(cfg.maxChi2, m_maxChi2, cutIndex);
++cutIndex;
}
ATH_MSG_DEBUG(trackSelectorCfg);
ATH_MSG_INFO(trackSelectorCfg);
m_trackFinder.reset(new CKF_pimpl{CKF_config{{std::move(propagator), logger().cloneWithSuffix("CKF")}, measurementSelectorCfg, {}, {}, trackSelectorCfg}});
......@@ -419,7 +428,7 @@ namespace ActsTrk
if (!(tipState.nHoles > variableCut<std::size_t>(eta, alg->m_etaBins, alg->m_maxHoles, std::numeric_limits<std::size_t>::max())))
return false;
++event_stat[category_i][kNStoppedTracksMaxHoles];
ATH_MSG_DEBUG("CkfBranchStopper (seed eta " << eta << ") stopped branch with nSensitiveSurfaces="
ATH_MSG_INFO("CkfBranchStopper (seed eta " << eta << ") stopped branch with nSensitiveSurfaces="
<< tipState.nSensitiveSurfaces
<< " nStates=" << tipState.nStates
<< " nMeasurements=" << tipState.nMeasurements
......
......@@ -109,6 +109,10 @@ namespace ActsTrk
Gaudi::Property<std::vector<double>> m_ptMin{this, "ptMin", {}, "TrackSelector: ptMin"};
Gaudi::Property<std::vector<double>> m_ptMax{this, "ptMax", {}, "TrackSelector: ptMax"};
Gaudi::Property<std::vector<std::size_t>> m_minMeasurements{this, "minMeasurements", {}, "TrackSelector: minMeasurements"};
Gaudi::Property<std::vector<std::size_t>> m_maxHolesSelect{this, "maxHolesSelect", {}, "TrackSelector: maxHoles"};
Gaudi::Property<std::vector<std::size_t>> m_maxOutliers{this, "maxOutliers", {}, "TrackSelector: maxOutliers"};
Gaudi::Property<std::vector<std::size_t>> m_maxSharedHits{this, "maxSharedHits", {}, "TrackSelector: maxSharedHits"};
Gaudi::Property<std::vector<double>> m_maxChi2{this, "maxChi2", {}, "TrackSelector: maxChi2"};
// configuration of statistics tables
Gaudi::Property<std::vector<float>> m_statEtaBins{this, "StatisticEtaBins", {-4, -2.6, -2, 0, 2., 2.6, 4}, "Gather statistics separately for these bins."};
......
......@@ -538,6 +538,13 @@ namespace ActsTrk
states.push_back(state);
});
if (track.nMeasurements() != npixel + nstrip)
{
ATH_MSG_WARNING("Track has " << track.nMeasurements() << " measurements, but "
<< npixel << " pixel + "
<< nstrip << " strip hits");
}
const Acts::BoundTrackParameters per(track.referenceSurface().getSharedPtr(),
track.parameters(),
track.covariance(),
......@@ -546,10 +553,14 @@ namespace ActsTrk
<< std::left
<< std::setw(4) << "parm" << ' '
<< std::setw(21) << actsSurfaceName(per.referenceSurface()) << ' '
<< std::setw(22) << to_string("#hit=", npixel, '/', nstrip, ", #tj=", fitResult.size()) << ' '
<< std::setw(22) << to_string("#hit=", npixel, '/', nstrip, ", #hole=", track.nHoles()) << ' '
<< std::right;
printParameters(per.referenceSurface(), tgContext, per.parameters());
std::cout << '\n';
std::cout << std::setw(5) << std::left << ' '
<< std::setw(7) << std::setprecision(1) << track.chi2() << ' '
<< "#out=" << track.nOutliers()
<< ", #sh=" << track.nSharedHits()
<< std::right << '\n';
for (auto i = states.size(); i > 0;)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment