@@ -577,7 +577,7 @@ void DigitizationContext::applyMaxCollisionFilter(std::vector<std::tuple<int, in
577577 if (indices_old_to_new.find (lastindex) != indices_old_to_new.end ()) {
578578 std::get<1 >(tf_indices) = indices_old_to_new[lastindex]; // end;
579579 } else {
580- std::get<1 >(tf_indices) = newrecords.size (); // end;
580+ std::get<1 >(tf_indices) = newrecords.size () - 1 ; // end; -1 since index inclusif
581581 }
582582 if (indices_old_to_new.find (previndex) != indices_old_to_new.end ()) {
583583 std::get<2 >(tf_indices) = indices_old_to_new[previndex]; // previous or "early" index
@@ -591,11 +591,6 @@ void DigitizationContext::applyMaxCollisionFilter(std::vector<std::tuple<int, in
591591std::vector<std::tuple<int , int , int >> DigitizationContext::calcTimeframeIndices (long startOrbit, long orbitsPerTF, double orbitsEarly) const
592592{
593593 auto timeframeindices = getTimeFrameBoundaries (mEventRecords , startOrbit, orbitsPerTF, orbitsEarly);
594- LOG (info) << " Fixed " << timeframeindices.size () << " timeframes " ;
595- for (auto p : timeframeindices) {
596- LOG (info) << std::get<0 >(p) << " " << std::get<1 >(p) << " " << std::get<2 >(p);
597- }
598-
599594 return timeframeindices;
600595}
601596
@@ -708,7 +703,7 @@ DigitizationContext DigitizationContext::extractSingleTimeframe(int timeframeid,
708703 auto tf_ranges = timeframeindices.at (timeframeid);
709704
710705 auto startindex = std::get<0 >(tf_ranges);
711- auto endindex = std::get<1 >(tf_ranges);
706+ auto endindex = std::get<1 >(tf_ranges) + 1 ;
712707 auto earlyindex = std::get<2 >(tf_ranges);
713708
714709 if (earlyindex >= 0 ) {
0 commit comments