Skip to content

Commit b1b62d5

Browse files
authored
Merge pull request #591 from SBNSoftware/feature/sungbino_debug_same_start_end_v10_06_00_05
Bug fix for the exactly the same start and end positions for particles from neutrino interactions in AV - To release/SBN2025A
2 parents 5922ea0 + 29ce7ad commit b1b62d5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sbncode/CAFMaker/FillTrue.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,9 @@ namespace caf {
776776
if (exit_point < 0 && entry_point >= 0) {
777777
exit_point = particle.NumberTrajectoryPoints() - 1;
778778
}
779+
if (exit_point >= 0 && entry_point >=0 && exit_point == entry_point && exit_point < static_cast<int>(particle.NumberTrajectoryPoints()) - 1){
780+
exit_point++; // to avoid exactly the same start and end positions when single index is inside the active volumne
781+
}
779782
if (exit_point >= 0 && ((unsigned)exit_point) < particle.NumberTrajectoryPoints() - 1) {
780783
srparticle.wallout = sbn::GetWallCross(active_volumes.at(cryostat_index), particle.Position(exit_point).Vect(), particle.Position(exit_point+1).Vect());
781784
}

0 commit comments

Comments
 (0)