Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -23,10 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4FieldTrack
// G4FieldTrack
//
// Class description:
//
@@ -36,21 +33,15 @@
// - does not maintain any relationship between its data (eg energy/momentum).
// - for use in Runge-Kutta solver (in passing it the values right now).
// History
// - First version: Oct 14, 1996 John Apostolakis
// - Modified: Oct 24, 1996 JA: Added dist_on_curve, deleted constructor
// Nov 5, 1998 JA: Added energy, momentum, TOF, spin &
// several constructor, access, set methods
// May 10, 2006 JA: Added charge, "default" constructor
// Author: John Apostolakis, CERN - First version, 14.10.1996
// -------------------------------------------------------------------
#ifndef G4FieldTrack_HH
#define G4FieldTrack_HH
#ifndef G4FIELDTRACK_HH
#define G4FIELDTRACK_HH
#include "G4ThreeVector.hh"
#include "G4ChargeState.hh"
class G4FieldTrack
class G4FieldTrack
{
public: // with description
@@ -61,36 +52,12 @@ class G4FieldTrack
G4double restMass_c2,
G4double charge,
const G4ThreeVector& polarization,
G4double magnetic_dipole_moment= 0.0,
G4double curve_length= 0.0,
G4double magnetic_dipole_moment = 0.0,
G4double curve_length = 0.0,
G4double PDGspin = -1.0 );
G4FieldTrack( const G4FieldTrack& pFieldTrack );
G4FieldTrack( char ); // Almost default constructor
~G4FieldTrack();
// End of preferred Constructors / Destructor
inline void
UpdateState( const G4ThreeVector& pPosition,
G4double LaboratoryTimeOfFlight,
const G4ThreeVector& pMomentumDirection,
G4double kineticEnergy);
// Update four-vectors for space/time and momentum/energy
// Also resets curve length.
inline
void UpdateFourMomentum( G4double kineticEnergy,
const G4ThreeVector& momentumDirection );
// Update momentum (and direction), and kinetic energy
void SetChargeAndMoments(G4double charge,
G4double magnetic_dipole_moment= DBL_MAX,
G4double electric_dipole_moment= DBL_MAX,
G4double magnetic_charge=DBL_MAX );
// Sets the charges and moments that are not given as DBL_MAX
inline void SetPDGSpin(G4double pdgSpin){ fChargeState.SetPDGSpin(pdgSpin); }
inline G4double GetPDGSpin(){ return fChargeState.GetPDGSpin(); }
G4FieldTrack( char );
// Almost default constructor
G4FieldTrack( const G4ThreeVector& pPosition,
const G4ThreeVector& pMomentumDirection,
@@ -98,31 +65,56 @@ class G4FieldTrack
G4double kineticEnergy,
const G4double restMass_c2,
G4double velocity,
G4double LaboratoryTimeOfFlight=0.0,
G4double ProperTimeOfFlight=0.0,
const G4ThreeVector* pPolarization=0,
G4double LaboratoryTimeOfFlight = 0.0,
G4double ProperTimeOfFlight = 0.0,
const G4ThreeVector* pPolarization = nullptr,
G4double PDGspin = -1.0 );
// Older constructor
// ---> Misses charge !!!
// Older constructor
// ---> Misses charge !!!
inline G4FieldTrack& operator = ( const G4FieldTrack & rStVec );
// Assignment operator
~G4FieldTrack();
// Destructor
inline G4ThreeVector GetMomentum() const;
inline G4ThreeVector GetPosition() const;
inline G4FieldTrack( const G4FieldTrack& pFieldTrack );
inline G4FieldTrack& operator= ( const G4FieldTrack& rStVec );
// Copy constructor & Assignment operator
inline void UpdateState( const G4ThreeVector& pPosition,
G4double LaboratoryTimeOfFlight,
const G4ThreeVector& pMomentumDirection,
G4double kineticEnergy);
// Update four-vectors for space/time and momentum/energy
// Also resets curve length.
inline void UpdateFourMomentum( G4double kineticEnergy,
const G4ThreeVector& momentumDirection );
// Update momentum (and direction), and kinetic energy
void SetChargeAndMoments(G4double charge,
G4double magnetic_dipole_moment = DBL_MAX,
G4double electric_dipole_moment = DBL_MAX,
G4double magnetic_charge = DBL_MAX );
// Set the charges and moments that are not given as DBL_MAX
inline void SetPDGSpin(G4double pdgSpin);
inline G4double GetPDGSpin();
inline G4ThreeVector GetMomentum() const;
inline G4ThreeVector GetPosition() const;
inline const G4ThreeVector& GetMomentumDir() const;
inline G4ThreeVector GetMomentumDirection() const;
inline G4double GetCurveLength() const;
inline G4ThreeVector GetMomentumDirection() const;
inline G4double GetCurveLength() const;
// Distance along curve of point.
inline G4ThreeVector GetPolarization() const;
inline void SetPolarization( const G4ThreeVector& vecPol );
inline G4ThreeVector GetPolarization() const;
inline void SetPolarization( const G4ThreeVector& vecPol );
inline G4double GetLabTimeOfFlight() const;
inline G4double GetProperTimeOfFlight() const;
inline G4double GetKineticEnergy() const;
inline G4double GetCharge() const;
inline G4double GetRestMass() const { return fRestMass_c2; }
inline const G4ChargeState* GetChargeState() const;
inline G4double GetLabTimeOfFlight() const;
inline G4double GetProperTimeOfFlight() const;
inline G4double GetKineticEnergy() const;
inline G4double GetCharge() const;
inline G4double GetRestMass() const;
// Accessors.
inline void SetPosition(G4ThreeVector nPos);
@@ -132,7 +124,7 @@ class G4FieldTrack
inline void SetMomentumDir(G4ThreeVector nMomDir);
// Does NOT change Momentum or Velocity Vector.
inline void SetRestMass(G4double Mass_c2) { fRestMass_c2= Mass_c2; }
inline void SetRestMass(G4double Mass_c2);
inline void SetCurveLength(G4double nCurve_s);
// Distance along curve.
@@ -155,35 +147,32 @@ class G4FieldTrack
operator<<( std::ostream& os, const G4FieldTrack& SixVec);
public: // Obsolete methods -- due to potential confusion with PDG spin
inline void InitialiseSpin( const G4ThreeVector& vecPolarization )
{ SetPolarization( vecPolarization ); }
inline G4ThreeVector GetSpin() const { return GetPolarization(); }
inline void SetSpin(G4ThreeVector vSpin){ SetPolarization(vSpin); }
inline void InitialiseSpin( const G4ThreeVector& vecPolarization );
inline G4ThreeVector GetSpin() const;
inline void SetSpin(G4ThreeVector vSpin);
private: // Implementation method -- Obsolete
inline G4FieldTrack& SetCurvePnt(const G4ThreeVector& pPosition,
const G4ThreeVector& pMomentum,
G4double s_curve );
G4double s_curve );
private:
G4double SixVector[6];
G4double fDistanceAlongCurve; // distance along curve of point
G4double fKineticEnergy;
G4double fRestMass_c2;
G4double fLabTimeOfFlight;
G4double fProperTimeOfFlight;
G4double SixVector[6];
G4double fDistanceAlongCurve; // distance along curve of point
G4double fKineticEnergy;
G4double fRestMass_c2;
G4double fLabTimeOfFlight;
G4double fProperTimeOfFlight;
G4ThreeVector fPolarization;
G4ThreeVector fMomentumDir;
// G4double fInitialMomentumMag; // At 'track' creation.
// G4double fLastMomentumMag; // From last Update (for checking.)
G4ChargeState fChargeState;
public: // Access
const G4ChargeState* GetChargeState() const { return &fChargeState; }
};
#include "G4FieldTrack.icc"
#endif /* End of ifndef G4FieldTrack_HH */
#endif