67 G4cout <<
"G4ChordFinderSaf statistics report: " <<
G4endl;
100 if( MagSqShift <
sqr(safetyRadius) ){
101 pointSafety = safetyRadius - std::sqrt(MagSqShift) ;
114 return ( OriginShift.
mag2() < safetyRadius*safetyRadius );
131 G4double stepTrial, stepForAccuracy;
138 G4bool validEndPoint=
false;
139 G4double dChordStep, lastStepLength;
153 likelyGood = std::max( startSafety ,
156 stepTrial = std::min( stepMax, likelyGood );
167 dChordStep, dyErrPos);
171 G4bool endPointInSafetySphere=
176 || endPointInSafetySphere;
179 lastStepLength = stepTrial;
182 stepForChord =
NewStep(stepTrial, dChordStep, newStepEst_Uncons );
184 if( ! validEndPoint ) {
186 stepTrial = stepForChord;
187 else if (stepForChord <= stepTrial)
189 stepTrial = std::min( stepForChord,
202 while( ! validEndPoint );
207 if( newStepEst_Uncons > 0.0 ){
213 if( pStepForAccuracy ){
215 G4double dyErr_relative = dyErrPos/(epsStep*lastStepLength);
216 if( dyErr_relative > 1.0 ) {
221 stepForAccuracy = 0.0;
223 *pStepForAccuracy = stepForAccuracy;
226 #ifdef TEST_CHORD_PRINT
229 G4cout <<
"ChordF/FindNextChord: NoTrials= " << noTrials
230 <<
" StepForGoodChord=" << std::setw(10) << stepTrial <<
G4endl;