diff --git a/algo/ca/core/tracking/CaTrackFinder.cxx b/algo/ca/core/tracking/CaTrackFinder.cxx index eb033b402a531469394b9e68e531d56db715331c..8c231c174b9434af8e86607617695eff3dd9d82e 100644 --- a/algo/ca/core/tracking/CaTrackFinder.cxx +++ b/algo/ca/core/tracking/CaTrackFinder.cxx @@ -123,8 +123,8 @@ void TrackFinder::FindTracks() info.fEventTimeMax = h.T() + dt - timeOfFlightMin; if (!st.timeInfo) { - info.fEventTimeMin = std::numeric_limits<fscal>::lowest(); - info.fEventTimeMax = std::numeric_limits<fscal>::max(); + info.fEventTimeMin = -1.e10; + info.fEventTimeMax = 1.e10; } if (info.fEventTimeMin > 500 * 1.e6) { // cut hits with bogus start time > 500 ms @@ -164,20 +164,22 @@ void TrackFinder::FindTracks() } if (0) { - LOG(warning) << "\n\n stream " << iStream << " hits " << nStreamHits << "\n\n"; - for (int ih = 0; ih < nStreamHits; ++ih) { - ca::HitIndex_t caHitId = frAlgo.fInputData.GetStreamStartIndex(iStream) + ih; - 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 (h.Station() == 2) { - static int tmp = 0; - tmp++; - if (tmp < 10000) { - LOG(warning) << " hit sta " << h.Station() << " stream " << iStream << " time " << info.fEventTimeMin - << " min time after hit " << info.fMinTimeAfterHit; + static int tmp = 0; + if (tmp < 10000) { + tmp++; + LOG(warning) << "\n\n stream " << iStream << " hits " << nStreamHits << "\n\n"; + for (int ih = 0; (ih < nStreamHits) && (tmp < 10000); ++ih) { + ca::HitIndex_t caHitId = frAlgo.fInputData.GetStreamStartIndex(iStream) + ih; + 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 (h.Station() < 4) { + tmp++; + LOG(warning) << " hit sta " << h.Station() << " stream " << iStream << " time " << h.T() << " event time " + << info.fEventTimeMin << " .. " << info.fEventTimeMax << " max time before hit " + << info.fMaxTimeBeforeHit << " min time after hit " << info.fMinTimeAfterHit; } } } @@ -186,13 +188,17 @@ void TrackFinder::FindTracks() statTsStart = tsStart; - LOG(info) << "CA tracker process time slice " << statTsStart / 1.e6 << " ms ... " << statTsEnd / 1.e6 << " ms with " - << statNhitsTotal << " hits"; + if (statTsEnd < statTsStart) { // all hits belong to one sub-timeslice + // statTsEnd = statTsStart; + } if (statTsEnd > statTsStart + 500.e6) { // 500 ms maximal length of the TS statTsEnd = statTsStart + 500.e6; } + LOG(info) << "CA tracker process time slice " << statTsStart / 1.e6 << " ms ... " << statTsEnd / 1.e6 << " ms with " + << statNhitsTotal << " hits"; + // cut data into sub-timeslices and process them one by one bool areUntouchedDataLeft = true; // is the whole TS processed @@ -260,11 +266,15 @@ void TrackFinder::FindTracks() int currentChunk = (int) ((tsStart - statTsStart) / 10.e6); if (!areUntouchedDataLeft || currentChunk > statLastLogTimeChunk) { statLastLogTimeChunk = currentChunk; + double dataRead = 100. * (tsStart + tsLength - statTsStart) / (statTsEnd - statTsStart); + if (dataRead > 100.) { + dataRead = 100.; + } LOG(info) << "CA tracker process sliding window N " << statNwindows << ": time " << tsStart / 1.e6 << " ms + " << tsLength / 1.e3 << " us) with " << statNwindowHits << " hits. " - << " Processing " << 100. * (tsStart + tsLength - statTsStart) / (statTsEnd - statTsStart) - << " % of the TS time and " << 100. * statNhitsProcessed / statNhitsTotal << " % of TS hits." - << " Reconstructed " << frAlgo.fRecoTracks.size() << " tracks "; + << " Processing " << dataRead << " % of the TS time and " + << 100. * statNhitsProcessed / statNhitsTotal << " % of TS hits." + << " Already reconstructed " << frAlgo.fRecoTracks.size() << " tracks "; } } diff --git a/core/detectors/mvd/CbmMvdTrackingInterface.h b/core/detectors/mvd/CbmMvdTrackingInterface.h index 89e0f4a8001f4a80ca3bd8014a7a0b7da74e7d74..6160a8dcdeaeb299b3e41d2bc7e241df77d1e670 100644 --- a/core/detectors/mvd/CbmMvdTrackingInterface.h +++ b/core/detectors/mvd/CbmMvdTrackingInterface.h @@ -150,7 +150,7 @@ public: /// @brief Check if the detector provides time measurements /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Flag: true - station provides time measurements, false - station does not provide time measurements - bool IsTimeInfoProvided(int /*stationId*/) const { return false; } + bool IsTimeInfoProvided(int /*stationId*/) const { return true; } /// @brief FairTask: ReInit method InitStatus ReInit();