Skip to content
Snippets Groups Projects

Fix when multiple Hough clusters are processed for the same X-Z track

Merged Salvatore Aiola requested to merge saiola-hybridseeding-bugfix into master
1 file
+ 5
9
Compare changes
  • Side-by-side
  • Inline
@@ -485,10 +485,10 @@ bool PrHybridSeeding::addStereo<CASE>::createTracksFromHough( std::vector<Pr::Hy
constexpr int LOW_NTOT_YSEL_TH = CASE == 2 ? 10 : 11;
constexpr int LOW_NTOT_TH = 11;
constexpr int LOW_NUV_TH = CASE == 2 ? 5 : 6;
unsigned int nXHits = xCandidate.size();
const unsigned int nXHits = xCandidate.size();
const unsigned int minUV = m_hybridSeeding.m_minUV[CASE][6 - nXHits];
unsigned int nTarget = m_hybridSeeding.m_minTot[CASE];
unsigned int nValidCandidates = 0;
unsigned int nTarget = m_hybridSeeding.m_minTot[CASE];
float chi2Target = m_hybridSeeding.m_maxChi2PerDofFullLow[CASE];
for ( size_t iCand = 0; iCand < nHoughCand; ++iCand ) {
auto& hcand = houghCand[iCand];
@@ -536,17 +536,13 @@ bool PrHybridSeeding::addStereo<CASE>::createTracksFromHough( std::vector<Pr::Hy
fitXY = false;
break;
}
if ( worstHit->hit->isX() ) {
--nXHits;
} else {
--nUVHits;
}
if ( !worstHit->hit->isX() ) --nUVHits;
--nHits;
trackCand.hits().erase( worstHit );
worstHitChi2 = 0;
worstHit = trackCand.hits().cend();
fitXY = fitSimultaneouslyXY( trackCand, worstHitChi2, worstHit );
canRemoveHit = nHits > nTarget && nUVHits > m_hybridSeeding.m_minUV[CASE][6 - nXHits];
canRemoveHit = nHits > nTarget && nUVHits > m_hybridSeeding.m_minUV[CASE][6 - nHits + nUVHits];
}
if ( !fitXY ) continue;
@@ -566,7 +562,7 @@ bool PrHybridSeeding::addStereo<CASE>::createTracksFromHough( std::vector<Pr::Hy
continue;
}
trackCand.setnXnY( nXHits, nUVHits );
trackCand.setnXnY( nHits - nUVHits, nUVHits );
if ( nValidCandidates == 0 ) {
trackCandidates.push_back( trackCand );
} else {
Loading