Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
@@ -35,7 +35,7 @@
// - Most obtain an error by breaking up the step in two
// - G4ExactHelicalStepper does not provide an error estimate
// Created: J.Apostolakis, CERN - 05.11.1998
// Author: John Apostolakis (CERN), 05.11.1998
// --------------------------------------------------------------------
#ifndef G4MAGHELICALSTEPPER_HH
#define G4MAGHELICALSTEPPER_HH
@@ -47,76 +47,115 @@
#include "G4Mag_EqRhs.hh"
#include "G4ThreeVector.hh"
/**
* @brief G4MagHelicalStepper is an abstract base class for integrator of
* particle's equation of motion, used in tracking in space dependent magnetic
* field, and for a set of steppers which use the helix as 'first order'
* solution.
*/
class G4MagHelicalStepper : public G4MagIntegratorStepper
{
public:
/**
* Constructor for G4MagHelicalStepper.
* @param[in] EqRhs Pointer to the provided equation of motion.
*/
G4MagHelicalStepper(G4Mag_EqRhs *EqRhs);
~G4MagHelicalStepper() override;
/**
* Default Destructor.
*/
~G4MagHelicalStepper() override = default;
/**
* Copy constructor and assignment operator not allowed.
*/
G4MagHelicalStepper(const G4MagHelicalStepper&) = delete;
G4MagHelicalStepper& operator=(const G4MagHelicalStepper&) = delete;
/**
* The stepper for the Runge Kutta integration.
* The stepsize is fixed, with the step size given by 'h'.
* Integrates ODE starting values y[0 to 6].
* Outputs yout[] and its estimated error yerr[].
* @param[in] y Starting values array of integration variables.
* @param[in] dydx Derivatives array.
* @param[in] h The given step size.
* @param[out] yout Integration output.
* @param[out] yerr The estimated error.
*/
void Stepper( const G4double y[], // VIRTUAL for ExactHelix
const G4double dydx[],
G4double h,
G4double yout[],
G4double yerr[] ) override;
// The stepper for the Runge Kutta integration.
// The stepsize is fixed, equal to h.
// Integrates ODE starting values y[0 to 6]
// Outputs yout[] and its estimated error yerr[].
virtual void DumbStepper( const G4double y[],
G4ThreeVector Bfld,
G4double h,
G4double yout[] ) = 0;
// Performs a 'dump' Step without error calculation.
/**
* Same as Stepper() function above, but should perform a 'dump' step
* without error calculation. To be implemented in concrete derived classes.
*/
virtual void DumbStepper( const G4double y[],
G4ThreeVector Bfld,
G4double h,
G4double yout[] ) = 0;
/**
* Estimates the maximum distance of curved solution and chord.
*/
G4double DistChord()const override ;
// Estimate maximum distance of curved solution and chord ...
protected:
/**
* Performs a linear Step in regions without magnetic field.
*/
inline void LinearStep( const G4double yIn[],
G4double h,
G4double yHelix[]) const;
// A linear Step in regions without magnetic field.
/**
* A first order Step along a helix inside the field.
*/
void AdvanceHelix( const G4double yIn[],
const G4ThreeVector& Bfld,
G4double h,
G4double yHelix[], G4double yHelix2[] = nullptr);
// A first order Step along a helix inside the field.
/**
* Evaluates the field at a certain point.
*/
inline void MagFieldEvaluate( const G4double y[], G4ThreeVector& Bfield );
// Evaluate the field at a certain point.
/**
* Evaluates inverse of Curvature of Track.
*/
inline G4double GetInverseCurve( const G4double Momentum,
const G4double Bmag );
// Evaluate Inverse of Curvature of Track
// Store and use the parameters of track :
// radius of curve, Stepping angle, Radius of projected helix
/**
* Modifiers and accessors for storing and using the parameters of a track:
* radius of curve, Stepping angle, Radius of projected helix.
*/
inline void SetAngCurve(const G4double Ang);
inline G4double GetAngCurve()const;
inline void SetCurve(const G4double Curve);
inline G4double GetCurve()const;
inline void SetRadHelix(const G4double Rad);
inline G4double GetRadHelix()const;
private:
/** As in G4Mag_EqRhs.hh/cc where it is not used. */
static const G4double fUnitConstant;
// As in G4Mag_EqRhs.hh/cc where it is not used.
G4Mag_EqRhs* fPtrMagEqOfMot = nullptr;
// Data stored in order to find the chord
//
/** Data stored in order to find the chord. */
G4double fAngCurve = 0.0;
G4double frCurve = 0.0;
G4double frHelix = 0.0;