diff --git a/reco/eventbuilder/digis/CbmBuildEventsQa.cxx b/reco/eventbuilder/digis/CbmBuildEventsQa.cxx index 19f90cf35ce3bf42e088395ac85a22adbeec0ab2..3827f0520e5ff085a1e144f82f20929ee3943943 100644 --- a/reco/eventbuilder/digis/CbmBuildEventsQa.cxx +++ b/reco/eventbuilder/digis/CbmBuildEventsQa.cxx @@ -190,7 +190,7 @@ void CbmBuildEventsQa::Exec(Option_t*) LOG(info) << ""; MatchEvent(event); if (event->GetMatch()->GetNofLinks() < 1) { - LOG(warning) << "No links in this event match object, skipping the event"; + LOG(info) << "Warning: No links in this event match object. Skipping event # " << event->GetNumber(); continue; } // if (-1 == event->GetMatch()->GetNofLinks()) int matchedMcEventNr = event->GetMatch()->GetMatchedLink().GetEntry(); @@ -247,6 +247,9 @@ void CbmBuildEventsQa::Exec(Option_t*) if (digiMatch->GetMatchedLink().GetEntry() == matchedMcEventNr) nDigisCorrect++; if (digiMatch->GetMatchedLink().GetEntry() == -1) nDigisNoise++; } + else { + nDigisNoise++; + } for (int iLink = 0; iLink < digiMatch->GetNofLinks(); iLink++) { int entry = digiMatch->GetLink(iLink).GetEntry(); diff --git a/reco/eventbuilder/digis/CbmSeedFinderSlidingWindow.cxx b/reco/eventbuilder/digis/CbmSeedFinderSlidingWindow.cxx index 22172ba2316b33884ae74360cb221feec92a10e4..1bc8c3e29fb5aaf117652fed2ebd181d6d1e8e76 100644 --- a/reco/eventbuilder/digis/CbmSeedFinderSlidingWindow.cxx +++ b/reco/eventbuilder/digis/CbmSeedFinderSlidingWindow.cxx @@ -132,6 +132,11 @@ void CbmSeedFinderSlidingWindow::FillEventMatch(int32_t WinStart, int32_t WinEnd for (int32_t iDigi = WinStart; iDigi <= WinEnd; iDigi++) { const CbmMatch* digiMatch = &(vDigiMatch->at(iDigi)); digiCount++; + if (digiMatch->GetNofLinks() == 0) { + //skip digis with no links to avoid T0 pollution + noiseDigiCount++; + continue; + } if (digiMatch->GetMatchedLink().GetEntry() == -1) { noiseDigiCount++; continue; //disregard noise digis @@ -166,7 +171,8 @@ void CbmSeedFinderSlidingWindow::FillEventMatch(int32_t WinStart, int32_t WinEnd //correct digis in seed window for (int32_t iDigi = WinStart; iDigi <= WinEnd; iDigi++) { const CbmMatch* digiMatch = &(vDigiMatch->at(iDigi)); - const int32_t entry = digiMatch->GetMatchedLink().GetEntry(); + if (digiMatch->GetNofLinks() == 0) { continue; } //skip digis with no links to avoid T0 pollution + const int32_t entry = digiMatch->GetMatchedLink().GetEntry(); if (entry != -1) // disregarding noise { if (entry == seedMatch.GetMatchedLink().GetEntry()) { correctDigiCount++; } @@ -178,7 +184,8 @@ void CbmSeedFinderSlidingWindow::FillEventMatch(int32_t WinStart, int32_t WinEnd //found digis of matched event in seed window for (uint32_t iDigi = 0; iDigi < vDigiMatch->size(); iDigi++) { const CbmMatch* digiMatch = &(vDigiMatch->at(iDigi)); - const int matchedEvent = digiMatch->GetMatchedLink().GetEntry(); + if (digiMatch->GetNofLinks() == 0) { continue; } //skip digis with no links to avoid T0 pollution + const int matchedEvent = digiMatch->GetMatchedLink().GetEntry(); if (matchedEvent == seedMatch.GetMatchedLink().GetEntry()) { matchedEventDigiCount++; } } const double foundDigiRatio = (double) correctDigiCount / matchedEventDigiCount;