Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CashKarpRKF45.hh,v 1.10 2006/06/29 18:20:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4CashKarpRKF45.hh,v 1.11 2008/01/11 15:23:54 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4CashKarpRKF45
|
||||
@@ -87,7 +87,7 @@ class G4CashKarpRKF45 : public G4MagIntegratorStepper
|
||||
|
||||
private:
|
||||
|
||||
G4int fNumberOfVariables ;
|
||||
// G4int fNumberOfVariables ; // Already kept in G4MagIntegratorStepper
|
||||
G4double *ak2, *ak3, *ak4, *ak5, *ak6, *ak7, *yTemp, *yIn; // scratch space
|
||||
|
||||
// for DistChord calculations
|
||||
|
||||
@@ -24,21 +24,20 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ChordFinder.hh,v 1.17 2006/06/29 18:21:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4ChordFinder.hh,v 1.21 2008/10/29 14:17:42 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ChordFinder
|
||||
// Class G4ChordFinder
|
||||
//
|
||||
// Class description:
|
||||
// class description:
|
||||
//
|
||||
// A class that provides RK integration of motion ODE (as does g4magtr)
|
||||
// and also has a method that returns an Approximate point on the curve
|
||||
// near to a (chord) point.
|
||||
|
||||
// History:
|
||||
// - 25.02.97 John Apostolakis, design and implementation
|
||||
// - 05.03.97 V. Grichine , makeup to G4 'standard'
|
||||
// - 25.02.97 - John Apostolakis - Design and implementation
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4CHORDFINDER_HH
|
||||
@@ -62,7 +61,6 @@ class G4ChordFinder
|
||||
|
||||
virtual ~G4ChordFinder();
|
||||
|
||||
|
||||
G4double AdvanceChordLimited( G4FieldTrack& yCurrent,
|
||||
G4double stepInitial,
|
||||
G4double epsStep_Relative,
|
||||
@@ -71,11 +69,23 @@ class G4ChordFinder
|
||||
// Uses ODE solver's driver to find the endpoint that satisfies
|
||||
// the chord criterion: that d_chord < delta_chord
|
||||
// -> Returns Length of Step taken.
|
||||
|
||||
G4FieldTrack ApproxCurvePointS( const G4FieldTrack& curveAPointVelocity,
|
||||
const G4FieldTrack& curveBPointVelocity,
|
||||
const G4FieldTrack& ApproxCurveV,
|
||||
const G4ThreeVector& currentEPoint,
|
||||
const G4ThreeVector& currentFPoint,
|
||||
const G4ThreeVector& PointG,
|
||||
G4bool first, G4double epsStep);
|
||||
|
||||
G4FieldTrack ApproxCurvePointV( const G4FieldTrack& curveAPointVelocity,
|
||||
const G4FieldTrack& curveBPointVelocity,
|
||||
const G4ThreeVector& currentEPoint,
|
||||
G4double epsStep);
|
||||
|
||||
G4FieldTrack ApproxCurvePointV(const G4FieldTrack& curveAPointVelocity,
|
||||
const G4FieldTrack& curveBPointVelocity,
|
||||
const G4ThreeVector& currentEPoint,
|
||||
G4double epsStep);
|
||||
inline G4double InvParabolic( const G4double xa, const G4double ya,
|
||||
const G4double xb, const G4double yb,
|
||||
const G4double xc, const G4double yc );
|
||||
|
||||
inline G4double GetDeltaChord() const;
|
||||
inline void SetDeltaChord(G4double newval);
|
||||
@@ -100,7 +110,29 @@ class G4ChordFinder
|
||||
virtual void PrintStatistics();
|
||||
// A report with the above -- and possibly other stats
|
||||
inline G4int SetVerbose( G4int newvalue=1);
|
||||
// Set verbosity and return old value
|
||||
// Set verbosity and return old value
|
||||
|
||||
void SetFractions_Last_Next( G4double fractLast= 0.90,
|
||||
G4double fractNext= 0.95 );
|
||||
// Parameters for performance ... change with great care
|
||||
|
||||
inline void SetFirstFraction(G4double fractFirst);
|
||||
// Parameter for performance ... change with great care
|
||||
|
||||
public: // without description
|
||||
|
||||
void TestChordPrint( G4int noTrials,
|
||||
G4int lastStepTrial,
|
||||
G4double dChordStep,
|
||||
G4double nextStepTrial );
|
||||
|
||||
// Printing for monitoring ...
|
||||
|
||||
inline G4double GetFirstFraction(); // Originally 0.999
|
||||
inline G4double GetFractionLast(); // Originally 1.000
|
||||
inline G4double GetFractionNextEstimate(); // Originally 0.980
|
||||
inline G4double GetMultipleRadius(); // No original value
|
||||
// Parameters for adapting performance ... use with great care
|
||||
|
||||
protected: // .........................................................
|
||||
|
||||
@@ -114,7 +146,7 @@ class G4ChordFinder
|
||||
G4double dChordStep, // Current dchord estimate
|
||||
G4double& stepEstimate_Unconstrained ) ;
|
||||
|
||||
virtual G4double FindNextChord( const G4FieldTrack yStart,
|
||||
virtual G4double FindNextChord( const G4FieldTrack& yStart,
|
||||
G4double stepMax,
|
||||
G4FieldTrack& yEnd,
|
||||
G4double& dyErr, // Error of endpoint
|
||||
@@ -128,28 +160,7 @@ class G4ChordFinder
|
||||
G4double stepTrial,
|
||||
G4double oldStepTrial,
|
||||
G4double dChordStep);
|
||||
public: // no description
|
||||
void TestChordPrint( G4int noTrials,
|
||||
G4int lastStepTrial,
|
||||
G4double dChordStep,
|
||||
G4double nextStepTrial );
|
||||
// Printing for monitoring ...
|
||||
|
||||
inline G4double GetFirstFraction(); // Originally 0.999
|
||||
inline G4double GetFractionLast(); // Originally 1.000
|
||||
inline G4double GetFractionNextEstimate(); // Originally 0.980
|
||||
inline G4double GetMultipleRadius(); // No original value
|
||||
// Parameters for adapting performance ... use with great care
|
||||
|
||||
public: // with description
|
||||
void SetFractions_Last_Next( G4double fractLast= 0.90,
|
||||
G4double fractNext= 0.95 );
|
||||
// Parameters for performance ... change with great care
|
||||
|
||||
inline void SetFirstFraction(G4double fractFirst);
|
||||
// Parameter for performance ... change with great care
|
||||
|
||||
protected:
|
||||
inline G4double GetLastStepEstimateUnc();
|
||||
inline void SetLastStepEstimateUnc( G4double stepEst );
|
||||
|
||||
@@ -160,15 +171,18 @@ class G4ChordFinder
|
||||
// Private copy constructor and assignment operator.
|
||||
|
||||
private: // ............................................................
|
||||
// G4int nOK, nBAD;
|
||||
// G4int nOK, nBAD;
|
||||
G4MagInt_Driver* fIntgrDriver;
|
||||
|
||||
const G4double fDefaultDeltaChord; // SET in G4ChordFinder.cc = 0.25 mm
|
||||
|
||||
G4double fDeltaChord; // Maximum miss distance
|
||||
G4double fDeltaChord; // Maximum miss distance
|
||||
|
||||
G4double fLastStepEstimate_Unconstrained;
|
||||
// State information for efficiency
|
||||
|
||||
G4double fLastStepEstimate_Unconstrained; // State information for efficiency
|
||||
// Variables used in construction/destruction
|
||||
|
||||
G4bool fAllocatedStepper;
|
||||
G4EquationOfMotion* fEquation;
|
||||
G4MagIntegratorStepper* fDriversStepper;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ChordFinder.icc,v 1.12 2006/06/29 18:21:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4ChordFinder.icc,v 1.14 2008/10/29 14:34:35 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// G4ChordFinder inline implementations
|
||||
//
|
||||
@@ -122,3 +122,19 @@ void G4ChordFinder::AccumulateStatistics( G4int noTrials )
|
||||
}
|
||||
// }
|
||||
}
|
||||
// A member that calculates the inverse parabolic through
|
||||
// the three points (x,y) and returns the value x that, for the
|
||||
// inverse parabolic, corresponds to y=0.
|
||||
//
|
||||
inline G4double G4ChordFinder::InvParabolic ( const G4double xa, const G4double ya,
|
||||
const G4double xb, const G4double yb,
|
||||
const G4double xc, const G4double yc )
|
||||
{ const G4double R = yb/yc,
|
||||
S = yb/ya,
|
||||
T = ya/yc;
|
||||
const G4double Q = (T-1)*(R-1)*(S-1);
|
||||
if (std::fabs(Q) <DBL_MIN ) return DBL_MAX;
|
||||
|
||||
const G4double P = S*(T*(R-T)*(xc-xb) - (1-R)*(xb-xa));
|
||||
return xb + P/Q;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ChordFinderSaf.hh,v 1.3 2006/06/29 18:21:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4ChordFinderSaf.hh,v 1.4 2008/09/12 16:12:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ChordFinderRad
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
~G4ChordFinderSaf();
|
||||
|
||||
G4double FindNextChord( const G4FieldTrack yStart,
|
||||
G4double FindNextChord( const G4FieldTrack& yStart,
|
||||
G4double stepMax,
|
||||
G4FieldTrack& yEnd, // Endpoint
|
||||
G4double& dyErrPos, // Error of endpoint
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ClassicalRK4.hh,v 1.10 2006/06/29 18:21:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ClassicalRK4
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ConstRK4.hh,v 1.2 2008/10/29 14:17:42 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Class G4ConstRK4
|
||||
//
|
||||
// class description:
|
||||
//
|
||||
// G4ConstRK4 performs the integration of one step with error calculation
|
||||
// in constant magnetic field. The integration method is the same as in
|
||||
// ClassicalRK4. The field value is assumed constant for the step.
|
||||
// This field evaluation is called only once per step.
|
||||
// G4ConstRK4 can be used only for magnetic fields.
|
||||
|
||||
// History:
|
||||
// - 18.09.2008 - J.Apostolakis, T.Nikitina - Created
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4CONSTRK4_HH
|
||||
#define G4CONSTRK4_HH
|
||||
|
||||
#include "G4MagErrorStepper.hh"
|
||||
#include "G4EquationOfMotion.hh"
|
||||
#include "G4Mag_EqRhs.hh"
|
||||
|
||||
class G4ConstRK4 : public G4MagErrorStepper
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4ConstRK4(G4Mag_EqRhs *EquationMotion, G4int numberOfVariables = 8);
|
||||
~G4ConstRK4();
|
||||
|
||||
void Stepper( const G4double y[],
|
||||
const G4double dydx[],
|
||||
G4double h,
|
||||
G4double yout[],
|
||||
G4double yerr[] );
|
||||
void DumbStepper( const G4double yIn[],
|
||||
const G4double dydx[],
|
||||
G4double h,
|
||||
G4double yOut[] ) ;
|
||||
G4double DistChord() const;
|
||||
|
||||
inline void RightHandSideConst(const G4double y[],
|
||||
G4double dydx[] ) const;
|
||||
|
||||
inline void GetConstField(const G4double y[],G4double Field[]);
|
||||
|
||||
public: // without description
|
||||
|
||||
G4int IntegratorOrder() const { return 4; }
|
||||
|
||||
private:
|
||||
|
||||
G4ConstRK4(const G4ConstRK4&);
|
||||
G4ConstRK4& operator=(const G4ConstRK4&);
|
||||
// Private copy constructor and assignment operator.
|
||||
|
||||
private:
|
||||
|
||||
G4ThreeVector fInitialPoint, fMidPoint, fFinalPoint;
|
||||
// Data stored in order to find the chord
|
||||
G4double *dydxm, *dydxt, *yt; // scratch space - not state
|
||||
G4double *yInitial, *yMiddle, *dydxMid, *yOneStep;
|
||||
G4Mag_EqRhs *fEq;
|
||||
G4double Field[3];
|
||||
};
|
||||
|
||||
// Inline methods
|
||||
|
||||
inline void G4ConstRK4:: RightHandSideConst(const G4double y[],
|
||||
G4double dydx[] ) const
|
||||
{
|
||||
|
||||
G4double momentum_mag_square = y[3]*y[3] + y[4]*y[4] + y[5]*y[5];
|
||||
G4double inv_momentum_magnitude = 1.0 / std::sqrt( momentum_mag_square );
|
||||
|
||||
G4double cof =fEq->FCof()*inv_momentum_magnitude;
|
||||
|
||||
dydx[0] = y[3]*inv_momentum_magnitude; // (d/ds)x = Vx/V
|
||||
dydx[1] = y[4]*inv_momentum_magnitude; // (d/ds)y = Vy/V
|
||||
dydx[2] = y[5]*inv_momentum_magnitude; // (d/ds)z = Vz/V
|
||||
|
||||
dydx[3] = cof*(y[4]*Field[2] - y[5]*Field[1]) ; // Ax = a*(Vy*Bz - Vz*By)
|
||||
dydx[4] = cof*(y[5]*Field[0] - y[3]*Field[2]) ; // Ay = a*(Vz*Bx - Vx*Bz)
|
||||
dydx[5] = cof*(y[3]*Field[1] - y[4]*Field[0]) ; // Az = a*(Vx*By - Vy*Bx)
|
||||
}
|
||||
|
||||
inline void G4ConstRK4::GetConstField(const G4double y[],G4double B[])
|
||||
{
|
||||
G4double PositionAndTime[4];
|
||||
|
||||
PositionAndTime[0] = y[0];
|
||||
PositionAndTime[1] = y[1];
|
||||
PositionAndTime[2] = y[2];
|
||||
// Global Time
|
||||
PositionAndTime[3] = y[7];
|
||||
fEq -> GetFieldValue(PositionAndTime, B) ;
|
||||
}
|
||||
|
||||
#endif // G4CONSTRK4_HH
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DELPHIMagField.hh,v 1.4 2006/06/29 18:21:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4DELPHIMagField
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ElectricField.hh,v 1.2 2006/06/29 18:21:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ElectricField
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ElectroMagneticField.hh,v 1.11 2006/06/29 18:22:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ElectroMagneticField
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EqEMFieldWithSpin.hh,v 1.1 2007/08/30 23:34:01 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4EqEMFieldWithSpin.hh,v 1.3 2008/11/14 13:37:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4EqEMFieldWithSpin
|
||||
@@ -43,7 +43,8 @@
|
||||
#define G4EQEMFIELDWITHSPIN_hh
|
||||
|
||||
#include "G4EquationOfMotion.hh"
|
||||
#include "G4ElectroMagneticField.hh"
|
||||
|
||||
class G4ElectroMagneticField;
|
||||
|
||||
class G4EqEMFieldWithSpin : public G4EquationOfMotion
|
||||
{
|
||||
@@ -51,7 +52,7 @@ class G4EqEMFieldWithSpin : public G4EquationOfMotion
|
||||
|
||||
G4EqEMFieldWithSpin(G4ElectroMagneticField *emField );
|
||||
|
||||
~G4EqEMFieldWithSpin() {;}
|
||||
~G4EqEMFieldWithSpin();
|
||||
|
||||
void SetChargeMomentumMass(G4double particleCharge, // in e+ units
|
||||
G4double MomentumXc,
|
||||
@@ -63,10 +64,14 @@ class G4EqEMFieldWithSpin : public G4EquationOfMotion
|
||||
// Given the value of the electromagnetic field, this function
|
||||
// calculates the value of the derivative dydx.
|
||||
|
||||
inline void SetAnomaly(G4double a) { anomaly = a; }
|
||||
inline G4double GetAnomaly() const { return anomaly; }
|
||||
// set/get magnetic anomaly
|
||||
|
||||
private:
|
||||
|
||||
G4double fElectroMagCof ;
|
||||
G4double fMassCof;
|
||||
G4double fElectroMagCof ;
|
||||
G4double fMassCof;
|
||||
|
||||
G4double omegac;
|
||||
G4double anomaly;
|
||||
@@ -77,4 +82,4 @@ class G4EqEMFieldWithSpin : public G4EquationOfMotion
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* G4EQEMFIELDWITHSPIN */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EqMagElectricField.hh,v 1.9 2006/06/29 18:22:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4EqMagElectricField
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EquationOfMotion.hh,v 1.10 2006/06/29 18:22:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4EquationOfMotion
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EquationOfMotion.icc,v 1.9 2006/06/29 18:22:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Inline implementation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ErrorMag_UsualEqRhs.hh,v 1.1 2007/05/16 12:54:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ExactHelixStepper.hh,v 1.5 2007/05/18 12:50:31 tnikitin Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ExactHelixStepper
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ExplicitEuler.hh,v 1.9 2006/06/29 18:22:11 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ExplicitEuler
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Field.hh,v 1.10 2006/06/29 18:22:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4Field
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FieldManager.hh,v 1.16 2006/06/29 18:22:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4FieldManager
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FieldManager.icc,v 1.12 2006/06/29 18:22:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// G4FieldManager inline implementation
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FieldManagerStore.hh,v 1.3 2008/01/17 09:39:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// class G4FieldManagerStore
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Container for all FieldManagers, with functionality derived from
|
||||
// std::vector<T>. The class is a `singleton', in that only
|
||||
// one can exist, and access is provided via the static function
|
||||
// G4FieldManagerStore::GetInstance()
|
||||
//
|
||||
// All FieldManagers should be registered with G4FieldManagerStore,
|
||||
// and removed on their destruction.
|
||||
// Intended principally to enable resetting of 'state' at start of event.
|
||||
// The underlying container initially has a capacity of 100.
|
||||
//
|
||||
// Member data:
|
||||
//
|
||||
// static G4FieldManagerStore* fgInstance
|
||||
// - Ptr to the single G4FieldManagerStore.
|
||||
|
||||
// History:
|
||||
// 07.12.07 J.Apostolakis Initial version
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4FIELDMANAGERSTORE_HH
|
||||
#define G4FIELDMANAGERSTORE_HH
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "G4FieldManager.hh"
|
||||
|
||||
class G4FieldManagerStore : public std::vector<G4FieldManager*>
|
||||
{
|
||||
public: // with description
|
||||
|
||||
static void Register(G4FieldManager* pVolume);
|
||||
// Add the logical volume to the collection.
|
||||
static void DeRegister(G4FieldManager* pVolume);
|
||||
// Remove the logical volume from the collection.
|
||||
static G4FieldManagerStore* GetInstance();
|
||||
// Get a ptr to the unique G4FieldManagerStore, creating it if necessary.
|
||||
static void Clean();
|
||||
// Delete all volumes from the store.
|
||||
|
||||
void ClearAllChordFindersState();
|
||||
// Looping over all field managers, call each one to reset step estimate
|
||||
|
||||
virtual ~G4FieldManagerStore();
|
||||
// Destructor: takes care to delete allocated field managers.
|
||||
|
||||
protected:
|
||||
|
||||
G4FieldManagerStore();
|
||||
|
||||
private:
|
||||
|
||||
static G4FieldManagerStore* fgInstance;
|
||||
static G4bool locked;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FieldTrack.hh,v 1.21 2006/11/13 18:24:35 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4FieldTrack
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FieldTrack.icc,v 1.21 2006/11/13 18:24:35 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HarmonicPolMagField.hh,v 1.4 2006/06/29 18:22:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// class G4HarmonicPolMagField
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HelixExplicitEuler.hh,v 1.9 2007/08/21 08:52:00 tnikitin Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4HelixExplicitEuler
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HelixHeum.hh,v 1.8 2006/06/29 18:22:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4HelixHeum
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HelixImplicitEuler.hh,v 1.8 2006/06/29 18:22:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4HelixImplicitEuler
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HelixSimpleRunge.hh,v 1.7 2006/06/29 18:22:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4HelixSimpleRunge
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ImplicitEuler.hh,v 1.8 2006/06/29 18:22:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ImplicitEuler
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4LineCurrentMagField.hh,v 1.4 2006/06/29 18:22:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4LineCurrentMagField
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4LineSection.hh,v 1.9 2006/06/29 18:22:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4LineSection
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagErrorStepper.hh,v 1.11 2006/06/29 18:22:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4MagErrorStepper
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagErrorStepper.icc,v 1.13 2006/06/29 18:22:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagHelicalStepper.hh,v 1.15 2007/08/21 08:48:28 tnikitin Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagHelicalStepper.icc,v 1.13 2007/05/18 15:45:15 tnikitin Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// Linear Step in regions of no field
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagIntegratorDriver.hh,v 1.20 2007/05/10 10:10:05 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4MagInt_Driver
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagIntegratorDriver.icc,v 1.13 2007/05/10 10:10:48 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MagIntegratorStepper.hh,v 1.12 2006/09/20 09:31:01 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4MagIntegratorStepper
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MagIntegratorStepper.icc,v 1.10 2006/09/20 09:31:46 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
|
||||
inline
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Mag_EqRhs.hh,v 1.9 2006/06/29 18:23:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4Mag_EqRhs
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Mag_SpinEqRhs.hh,v 1.11 2006/06/29 18:23:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4Mag_SpinEqRhs
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Mag_UsualEqRhs.hh,v 1.7 2006/06/29 18:23:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4Mag_UsualEqRhs
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagneticField.hh,v 1.14 2006/06/29 18:23:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4MagneticField
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QuadrupoleMagField.hh,v 1.4 2006/06/29 18:23:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4QuadrupoleMagField
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RKG3_Stepper.hh,v 1.13 2007/05/18 12:44:02 tnikitin Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SimpleHeum.hh,v 1.8 2006/06/29 18:23:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4SimpleHeum
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SimpleRunge.hh,v 1.8 2006/06/29 18:23:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4SimpleRunge
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UniformElectricField.hh,v 1.9 2006/06/29 18:23:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4UniformElectricField
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UniformMagField.hh,v 1.9 2006/06/29 18:23:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4UniformMagField
|
||||
|
||||
Reference in New Issue
Block a user