diff --git a/algo/ca/core/tracking/CaTrackFinder.cxx b/algo/ca/core/tracking/CaTrackFinder.cxx index 37f0c51a79aeba28627eb03f0952da9aa16cfcc2..546b9a5fa00feb6039102e2571973d3f68e1464d 100644 --- a/algo/ca/core/tracking/CaTrackFinder.cxx +++ b/algo/ca/core/tracking/CaTrackFinder.cxx @@ -134,7 +134,6 @@ void TrackFinder::FindTracks() continue; } - if (maxTimeBeforeHit < info.fEventTimeMax) { maxTimeBeforeHit = info.fEventTimeMax; } info.fMaxTimeBeforeHit = maxTimeBeforeHit; @@ -147,17 +146,22 @@ void TrackFinder::FindTracks() fscal minTimeAfterHit = std::numeric_limits<fscal>::max(); // loop in the reverse order to fill CaHitTimeInfo::fMinTimeAfterHit fields + //LOG(warning) << "\n\n stream " << iStream << " hits " << nStreamHits << "\n\n"; for (int ih = nStreamHits - 1; ih >= 0; --ih) { ca::HitIndex_t caHitId = frAlgo.fInputData.GetStreamStartIndex(iStream) + ih; - CaHitTimeInfo& info = frAlgo.fHitTimeInfo[caHitId]; + const ca::Hit& h = frAlgo.fInputData.GetHit(caHitId); + if (frAlgo.fvHitKeyFlags[h.FrontKey()] || frAlgo.fvHitKeyFlags[h.BackKey()]) { continue; } // the hit is skipped + CaHitTimeInfo& info = frAlgo.fHitTimeInfo[caHitId]; if (minTimeAfterHit > info.fEventTimeMin) { minTimeAfterHit = info.fEventTimeMin; } info.fMinTimeAfterHit = minTimeAfterHit; + //if (h.Station() > 1) { LOG(warning) << " hit time " << info.fEventTimeMin << " min time after hit " << info.fMinTimeAfterHit; } } } statTsStart = tsStart; - LOG(info) << "CA tracker process time slice " << statTsStart / 1.e6 << " ms ... " << statTsEnd / 1.e6 << " ms"; + LOG(info) << "CA tracker process time slice " << statTsStart / 1.e6 << " ms ... " << statTsEnd / 1.e6 << " ms with " + << statNhitsTotal << " hits"; if (statTsEnd > statTsStart + 500.e6) { // 500 ms maximal length of the TS statTsEnd = statTsStart + 500.e6; @@ -195,8 +199,10 @@ void TrackFinder::FindTracks() for (ca::HitIndex_t caHitId = sliceFirstHit[iStream]; caHitId < frAlgo.fInputData.GetStreamStopIndex(iStream); ++caHitId) { + CaHitTimeInfo& info = frAlgo.fHitTimeInfo[caHitId]; const ca::Hit& h = frAlgo.fInputData.GetHit(caHitId); + if (frAlgo.fvHitKeyFlags[h.FrontKey()] || frAlgo.fvHitKeyFlags[h.BackKey()]) { // the hit is already reconstructed continue; @@ -216,6 +222,7 @@ void TrackFinder::FindTracks() // this hit and all hits before are before the overlap sliceFirstHit[iStream] = caHitId + 1; } + //LOG(warning) << "event time " << ((float) info.fEventTimeMax )<< " " << h.ToString(); } } // else the hit has been alread processed in previous sub-slices } @@ -229,8 +236,8 @@ void TrackFinder::FindTracks() statLastLogTimeChunk = currentChunk; LOG(info) << "CA tracker process sliding window N " << statNwindows << ": time " << tsStart / 1.e6 << " ms + " << tsLength / 1.e3 << " us) with " << statNwindowHits << " hits. " - << " Processed " << 100. * tsStart / (statTsEnd - statTsStart) << " % of the TS time and " - << 100. * statNhitsProcessed / statNhitsTotal << " % of TS hits"; + << " Processing " << 100. * (tsStart + tsLength - statTsStart) / (statTsEnd - statTsStart) + << " % of the TS time and " << 100. * statNhitsProcessed / statNhitsTotal << " % of TS hits"; } }