Warning, /eic-spack/spack_repo/eic/packages/geant4/G4Sphere-theta-cone-parallel.patch is written in an unsupported language. File is not indexed.
0001 --- a/source/geometry/solids/CSG/src/G4Sphere.cc
0002 +++ b/source/geometry/solids/CSG/src/G4Sphere.cc
0003 @@ -1917,8 +1917,12 @@
0004 return snxt = 0.;
0005 }
0006 }
0007 - stheta = -0.5*dist2STheta/t2;
0008 - sidetheta = kSTheta;
0009 + sd = -0.5*dist2STheta/t2;
0010 + if ( sd >= 0. ) // ignore root behind the starting point
0011 + {
0012 + stheta = sd;
0013 + sidetheta = kSTheta;
0014 + }
0015 }
0016 } // 2nd order equation, 1st root of fSTheta cone,
0017 else // 2nd if 1st root -ve
0018 @@ -2052,7 +2056,7 @@
0019 }
0020 sd = -0.5*dist2ETheta/t2;
0021
0022 - if( sd < stheta )
0023 + if( (sd >= 0.) && (sd < stheta) ) // ignore root behind the start
0024 {
0025 stheta = sd;
0026 sidetheta = kETheta;