Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4CashKarpRKF45.hh,v 1.7 2001/07/11 09:59:06 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4CashKarpRKF45
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ChordFinder.hh,v 1.8 2001/08/16 23:54:15 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4ChordFinder.hh,v 1.9 2002/11/09 03:05:13 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4ChordFinder
@@ -101,6 +101,10 @@ class G4ChordFinder
G4double& dyErr, // Error of endpoint
G4double epsStep );
void PrintDchordTrial(G4int noTrials,
G4double stepTrial,
G4double oldStepTrial,
G4double dChordStep);
private: // ............................................................
G4ChordFinder(const G4ChordFinder&);
@@ -121,6 +125,7 @@ class G4ChordFinder
G4bool fAllocatedStepper;
G4EquationOfMotion* fEquation;
G4MagIntegratorStepper* fDriversStepper;
G4int fNoTrials, fNoCalls;
};
// Inline function implementation:
@@ -22,7 +22,7 @@
//
//
// $Id: G4ChordFinder.icc,v 1.4 2001/08/16 23:54:51 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// G4ChordFinder inline implementations
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ClassicalRK4.hh,v 1.5 2001/07/11 09:59:07 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4ClassicalRK4.hh,v 1.6 2002/11/20 17:56:35 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4ClassicalRK4
@@ -85,7 +85,7 @@ class G4ClassicalRK4 : public G4MagErrorStepper
private:
G4int fNumberOfVariables ; // is set default to 6 in constructor
// G4int fNumberOfVariables ; // is set default to 6 in constructor
G4double *dydxm, *dydxt, *yt; // scratch space - not state
};
@@ -22,7 +22,7 @@
//
//
// $Id: G4ElectroMagneticField.hh,v 1.6 2001/11/08 17:31:06 grichine Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4ElectroMagneticField
@@ -22,7 +22,7 @@
//
//
// $Id: G4EqMagElectricField.hh,v 1.6 2001/07/11 09:59:07 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4EqMagElectricField
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4EquationOfMotion.hh,v 1.5 2001/07/11 09:59:07 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4EquationOfMotion.hh,v 1.7 2002/06/11 08:38:56 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4EquationOfMotion
@@ -64,6 +64,7 @@ class G4EquationOfMotion
// Set the charge, momentum and mass of the current particle
// --> used to set the equation's coefficients ...
inline
void RightHandSide( const G4double y[],
G4double dydx[] ) const;
// This calculates the value of the derivative dydx at y.
@@ -77,7 +78,7 @@ class G4EquationOfMotion
// Same as RHS above, but also returns the value of B.
// Should be made the new default ? after putting dydx & B in a class.
void GetFieldValue( const G4double Point[3],
void GetFieldValue( const G4double Point[4],
G4double Field[] ) const;
// Obtain only the field - the stepper assumes it is pure Magnetic.
// Not protected, because G4RKG3_Stepper uses it directly.
@@ -86,6 +87,8 @@ class G4EquationOfMotion
void SetFieldObj(G4Field* pField);
private:
// static const int G4maximum_number_of_field_components = 16;
enum { G4maximum_number_of_field_components = 16 } ;
G4Field *itsField;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4EquationOfMotion.icc,v 1.5 2001/07/11 09:59:07 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4EquationOfMotion.icc,v 1.7 2002/06/11 08:39:14 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// Inline implementation
@@ -46,8 +46,28 @@ void G4EquationOfMotion::SetFieldObj(G4Field* pField)
}
inline
void G4EquationOfMotion::GetFieldValue( const G4double Point[3],
void G4EquationOfMotion::GetFieldValue( const G4double Point[4],
G4double Field[] ) const
{
itsField-> GetFieldValue( Point, Field );
}
inline
void
G4EquationOfMotion::RightHandSide( const G4double y[],
G4double dydx[] ) const
{
G4double Field[G4maximum_number_of_field_components];
G4double PositionAndTime[4];
// Position
PositionAndTime[0] = y[0];
PositionAndTime[1] = y[1];
PositionAndTime[2] = y[2];
// Global Time
PositionAndTime[3] = y[7]; // See G4FieldTrack::LoadFromArray
GetFieldValue(PositionAndTime, Field) ;
EvaluateRhsGivenB( y, Field, dydx );
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ExplicitEuler.hh,v 1.5 2001/07/11 09:59:07 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4ExplicitEuler.hh,v 1.6 2002/11/29 13:47:49 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4ExplicitEuler
@@ -58,9 +58,6 @@ class G4ExplicitEuler : public G4MagErrorStepper
G4int IntegratorOrder() const { return 1; }
private:
G4int fNumberOfVariables ;
};
#endif /* G4EXPLICITEULER_HH */
@@ -22,7 +22,7 @@
//
//
// $Id: G4Field.hh,v 1.6 2001/11/08 17:31:07 grichine Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4Field
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4FieldManager.hh,v 1.7 2001/11/28 18:44:43 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4FieldManager.hh,v 1.8 2002/07/24 10:43:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4FieldManager
@@ -120,10 +120,8 @@ class G4FieldManager
G4double fDelta_One_Step_Value; // for one tracking/physics step
G4double fDelta_Intersection_Val; // for boundary intersection
// Their default values ... (set in G4PropagatemagField.cc)
//
static const G4double fDefault_Delta_One_Step_Value; // = 0.25 * mm;
static const G4double fDefault_Delta_Intersection_Val; // = 0.1 * mm;
G4double fDefault_Delta_One_Step_Value; // = 0.25 * mm;
G4double fDefault_Delta_Intersection_Val; // = 0.1 * mm;
};
// Our current design envisions that one Field manager is valid for a region of the detector.
@@ -22,7 +22,7 @@
//
//
// $Id: G4FieldManager.icc,v 1.5 2001/11/28 18:44:43 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// G4FieldManager inline implementation
@@ -22,7 +22,7 @@
//
//
// $Id: G4FieldTrack.hh,v 1.8 2001/10/25 17:02:16 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4FieldTrack
@@ -22,7 +22,7 @@
//
//
// $Id: G4FieldTrack.icc,v 1.9 2001/10/25 17:02:16 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "PhysicalConstants.h"
@@ -22,7 +22,7 @@
//
//
// $Id: G4HelixExplicitEuler.hh,v 1.6 2001/07/11 09:59:08 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4HelixExplicitEuler
@@ -22,7 +22,7 @@
//
//
// $Id: G4HelixHeum.hh,v 1.6 2001/07/11 09:59:08 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4HelixHeum
@@ -22,7 +22,7 @@
//
//
// $Id: G4HelixImplicitEuler.hh,v 1.6 2001/07/11 09:59:08 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4HelixImplicitEuler
@@ -22,7 +22,7 @@
//
//
// $Id: G4HelixSimpleRunge.hh,v 1.5 2001/07/11 09:59:08 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// W. Wander <wwc@mit.edu> 03/12/98
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ImplicitEuler.hh,v 1.4 2001/07/11 09:59:08 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4ImplicitEuler.hh,v 1.5 2002/11/29 13:48:47 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// W. Wander <wwc@mit.edu> 12/09/97
@@ -45,9 +45,11 @@ class G4ImplicitEuler : public G4MagErrorStepper
G4int IntegratorOrder() const { return 2 ; } ;
private:
private: // No description
G4int fNumberOfVariables ;
G4double* dydxTemp;
G4double* yTemp;
// Temporaries, created to avoid new/delete on every call
};
#endif /* G4IMPLICITEULER_HH */
@@ -22,7 +22,7 @@
//
//
// $Id: G4LineSection.hh,v 1.7 2001/12/05 16:40:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4LineSection
@@ -22,7 +22,7 @@
//
//
// $Id: G4MagErrorStepper.hh,v 1.8 2001/07/11 09:59:08 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4MagErrorStepper
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4MagErrorStepper.icc,v 1.8 2001/07/11 09:59:08 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4MagErrorStepper.icc,v 1.9 2002/11/09 03:06:15 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
inline
@@ -30,7 +30,7 @@ G4MagErrorStepper::G4MagErrorStepper(G4Mag_EqRhs *EqRhs,
G4int numberOfVariables)
: G4MagIntegratorStepper(EqRhs,numberOfVariables)
{
G4int nvar = this->GetNumberOfVariables() ;
G4int nvar = G4std::max(this->GetNumberOfVariables(), 8);
yMiddle= new G4double[nvar];
dydxMid= new G4double[nvar];
yInitial= new G4double[nvar];
@@ -22,7 +22,7 @@
//
//
// $Id: G4MagHelicalStepper.hh,v 1.7 2001/07/11 09:59:08 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4MagHelicalStepper
@@ -22,7 +22,7 @@
//
//
// $Id: G4MagHelicalStepper.icc,v 1.7 2002/05/31 16:22:54 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// linear Step in regions of no field
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4MagIntegratorDriver.hh,v 1.11 2002/04/19 17:31:41 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4MagIntegratorDriver.hh,v 1.12 2002/11/09 02:32:15 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4MagInt_Driver
@@ -190,7 +190,9 @@ class G4MagInt_Driver
G4double hminimum_val;
// Minimum Step allowed in a Step.
G4int nvar;
const G4int fNoIntegrationVariables; // Number of Variables in integration
const G4int fMinNoVars; // Minimum number for FieldTrack
const G4int fNoVars; // Full number of variable
G4MagIntegratorStepper *pIntStepper;
G4int fMaxNoSteps;
@@ -22,7 +22,7 @@
//
//
// $Id: G4MagIntegratorDriver.icc,v 1.7 2001/10/25 09:11:09 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
inline
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4MagIntegratorStepper.hh,v 1.8 2002/05/07 16:11:59 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4MagIntegratorStepper.hh,v 1.9 2002/11/20 18:09:22 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4MagIntegratorStepper
@@ -31,9 +31,16 @@
//
// Abstract base class for integrator of particle's equation of motion,
// used in tracking in space dependent magnetic field
//
// A Stepper must integrate over NumberOfVariables elements,
// and also copy (from input to output) any of NoStateVariables
// not included in the NumberOfVariables.
//
// So it is expected that NoStateVariables >= NumberOfVariables
// History:
// - 15.01.97 J.Apostolakis (J.Apostolakis@cern.ch)
// - 15.01.97 J. Apostolakis (J.Apostolakis@cern.ch)
// - 20.11.02 J. Apostolakis: Added new "State" elements
#ifndef G4MAGIntegratorSTEPPER
#define G4MAGIntegratorSTEPPER
@@ -45,7 +52,9 @@ class G4MagIntegratorStepper
{
public: // with description
G4MagIntegratorStepper(G4EquationOfMotion *Equation, G4int num_variables);
G4MagIntegratorStepper(G4EquationOfMotion *Equation,
G4int numIntegrationVariables,
G4int numStateVariables=12);
virtual ~G4MagIntegratorStepper();
// Constructor and destructor. No actions.
@@ -71,8 +80,12 @@ class G4MagIntegratorStepper
// Right Hand side of the associated equation.
inline G4int GetNumberOfVariables() const;
inline void SetNumberOfVariables(G4int newNo);
// Get/Set the number of variables that the stepper will compile over.
// Get the number of variables that the stepper will integrate over.
// void SetNumberOfVariables(G4int newNo); // Dangerous & obsolete ...
inline G4int GetNumberOfStateVariables() const;
// Get the number of variables of state variables (>= above, integration)
virtual G4int IntegratorOrder() const = 0;
// Returns the order of the integrator
@@ -102,8 +115,9 @@ class G4MagIntegratorStepper
private:
G4EquationOfMotion *fEquation_Rhs;
G4int fNumberOfVariables;
const G4int fNoIntegrationVariables; // Number of Variables in integration
const G4int fNoStateVariables; // Number required for FieldTrack
// const G4int fNumberOfVariables;
};
#include "G4MagIntegratorStepper.icc"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4MagIntegratorStepper.icc,v 1.6 2002/05/07 16:11:59 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4MagIntegratorStepper.icc,v 1.7 2002/11/20 18:10:44 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
inline
@@ -34,15 +34,22 @@ G4EquationOfMotion* G4MagIntegratorStepper::GetEquationOfMotion()
inline
G4int G4MagIntegratorStepper::GetNumberOfVariables() const
{
return fNumberOfVariables;
return fNoIntegrationVariables;
}
inline
void G4MagIntegratorStepper::SetNumberOfVariables(G4int newNo)
G4int G4MagIntegratorStepper::GetNumberOfStateVariables() const
{
fNumberOfVariables = newNo;
return fNoStateVariables;
}
// inline
// void G4MagIntegratorStepper::SetNumberOfVariables(G4int newNo)
// {
// fNumberOfVariables = newNo;
// }
inline
void G4MagIntegratorStepper::RightHandSide( const double y[], double dydx[] )
{
@@ -22,7 +22,7 @@
//
//
// $Id: G4Mag_EqRhs.hh,v 1.6 2001/07/11 09:59:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4Mag_EqRhs
@@ -22,7 +22,7 @@
//
//
// $Id: G4Mag_SpinEqRhs.hh,v 1.8 2002/06/07 18:25:09 japost Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4Mag_SpinEqRhs
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Mag_UsualEqRhs.hh,v 1.4 2001/07/11 09:59:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4Mag_UsualEqRhs.hh,v 1.5 2002/04/29 16:54:02 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4Mag_UsualEqRhs
@@ -57,6 +57,15 @@ class G4Mag_UsualEqRhs : public G4Mag_EqRhs
G4double dydx[] ) const;
// Given the value of the magnetic field B, this function
// calculates the value of the derivative dydx.
virtual void SetChargeMomentumMass( G4double particleCharge, // in e+ units
G4double MomentumXc,
G4double mass);
private: // without description
G4double fInvCurrentMomentumXc; // This extra state enables us
// to save a square root in a
// critical method.
};
#endif /* G4MAG_USUAL_EQRHS */
@@ -22,7 +22,7 @@
//
//
// $Id: G4MagneticField.hh,v 1.10 2001/12/04 17:47:02 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4MagneticField
@@ -22,7 +22,7 @@
//
//
// $Id: G4RKG3_Stepper.hh,v 1.8 2001/07/11 09:59:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4RKG3_Stepper
@@ -22,7 +22,7 @@
//
//
// $Id: G4SimpleHeum.hh,v 1.5 2001/07/11 09:59:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4SimpleHeum
@@ -22,7 +22,7 @@
//
//
// $Id: G4SimpleRunge.hh,v 1.5 2001/07/11 09:59:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4SimpleRunge
@@ -22,7 +22,7 @@
//
//
// $Id: G4UniformElectricField.hh,v 1.6 2001/12/04 17:35:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4UniformElectricField
@@ -22,7 +22,7 @@
//
//
// $Id: G4UniformMagField.hh,v 1.7 2001/12/04 17:35:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// class G4UniformMagField