We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6dd913 commit 3984fc0Copy full SHA for 3984fc0
sbncode/CAFMaker/FillTrue.cxx
@@ -777,6 +777,9 @@ namespace caf {
777
if (exit_point < 0 && entry_point >= 0) {
778
exit_point = particle.NumberTrajectoryPoints() - 1;
779
}
780
+ if(exit_point >= 0 && entry_point >=0 && exit_point == entry_point && exit_point < static_cast<int>(particle.NumberTrajectoryPoints()) - 1){
781
+ exit_point++; // to avoid exactly the same start and end positions when single index is inside the active volumne
782
+ }
783
if (exit_point >= 0 && ((unsigned)exit_point) < particle.NumberTrajectoryPoints() - 1) {
784
srparticle.wallout = GetWallCross(active_volumes.at(cryostat_index), particle.Position(exit_point).Vect(), particle.Position(exit_point+1).Vect());
785
0 commit comments