Skip to content
Snippets Groups Projects
Commit 6f097990 authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

cbmreco: Dump TOF Hits and Tracks from archives.

parent d330f18b
No related branches found
No related tags found
1 merge request!1479cbmreco: Dump TOF Hits and Tracks from archives.
Pipeline #25397 passed
...@@ -43,6 +43,7 @@ bool dumpArchive(const Options& opts) ...@@ -43,6 +43,7 @@ bool dumpArchive(const Options& opts)
// Limit the number of events per timeslice to dump to avoid spamming the log // Limit the number of events per timeslice to dump to avoid spamming the log
constexpr size_t DumpEventsPerTS = 10; constexpr size_t DumpEventsPerTS = 10;
constexpr size_t DumpHitsPerSensor = 2; constexpr size_t DumpHitsPerSensor = 2;
constexpr size_t DumpTracksPerTS = 10;
if (!opts.DumpArchive()) return false; if (!opts.DumpArchive()) return false;
...@@ -64,7 +65,8 @@ bool dumpArchive(const Options& opts) ...@@ -64,7 +65,8 @@ bool dumpArchive(const Options& opts)
size_t nEvents = recoResults->DigiEvents().size(); size_t nEvents = recoResults->DigiEvents().size();
L_(info) << "TS " << recoResults->TsIndex() << " start: " << recoResults->TsStartTime() << " events: " << nEvents L_(info) << "TS " << recoResults->TsIndex() << " start: " << recoResults->TsStartTime() << " events: " << nEvents
<< ", stsHits: " << recoResults->StsHits().NElements(); << ", stsHits: " << recoResults->StsHits().NElements()
<< ", tofHits: " << recoResults->TofHits().NElements() << ", tracks: " << recoResults->Tracks().size();
for (size_t i = 0; i < std::min(DumpEventsPerTS, nEvents); i++) { for (size_t i = 0; i < std::min(DumpEventsPerTS, nEvents); i++) {
const auto& digiEvent = recoResults->DigiEvents().at(i); const auto& digiEvent = recoResults->DigiEvents().at(i);
...@@ -85,7 +87,26 @@ bool dumpArchive(const Options& opts) ...@@ -85,7 +87,26 @@ bool dumpArchive(const Options& opts)
} }
} }
if (nEvents > DumpEventsPerTS) L_(info) << "..."; L_(info) << "...";
auto tofHits = recoResults->TofHits();
for (size_t m = 0; m < tofHits.NPartitions(); m++) {
auto [hits, address] = tofHits.Partition(m);
for (size_t i = 0; i < std::min(DumpHitsPerSensor, hits.size()); i++) {
const auto& hit = hits[i];
L_(info) << " - TOF Hit " << i << " sensor: " << address << "; time: " << hit.Time() << ", X: " << hit.X()
<< ", Y: " << hit.Y() << ", Z: " << hit.Z();
}
}
L_(info) << "...";
auto& tracks = recoResults->Tracks();
for (size_t t = 0; t < std::min(tracks.size(), DumpTracksPerTS); t++) {
const auto& track = tracks[t];
L_(info) << " - Track " << t << " nHits: " << track.fNofHits << ", chi2: " << track.fParPV.ChiSq()
<< ", X: " << track.fParPV.X() << ", Y: " << track.fParPV.Y() << ", Z: " << track.fParPV.Z();
}
} }
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment