Import Geant4 1.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:28:20 +02:00
parent aaa409b6ee
commit ca1c8cb059
2995 changed files with 106830 additions and 299600 deletions
+13 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.12 1999/07/06 20:48:55 japost Exp $
$Id: History,v 1.15 1999/12/07 11:42:04 japost Exp $
-------------------------------------------------------------------
=========================================================
@@ -16,6 +16,18 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
December 7th, 1999 J. Apostolakis - field-V00-01-01a
For negative or very small curve lengths (h) we suppress writing an error
(about the distance of endpoints being further than the curve length),
as it is meaningless.
November 23rd, 1999 J. Apostolakis - field-V00-01-01
Tagged this sub-category's state in geometry-V00-01-01
July 6th, 1999 J. Apostolakis - field-01-00-07
These fixes and those in field-01-00-06 and field-01-00-06a all come
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4CashKarpRKF45.hh,v 1.1 1999/01/07 16:07:00 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4CashKarpRKF45.hh,v 1.1.10.1 1999/12/07 20:47:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// J.Apostolakis, V.Grichine 30.1.97
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ChordFinder.hh,v 1.1 1999/01/07 16:07:01 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ChordFinder.hh,v 1.1.10.1 1999/12/07 20:47:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// ------------------------------------------------------------------------
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ClassicalRK4.hh,v 1.1 1999/01/07 16:07:01 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ClassicalRK4.hh,v 1.1.10.1 1999/12/07 20:47:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// J.Apostolakis, V.Grichine 30.1.97
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ElectroMagneticField.hh,v 1.1 1999/01/07 16:07:01 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ElectroMagneticField.hh,v 1.1.10.1 1999/12/07 20:47:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// A full Electromagnetic field, containing both electric and magnetic fields.
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4EqMagElectricField.hh,v 1.1 1999/01/07 16:07:01 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4EqMagElectricField.hh,v 1.1.10.1 1999/12/07 20:47:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// This is the right-hand side of equation of motion in a combined
// electric and magnetic field.
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4EquationOfMotion.hh,v 1.1 1999/01/07 16:07:01 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4EquationOfMotion.hh,v 1.1.10.1 1999/12/07 20:47:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// Abstract Base Class for:
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4EquationOfMotion.icc,v 1.1 1999/01/07 16:07:01 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4EquationOfMotion.icc,v 1.1.10.1 1999/12/07 20:47:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Inline implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExplicitEuler.hh,v 1.1 1999/01/07 16:07:02 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ExplicitEuler.hh,v 1.1.10.1 1999/12/07 20:47:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// W. Wander <wwc@mit.edu> 12/09/97
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Field.hh,v 1.1 1999/01/07 16:07:02 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Field.hh,v 1.1.10.1 1999/12/07 20:47:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// G4Field:
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FieldManager.hh,v 1.1 1999/01/07 16:07:02 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4FieldManager.hh,v 1.1.10.1 1999/12/07 20:47:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FieldTrack.hh,v 1.1 1999/01/07 16:07:02 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4FieldTrack.hh,v 1.1.10.1 1999/12/07 20:48:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Data structure bringing together a magnetic track's state.
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FieldTrack.icc,v 1.1 1999/01/07 16:07:02 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4FieldTrack.icc,v 1.1.10.1 1999/12/07 20:48:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "PhysicalConstants.h"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HelixExplicitEuler.hh,v 1.1 1999/01/07 16:07:03 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4HelixExplicitEuler.hh,v 1.1.10.1 1999/12/07 20:48:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// W. Wander <wwc@mit.edu> 12/09/97
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HelixHeum.hh,v 1.1 1999/01/07 16:07:03 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4HelixHeum.hh,v 1.1.10.1 1999/12/07 20:48:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// W. Wander <wwc@mit.edu> 03/11/98
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HelixImplicitEuler.hh,v 1.1 1999/01/07 16:07:03 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4HelixImplicitEuler.hh,v 1.1.10.1 1999/12/07 20:48:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// W. Wander <wwc@mit.edu> 03/11/98
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HelixSimpleRunge.hh,v 1.1 1999/01/07 16:07:03 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4HelixSimpleRunge.hh,v 1.1.10.1 1999/12/07 20:48:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// W. Wander <wwc@mit.edu> 03/12/98
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ImplicitEuler.hh,v 1.1 1999/01/07 16:07:04 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ImplicitEuler.hh,v 1.1.10.1 1999/12/07 20:48:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// W. Wander <wwc@mit.edu> 12/09/97
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LineSection.hh,v 1.1 1999/01/07 16:07:04 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4LineSection.hh,v 1.1.10.1 1999/12/07 20:48:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// A utility class that calculates the distance of a point from a
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagErrorStepper.hh,v 1.4 1999/04/19 17:20:28 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagErrorStepper.hh,v 1.4.8.1 1999/12/07 20:48:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// Abstract base class (ie Interface)
// -------------------
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagErrorStepper.icc,v 1.4 1999/04/19 17:20:29 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagErrorStepper.icc,v 1.4.8.1 1999/12/07 20:48:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
inline G4MagErrorStepper::G4MagErrorStepper(G4Mag_EqRhs *EqRhs,
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagHelicalStepper.hh,v 1.1 1999/01/07 16:07:04 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagHelicalStepper.hh,v 1.1.10.1 1999/12/07 20:48:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// Started from G4MagErrorStepper.hh
//
// Abstract base class (ie Interface)
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagHelicalStepper.icc,v 1.1 1999/01/07 16:07:04 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagHelicalStepper.icc,v 1.1.10.1 1999/12/07 20:48:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// linear Step in regions of no field
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagIntegratorDriver.hh,v 1.1 1999/01/07 16:07:05 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagIntegratorDriver.hh,v 1.3.6.1 1999/12/07 20:48:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// Provides Driver that talks to Integrator Stepper, and insures that
// the error is within acceptable bounds.
@@ -49,7 +49,8 @@ class G4MagInt_Driver
// Access functions
// ----------------
//
G4double Hmin(){ return hminimum_val;}
G4double GetHmin(){ return hminimum_val;}
G4double Hmin() { return hminimum_val;} // Obsolete
G4double GetSafety(){ return safety; }
G4double GetPshrnk(){ return pshrnk;}
G4double GetPgrow(){ return pgrow;}
@@ -121,12 +122,29 @@ class G4MagInt_Driver
G4double ComputeNewStepSize_WithinLimits(
G4double errMaxNorm, // normalised error
G4double hstepCurrent); // current step size
private:
G4int GetMaxNoSteps();
void SetMaxNoSteps( G4int val);
protected:
// Issue warnings for undesirable situations
void WarnSmallStepSize( G4double hnext, G4double hstep,
G4double h, G4double xDone,
G4int noSteps);
void WarnTooManyStep( G4double x1start, G4double x2end, G4double xCurrent);
void WarnEndPointTooFar (G4double endPointDist,
G4double hStepSize ,
G4double epsilonRelative,
G4int debugFlag);
private:
G4double hminimum_val; // Minimum Step allowed in a Step
const G4int nvar;
G4MagIntegratorStepper *pIntStepper;
G4int fMaxNoSteps;
static const G4int fMaxStepBase;
// Parameters used to grow and shrink trial stepsize
G4double safety;
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagIntegratorDriver.icc,v 1.1 1999/01/07 16:07:05 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagIntegratorDriver.icc,v 1.2.6.1 1999/12/07 20:48:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
inline G4double G4MagInt_Driver::ComputeAndSetErrcon()
{
@@ -63,11 +63,18 @@ inline G4MagInt_Driver::G4MagInt_Driver( G4double hminimum,
{
RenewStepperAndAdjust( pItsStepper );
hminimum_val= hminimum;
fMaxNoSteps = fMaxStepBase / pIntStepper->IntegratorOrder();
}
inline G4MagIntegratorStepper* G4MagInt_Driver::GetStepper()
{ return pIntStepper; }
inline G4int G4MagInt_Driver::GetMaxNoSteps()
{ return fMaxNoSteps; }
inline void G4MagInt_Driver::SetMaxNoSteps(G4int val)
{ fMaxNoSteps= val; }
inline void G4MagInt_Driver::GetDerivatives(
const G4FieldTrack y_curr, // const, INput
G4double dydx[] ) // OUTput
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagIntegratorStepper.hh,v 1.2 1999/02/12 12:28:40 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagIntegratorStepper.hh,v 1.2.8.1 1999/12/07 20:48:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// Abstract base class (ie Interface)
// -------------------
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagIntegratorStepper.icc,v 1.2 1999/02/12 12:28:40 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagIntegratorStepper.icc,v 1.2.8.1 1999/12/07 20:48:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
inline G4EquationOfMotion* G4MagIntegratorStepper::GetEquationOfMotion() const
{ return fEquation_Rhs; }
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Mag_EqRhs.hh,v 1.2 1999/02/12 12:29:42 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Mag_EqRhs.hh,v 1.2.8.1 1999/12/07 20:48:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// The right hand size of the equation of motion of a particle
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Mag_UsualEqRhs.hh,v 1.1 1999/01/07 16:07:05 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Mag_UsualEqRhs.hh,v 1.1.10.1 1999/12/07 20:48:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// This is the standard right-hand side for equation of motion.
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagneticField.hh,v 1.1 1999/01/07 16:07:06 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagneticField.hh,v 1.1.10.1 1999/12/07 20:48:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Magnetic Field abstract class, implements inquiry function interface.
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4RKG3_Stepper.hh,v 1.2 1999/02/12 12:30:39 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4RKG3_Stepper.hh,v 1.2.8.1 1999/12/07 20:48:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// J.Apostolakis, V.Grichine 30.01.97
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4SimpleHeum.hh,v 1.1 1999/01/07 16:07:07 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4SimpleHeum.hh,v 1.1.10.1 1999/12/07 20:48:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// W. Wander <wwc@mit.edu> 12/09/97
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4SimpleRunge.hh,v 1.1 1999/01/07 16:07:07 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4SimpleRunge.hh,v 1.1.10.1 1999/12/07 20:48:03 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// W. Wander <wwc@mit.edu> 12/09/97
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UniformElectricField.hh,v 1.1 1999/01/07 16:07:07 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4UniformElectricField.hh,v 1.1.10.1 1999/12/07 20:48:03 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UniformMagField.hh,v 1.1 1999/01/07 16:07:07 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4UniformMagField.hh,v 1.1.10.1 1999/12/07 20:48:03 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4CashKarpRKF45.cc,v 1.3 1999/03/04 13:52:31 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4CashKarpRKF45.cc,v 1.3.8.1 1999/12/07 20:48:03 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// The Cash-Karp Runge-Kutta-Fehlberg 4/5 method is an embedded fourth
// order method (giving fifth-order accuracy) for the solution
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ChordFinder.cc,v 1.6 1999/07/12 09:36:17 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ChordFinder.cc,v 1.8.6.1 1999/12/07 20:48:04 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// 25.02.97 John Apostolakis, design and implimentation
@@ -75,7 +75,7 @@ G4ChordFinder::AdvanceChordLimited( G4FieldTrack& yCurrent,
G4double stepPossible;
G4double dyErr;
G4FieldTrack yEnd( yCurrent);
G4double startCurveLen= yCurrent.GetCurveLength();
G4bool dbg= false;
#ifdef G4VERBOSE
@@ -85,23 +85,30 @@ G4ChordFinder::AdvanceChordLimited( G4FieldTrack& yCurrent,
#endif
stepPossible= FindNextChord(yCurrent, stepMax, yEnd, dyErr, epsStep);
G4bool good_advance;
if ( dyErr < epsStep * stepPossible )
{
// Accept this accuracy.
yCurrent = yEnd;
good_advance = true;
}
else
{
// Advance more accurately to "end of chord"
#ifdef G4VERBOSE
if (dbg) G4cerr << "Accurate advance to end of chord needed\n";
#endif
fIntgrDriver->AccurateAdvance(yCurrent, stepPossible, epsStep);
good_advance = fIntgrDriver->AccurateAdvance(yCurrent, stepPossible, epsStep);
#ifdef G4VERBOSE
if (dbg) G4cerr << "Accurate advance to end of chord attemped"
<< "with result " << good_advance << endl ;
#endif
if ( ! good_advance ){
// In this case the driver could not do the full distance
stepPossible= yCurrent.GetCurveLength()-startCurveLen;
}
}
#ifdef G4VERBOSE
if( dbg ) G4cerr << "Exiting FindNextChord Limited with:\n yCurrent: "
<< yCurrent<< endl;
<< yCurrent<< endl;
#endif
return stepPossible;
@@ -282,11 +289,13 @@ G4FieldTrack G4ChordFinder::ApproxCurvePointV(
new_st_length= AE_fraction * curve_length;
G4bool good_advance;
if ( AE_fraction > 0.0 ) {
G4bool good_advance =
good_advance =
fIntgrDriver->AccurateAdvance(Current_PointVelocity,
new_st_length,
eps_step/AE_fraction ); // Relative accuracy
eps_step ); // Relative accuracy
// In this case it does not matter if it cannot advance the full distance
}
// If there was a memory of the step_length actually require at the start
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ClassicalRK4.cc,v 1.1 1999/01/07 16:07:08 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ClassicalRK4.cc,v 1.1.10.1 1999/12/07 20:48:04 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4ClassicalRK4.hh"
#include "G4ThreeVector.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4EquationOfMotion.cc,v 1.1 1999/01/07 16:07:08 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4EquationOfMotion.cc,v 1.1.10.1 1999/12/07 20:48:04 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4EquationOfMotion.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExplicitEuler.cc,v 1.1 1999/01/07 16:07:08 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ExplicitEuler.cc,v 1.1.10.1 1999/12/07 20:48:04 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Explicit Euler: x_1 = x_0 + h * dx_0
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FieldManager.cc,v 1.1 1999/01/07 16:07:09 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4FieldManager.cc,v 1.1.10.1 1999/12/07 20:48:04 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4FieldManager.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FieldTrack.cc,v 1.1 1999/01/07 16:07:09 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4FieldTrack.cc,v 1.1.10.1 1999/12/07 20:48:04 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4FieldTrack.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HelixExplicitEuler.cc,v 1.1 1999/01/07 16:07:09 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4HelixExplicitEuler.cc,v 1.1.10.1 1999/12/07 20:48:04 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4HelixExplicitEuler.hh"
#include "G4ThreeVector.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HelixHeum.cc,v 1.1 1999/01/07 16:07:09 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4HelixHeum.cc,v 1.1.10.1 1999/12/07 20:48:05 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4HelixHeum.hh"
#include "G4ThreeVector.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HelixImplicitEuler.cc,v 1.1 1999/01/07 16:07:09 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4HelixImplicitEuler.cc,v 1.1.10.1 1999/12/07 20:48:05 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4HelixImplicitEuler.hh"
#include "G4ThreeVector.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HelixSimpleRunge.cc,v 1.1 1999/01/07 16:07:09 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4HelixSimpleRunge.cc,v 1.1.10.1 1999/12/07 20:48:05 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4HelixSimpleRunge.hh"
#include "G4ThreeVector.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ImplicitEuler.cc,v 1.1 1999/01/07 16:07:10 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ImplicitEuler.cc,v 1.1.10.1 1999/12/07 20:48:05 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Implicit Euler:
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LineSection.cc,v 1.1 1999/01/07 16:07:10 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4LineSection.cc,v 1.1.10.1 1999/12/07 20:48:05 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// typedef double G4double;
#include "G4LineSection.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagErrorStepper.cc,v 1.5 1999/04/19 17:20:30 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagErrorStepper.cc,v 1.5.8.1 1999/12/07 20:48:05 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4MagErrorStepper.hh"
#include "G4ThreeVector.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagHelicalStepper.cc,v 1.2 1999/02/12 12:38:50 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagHelicalStepper.cc,v 1.2.8.1 1999/12/07 20:48:05 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4MagHelicalStepper.hh"
#include "G4ThreeVector.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagIntegratorDriver.cc,v 1.4 1999/07/06 20:22:34 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagIntegratorDriver.cc,v 1.9.2.1 1999/12/07 20:48:05 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
//
@@ -17,13 +17,16 @@
// 7 Oct 96 V. Grichine First version
// 28 Jan 98 W. Wander: Added ability for low order integrators
// 30 Jan 98 J. Apostolakis: Made method parameters into instance variables
// 27 Jul 99 J. Apostolakis: Ensured that AccurateAdvance does not loop
// due to very small eps & step size (precision)
#include <math.h>
#include "G4ios.hh"
#include "G4MagIntegratorDriver.hh"
#include "G4FieldTrack.hh"
#include "geomdefs.hh"
// for kCarTolerance
// #define G4DEBUG 1
#define G4DEBUG 1
// Stepsize can increase by no more than 5.0
// and decrease by no more than 1/10. = 0.1
@@ -31,6 +34,9 @@
const G4double G4MagInt_Driver::max_stepping_increase = 5.0;
const G4double G4MagInt_Driver::max_stepping_decrease = 0.1;
// The (default) maximum number of steps is Base divided by the order of Stepper
const G4int G4MagInt_Driver::fMaxStepBase = 5000;
G4bool
G4MagInt_Driver::AccurateAdvance(
G4FieldTrack& y_current,
@@ -51,7 +57,7 @@ G4MagInt_Driver::AccurateAdvance(
// minimum allowed stepsize. On output nOK and nBAD are the numbers of
// good and bad (but retried and fixed) steps taken.
{
static const G4int maxstp = 5000;
// static const G4int maxstp = 5000;
G4int nstp, i;
static G4int dbg=1;
@@ -61,7 +67,7 @@ G4MagInt_Driver::AccurateAdvance(
G4double y[G4FieldTrack::ncompSVEC], dydx[G4FieldTrack::ncompSVEC];
G4double ystart[G4FieldTrack::ncompSVEC];
G4double x1, x2;
G4bool succeeded = true;
G4bool succeeded = true, lastStepSucceeded;
// Assume that hstep > 0
@@ -81,36 +87,138 @@ G4MagInt_Driver::AccurateAdvance(
for(i=0;i<nvar;i++) y[i] = ystart[i] ;
G4bool lastStep= false;
nstp=1;
G4double lastStepThreshold = min( eps * hstep, Hmin() );
do{
#ifdef G4DEBUG
G4ThreeVector StartPos( y[0], y[1], y[2] );
#endif
G4ThreeVector StartPos( y[0], y[1], y[2] );
pIntStepper->RightHandSide( y, dydx );
if( x+h > x2 ) h = x2 - x ; // When stepsize overshoots, decrease it!
if( x+h > x2 ) {
h = x2 - x ; // When stepsize overshoots, decrease it!
}
if( h < eps * hstep) {
lastStep = true; // Ensure that this must be the last step
// because otherwise numerical (im)precision
// could otherwise force lots of small last steps.
}
// Perform the Integration
//
OneGoodStep(y,dydx,x,h,eps,hdid,hnext) ;
//--------------------------------------
lastStepSucceeded= (hdid == h);
#ifdef G4DEBUG
if(hdid == h) noFullIntegr++ ; else noSmallIntegr++ ;
if(lastStepSucceeded) noFullIntegr++ ; else noSmallIntegr++ ;
G4ThreeVector EndPos( y[0], y[1], y[2] );
// Check the endpoint
G4double endPointDist= (EndPos-StartPos).mag();
if( endPointDist >= h*(1.+perMillion) ){
static G4double maxRelError= 0.0;
G4bool isNewMax;
WarnEndPointTooFar ( endPointDist, h, eps, dbg );
noBadSteps ++;
} else { // ie (!dbg)
noGoodSteps ++;
}
#endif
// Check the proposed next stepsize
if(fabs(hnext) <= Hmin())
{
// If simply a very small interval is being integrated, do not warn
if( (x < x2 * (1-eps) ) && // The last step can be small: it's OK
(fabs(hstep) > Hmin()) // and if we are asked, it's OK
// && (hnext < hstep * PerThousand )
)
// Issue WARNING
WarnSmallStepSize( hnext, hstep, h, x-x1, nstp );
else
succeeded = false; // Meaningful only if we break out of the loop.
lastStep = true; // ensure that this was the last step
}
h = hnext ;
}while (((nstp++)<=fMaxNoSteps) &&
(x < x2) // Have we reached the end ?
// --> a better test might be x-x2 > an_epsilon
&& (!lastStep)
);
succeeded= (x>=x2); // If it was a "forced" last step
for(i=0;i<nvar;i++) ystart[i] = y[i] ;
if(nstp > fMaxNoSteps){
WarnTooManyStep( x1, x2, x ); // Issue WARNING
succeeded = false;
}
// Put back the values.
y_current.LoadFromArray( ystart );
y_current.SetCurveLength( x );
return succeeded;
} // end of AccurateAdvance ...........................
void
G4MagInt_Driver::WarnSmallStepSize( G4double hnext, G4double hstep,
G4double h, G4double xDone,
G4int nstp)
{
static G4int noWarningsIssued =0;
const G4int maxNoWarnings = 100;
if( noWarningsIssued < maxNoWarnings ){
G4cerr<< " Warning (G4MagIntegratorDriver): The stepsize for the "
<< " next iteration=" << hnext << " is too small - in Step number "
<< nstp << "." << endl;
G4cerr << " Requested step size was " << hstep << " ." << endl ;
G4cerr << " Previous step size was " << h << " ." << endl ;
G4cerr << " The minimum for the driver is " << Hmin() << endl ;
G4cerr << " The integrations has already gone " << xDone << endl ;
}
noWarningsIssued++;
}
void
G4MagInt_Driver::WarnTooManyStep( G4double x1start,
G4double x2end,
G4double xCurrent)
{
G4cerr << " Warning (G4MagIntegratorDriver): The number of steps "
<< "used in the Integration driver (Runge-Kutta) is too many. "
<< endl ;
G4cerr << "Integration of the interval was not completed - only a "
<< (xCurrent-x1start)*100/(x2end-x1start)
<<" % fraction of it was Done." << endl;
}
void
G4MagInt_Driver::WarnEndPointTooFar (G4double endPointDist,
G4double h ,
G4double eps,
G4int dbg)
{
static G4double maxRelError= 0.0;
G4bool isNewMax, prNewMax;
isNewMax = endPointDist > (1.0 + maxRelError) * h;
prNewMax = endPointDist > (1.0 + 1.05 * maxRelError) * h;
if( isNewMax )
maxRelError= endPointDist / h - 1.0;
if( dbg && ( isNewMax || (endPointDist >= h*(1.+eps) ) ) ){
if( dbg
&& (h > kCarTolerance)
&& ( prNewMax || (endPointDist >= h*(1.+eps) ) )
){
static G4int noWarnings = 0;
if( (noWarnings ++ < 10) || (dbg>1) ){
G4cerr << " Warning (G4MagIntergratorDriver): "
G4cerr << " Warning (G4MagIntegratorDriver): "
<< " The integration produced an endpoint which " << endl
<< " is further from the startpoint than the curve length." << endl;
@@ -124,60 +232,10 @@ G4MagInt_Driver::AccurateAdvance(
<< " curve length = " << h
<< " Diff (cl-ed)= " << (h - endPointDist)
<< " rel = " << (h-endPointDist) / h
<< endl;
<< " (from G4MagIntegratorDriver)" << endl;
}
} else { // ie (!dbg)
noGoodSteps ++;
} // end if (dbg)
}
#endif
if(fabs(hnext) <= Hmin())
{
// If simply a very small interval is being integrated, do not warn
if( (x < x2 * (1-eps) ) && // The last step can be small: it's OK
(fabs(hstep) > Hmin()) // and if we are asked, it's OK
// && (hnext < hstep * PerThousand )
)
{
G4cerr<< " Warning (G4MagIntergratorDriver): The stepsize for the "
" next iteration=" << hnext << " is too small - in Step number "
<<nstp << "." << endl;
G4cerr << " Requested step size was " << hstep << " ." << endl ;
G4cerr << " Previous step size was " << h << " ." << endl ;
G4cerr << " The minimum for the driver is " << Hmin() << endl ;
}
// else succeeded = false; // Not meaningful unless it is used to
// break out of the loop.
}
h = hnext ;
}while (((nstp++)<=maxstp) &&
(x < x2) // Have we reached the end ?
// --> a better test might be x-x2 > an_epsilon
);
for(i=0;i<nvar;i++) ystart[i] = y[i] ;
if(nstp > maxstp){
G4cerr << " Warning (G4MagIntergratorDriver): The number of steps "
<< "used in the Integration driver (Runge-Kutta) is too many. "
<< endl ;
G4cerr << "Integration of the interval was not completed - only a "
<< (x-x1)*100/(x2-x1)<<" % fraction of it was Done." << endl;
succeeded = false;
}
// Put back the values.
y_current.LoadFromArray( ystart );
y_current.SetCurveLength( x );
return succeeded;
} // end of AccurateAdvance ...........................
}
}
// ---------------------------------------------------------
void
@@ -185,7 +243,7 @@ G4MagInt_Driver::OneGoodStep( G4double y[],
const G4double dydx[],
G4double& x,
const G4double htry,
const G4double eps,
const G4double eps_rel_max,
G4double& hdid,
G4double& hnext )
@@ -206,8 +264,6 @@ G4MagInt_Driver::OneGoodStep( G4double y[],
G4double errpos_sq, errvel_sq, errmax_sq;
G4double errmax, h, htemp, xnew ;
G4int i;
const G4double eps_vel_rel= eps; // The same relative error
// (eps too is a pure number)
G4double yerr[G4FieldTrack::ncompSVEC], ytemp[G4FieldTrack::ncompSVEC];
@@ -218,7 +274,7 @@ G4MagInt_Driver::OneGoodStep( G4double y[],
for (;;)
{
pIntStepper-> Stepper(y,dydx,h,ytemp,yerr);
G4double eps_pos = eps * h;
G4double eps_pos = eps_rel_max * max(h, Hmin());
// Evaluate accuracy
//
errpos_sq = sqr(yerr[0]) + sqr(yerr[1]) + sqr(yerr[2]) ;
@@ -227,7 +283,7 @@ G4MagInt_Driver::OneGoodStep( G4double y[],
// Accuracy for velocity
errvel_sq = (sqr(yerr[3]) + sqr(yerr[4]) + sqr(yerr[5]) )
/ (sqr(y[3]) + sqr(y[4]) + sqr(y[5]) );
errvel_sq /= eps_vel_rel*eps_vel_rel;
errvel_sq /= eps_rel_max*eps_rel_max;
errmax_sq = max( errpos_sq, errvel_sq ); // Square of maximum error
errmax = sqrt( errmax_sq );
@@ -241,7 +297,11 @@ G4MagInt_Driver::OneGoodStep( G4double y[],
// than a factor of 10
xnew = x + h ;
if(xnew == x) {
G4cerr<<"Stepsize underflow in Stepper "<<endl ;
G4cerr<<"G4MagIntegratorDriver::OneGoodStep: Stepsize underflow in Stepper "<<endl ;
G4cerr<<" Step's start x=" << x << " and end x= " << xnew
<< " are equal !! " << endl
<<" Due to step-size= " << h
<< " . Note that input step was " << htry << endl;
break;
}
}
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MagIntegratorStepper.cc,v 1.2 1999/02/12 12:38:18 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4MagIntegratorStepper.cc,v 1.2.8.1 1999/12/07 20:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4MagIntegratorStepper.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Mag_EqRhs.cc,v 1.1 1999/01/07 16:07:11 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Mag_EqRhs.cc,v 1.1.10.1 1999/12/07 20:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// This is the standard right-hand side for equation of motion
// in a pure Magnetic Field .
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Mag_UsualEqRhs.cc,v 1.1 1999/01/07 16:07:11 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Mag_UsualEqRhs.cc,v 1.1.10.1 1999/12/07 20:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// This is the standard right-hand side for equation of motion.
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4RKG3_Stepper.cc,v 1.1 1999/01/07 16:07:12 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4RKG3_Stepper.cc,v 1.1.10.1 1999/12/07 20:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4RKG3_Stepper.hh"
#include "G4ThreeVector.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4SimpleHeum.cc,v 1.2 1999/03/04 13:52:30 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4SimpleHeum.cc,v 1.2.8.1 1999/12/07 20:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// Simple Heum:
// x_1 = x_0 + h *
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4SimpleRunge.cc,v 1.1 1999/01/07 16:07:12 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4SimpleRunge.cc,v 1.1.10.1 1999/12/07 20:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// Simple Runge:
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UniformElectricField.cc,v 1.1 1999/01/07 16:07:12 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4UniformElectricField.cc,v 1.1.10.1 1999/12/07 20:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UniformMagField.cc,v 1.1 1999/01/07 16:07:12 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4UniformMagField.cc,v 1.1.10.1 1999/12/07 20:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
//