Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagErrorStepper.cc,v 1.6 1999/12/15 14:49:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4MagErrorStepper.cc,v 1.7 2000/05/09 11:41:00 japost Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#include "G4MagErrorStepper.hh"
#include "G4ThreeVector.hh"
@@ -61,11 +61,26 @@ G4MagErrorStepper::Stepper( const G4double yInput[],
G4double
G4MagErrorStepper::DistChord() const
{
// Soon: must check whether h/R > 2 pi !!
// Method below is good only for < 2 pi
// Estimate the maximum distance from the curve to the chord
//
// We estimate this using the distance of the midpoint to
// chord (the line between
//
// Method below is good only for angle deviations < 2 pi,
// This restriction should not a problem for the Runge cutta methods,
// which generally cannot integrate accurately for large angle deviations.
G4double distLine, distChord;
return G4LineSection::Distline( fMidPoint, fInitialPoint, fFinalPoint );
// This is a class method that gives distance of Mid
// from the Chord between the Initial and Final points.
if (fInitialPoint != fFinalPoint) {
distLine= G4LineSection::Distline( fMidPoint, fInitialPoint, fFinalPoint );
// This is a class method that gives distance of Mid
// from the Chord between the Initial and Final points.
distChord = distLine;
}else{
distChord = (fMidPoint-fInitialPoint).mag();
}
return distChord;
}