Skip to content
Snippets Groups Projects
Commit 506ae170 authored by Sergey Gorbunov's avatar Sergey Gorbunov
Browse files

CA: fix to run with the new MVD code

parent 5586ca22
No related branches found
No related tags found
1 merge request!1576CA: fix to run with the new MVD code
Pipeline #26378 passed
......@@ -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) {
static int tmp = 0;
if (tmp < 10000) {
tmp++;
LOG(warning) << "\n\n stream " << iStream << " hits " << nStreamHits << "\n\n";
for (int ih = 0; ih < nStreamHits; ++ih) {
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() == 2) {
static int tmp = 0;
if (h.Station() < 4) {
tmp++;
if (tmp < 10000) {
LOG(warning) << " hit sta " << h.Station() << " stream " << iStream << " time " << info.fEventTimeMin
<< " min time after hit " << info.fMinTimeAfterHit;
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 ";
}
}
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment