@@ -59,8 +59,11 @@ int HitMapBuilder::getEffFlag(const std::vector<int>& firedRPCLines, const std::
5959
6060int HitMapBuilder::getLocId (double xp, double yp, uint8_t deId) const
6161{
62- auto stripIndex = mMapping .stripByPosition (xp, yp, 0 , deId);
63- return mMapping .getBoardId (stripIndex.line , stripIndex.column , deId);
62+ auto stripIndex = mMapping .stripByPosition (xp, yp, 0 , deId, false );
63+ if (stripIndex.isValid ()) {
64+ return mMapping .getBoardId (stripIndex.line , stripIndex.column , deId);
65+ }
66+ return 0 ;
6467}
6568
6669void HitMapBuilder::buildTrackInfo (Track& track, gsl::span<const Cluster> clusters) const
@@ -69,7 +72,7 @@ void HitMapBuilder::buildTrackInfo(Track& track, gsl::span<const Cluster> cluste
6972 std::vector<int > firedDeIds, firedRPCLines, nonFiredRPCLines;
7073 bool outsideAcceptance = false ;
7174 for (int ich = 0 ; ich < 4 ; ++ich) {
72- auto icl = track.getClusterMatched (ich);
75+ auto icl = track.getClusterMatchedUnchecked (ich);
7376 if (icl >= 0 ) {
7477 auto & cl = clusters[icl];
7578 firedDeIds.emplace_back (cl.deId );
0 commit comments