Skip to content
Snippets Groups Projects

Ca: extra checks for the input hits

Merged Sergey Gorbunov requested to merge se.gorbunov/cbmroot:mvdFix into master
All threads resolved!
Files
12
@@ -112,6 +112,9 @@ namespace cbm::algo::ca
/// \param detectorID ID of the detector subsystem
[[gnu::always_inline]] int GetStationIndexGeometry(int localIndex, EDetectorID detectorID) const
{
if (localIndex >= GetNstationsGeometry(detectorID)) {
return -1;
}
return fvLocalToGeoIdMap[fvFirstGeoId[static_cast<int>(detectorID)] + localIndex];
}
@@ -120,7 +123,8 @@ namespace cbm::algo::ca
/// \param detectorID ID of the detector subsystem
[[gnu::always_inline]] int GetStationIndexActive(int localIndex, EDetectorID detectorID) const
{
return fvGeoToActiveMap[GetStationIndexGeometry(localIndex, detectorID)];
int geoIndex = GetStationIndexGeometry(localIndex, detectorID);
return (geoIndex < 0) ? -1 : fvGeoToActiveMap[geoIndex];
}
/// \brief Provides access to L1CAIteration vector (const)
Loading