We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5922ea0 + 29ce7ad commit b1b62d5Copy full SHA for b1b62d5
1 file changed
sbncode/CAFMaker/FillTrue.cxx
@@ -776,6 +776,9 @@ namespace caf {
776
if (exit_point < 0 && entry_point >= 0) {
777
exit_point = particle.NumberTrajectoryPoints() - 1;
778
}
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
+ }
782
if (exit_point >= 0 && ((unsigned)exit_point) < particle.NumberTrajectoryPoints() - 1) {
783
srparticle.wallout = sbn::GetWallCross(active_volumes.at(cryostat_index), particle.Position(exit_point).Vect(), particle.Position(exit_point+1).Vect());
784
0 commit comments