Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QSSDriver< T > Class Template Reference

G4QSSDriver is a templated driver class defining the QSS (Quantum State Simulation) Interpolator Driver. More...

#include <G4QSSDriver.hh>

Inheritance diagram for G4QSSDriver< T >:

Public Member Functions

 G4QSSDriver (T *stepper)
 G4QSSDriver (const G4QSSDriver &)=delete
const G4QSSDriveroperator= (const G4QSSDriver &)=delete
void OnStartTracking () override
G4double AdvanceChordLimited (G4FieldTrack &track, G4double hstep, G4double eps, G4double chordDistance) override
void OnComputeStep (const G4FieldTrack *track) override
void SetPrecision (G4double dq_rel, G4double dq_min)
G4double OneGoodStep (typename G4InterpolationDriver< T, true >::StepperIterator it, field_utils::State &y, field_utils::State &dydx, G4double &hstep, G4double epsStep, G4double curveLength, G4FieldTrack *track) override
Public Member Functions inherited from G4InterpolationDriver< T, true >
 G4InterpolationDriver (G4double hminimum, T *stepper, G4int numberOfComponents=6, G4int statisticsVerbosity=0)
 ~G4InterpolationDriver () override
 G4InterpolationDriver (const G4InterpolationDriver &)=delete
const G4InterpolationDriveroperator= (const G4InterpolationDriver &)=delete
G4bool DoesReIntegrate () const override
G4bool AccurateAdvance (G4FieldTrack &track, G4double hstep, G4double eps, G4double hinitial=0) override
void SetVerboseLevel (G4int level) override
G4int GetVerboseLevel () const override
void StreamInfo (std::ostream &os) const override
Public Member Functions inherited from G4RKIntegrationDriver< T >
 G4RKIntegrationDriver (T *stepper)
 G4RKIntegrationDriver (const G4RKIntegrationDriver &)=delete
G4RKIntegrationDriveroperator= (const G4RKIntegrationDriver &)=delete
void GetDerivatives (const G4FieldTrack &track, G4double dydx[]) const override
void GetDerivatives (const G4FieldTrack &track, G4double dydx[], G4double field[]) const override
G4double ComputeNewStepSize (G4double errMaxNorm, G4double hstepCurrent) final
G4EquationOfMotionGetEquationOfMotion () override
void SetEquationOfMotion (G4EquationOfMotion *equation) override
const T * GetStepper () const override
T * GetStepper () override
void StreamInfo (std::ostream &os) const override
G4double GetSafety () const
G4double GetPshrnk () const
G4double GetPgrow () const
void RenewStepperAndAdjust (G4MagIntegratorStepper *stepper) override
void ReSetParameters (G4double safety=0.9)
void SetSafety (G4double valS)
G4int GetMaxNoSteps () const
void SetMaxNoSteps (G4int val)
G4double GetSmallestFraction () const
void SetSmallestFraction (G4double val)
Public Member Functions inherited from G4VIntegrationDriver
virtual ~G4VIntegrationDriver ()=default
virtual G4bool QuickAdvance (G4FieldTrack &, const G4double[], G4double, G4double &, G4double &)

Additional Inherited Members

Protected Types inherited from G4InterpolationDriver< T, true >
using StepperIterator
using ConstStepperIterator
using Base
Protected Member Functions inherited from G4InterpolationDriver< T, true >
virtual G4double OneGoodStep (StepperIterator it, field_utils::State &y, field_utils::State &dydx, G4double &hstep, G4double eps, G4double curveLength, G4FieldTrack *track=nullptr)
void Interpolate (G4double curveLength, field_utils::State &y) const
void InterpolateImpl (G4double curveLength, ConstStepperIterator it, field_utils::State &y) const
G4double DistChord (const field_utils::State &yBegin, G4double curveLengthBegin, const field_utils::State &yEnd, G4double curveLengthEnd) const
G4double FindNextChord (const field_utils::State &yBegin, G4double curveLengthBegin, field_utils::State &yEnd, G4double curveLengthEnd, G4double dChord, G4double maxChordDistance)
G4double CalcChordStep (G4double stepTrialOld, G4double dChordStep, G4double fDeltaChord)
void PrintState () const
void CheckState () const
void AccumulateStatistics (G4int noTrials)
Protected Member Functions inherited from G4RKIntegrationDriver< T >
G4double ShrinkStepSize (G4double h, G4double error) const
G4double GrowStepSize (G4double h, G4double error) const
G4double ShrinkStepSize2 (G4double h, G4double error2) const
G4double GrowStepSize2 (G4double h, G4double error2) const
void UpdateErrorConstraints ()
Protected Attributes inherited from G4InterpolationDriver< T, true >
std::vector< InterpStepper > fSteppers
StepperIterator fLastStepper
G4bool fKeepLastStepper
G4double fhnext
G4double fMinimumStep
G4double fChordStepEstimate
const G4double fFractionNextEstimate
const G4double fSmallestCurveFraction
G4int fVerboseLevel
field_utils::State fdydx
G4bool fFirstStep
G4int fMaxTrials
G4int fTotalStepsForTrack
G4int fTotalNoTrials
G4int fNoCalls
G4int fmaxTrials
Static Protected Attributes inherited from G4VIntegrationDriver
static constexpr G4double max_stepping_increase = 5
static constexpr G4double max_stepping_decrease = 0.1

Detailed Description

template<class T>
class G4QSSDriver< T >

G4QSSDriver is a templated driver class defining the QSS (Quantum State Simulation) Interpolator Driver.

Definition at line 44 of file G4QSSDriver.hh.

Constructor & Destructor Documentation

◆ G4QSSDriver() [1/2]

template<class T>
G4QSSDriver< T >::G4QSSDriver ( T * stepper)
inline

Constructor for G4QSSDriver.

Parameters
[in]TPointer to the stepper algorithm.

Referenced by G4QSSDriver(), and operator=().

◆ G4QSSDriver() [2/2]

template<class T>
G4QSSDriver< T >::G4QSSDriver ( const G4QSSDriver< T > & )
delete

Copy constructor and assignment operator not allowed.

Member Function Documentation

◆ AdvanceChordLimited()

template<class T>
G4double G4QSSDriver< T >::AdvanceChordLimited ( G4FieldTrack & track,
G4double hstep,
G4double eps,
G4double chordDistance )
inlineoverridevirtual

Computes the step to take, based on chord limits.

Parameters
[in,out]trackThe current track in field.
[in]hstepProposed step length.
[in]epsRequested accuracy, y_err/hstep.
[in]chordDistanceMaximum sagitta distance.
Returns
The length of step taken.

Reimplemented from G4InterpolationDriver< T, true >.

◆ OnComputeStep()

template<class T>
void G4QSSDriver< T >::OnComputeStep ( const G4FieldTrack * track)
inlineoverridevirtual

Dispatch interface method for computing step.

Reimplemented from G4InterpolationDriver< T, true >.

◆ OneGoodStep()

template<class T>
G4double G4QSSDriver< T >::OneGoodStep ( typename G4InterpolationDriver< T, true >::StepperIterator it,
field_utils::State & y,
field_utils::State & dydx,
G4double & hstep,
G4double epsStep,
G4double curveLength,
G4FieldTrack * track )
inlineoverride

Takes one Step that is as large as possible while satisfying the accuracy criterion.

Parameters
[in]itStepper iterator.
[in,out]yThe current track state, y.
[in]dydxdydx array.
[in,out]hstepStep to attempt.
[in]epsStepThe relative accuracy.
[in]curveLengthStep start, x.
[in,out]trackPointer to the Field track. Not used.
Returns
The step achieved.

◆ OnStartTracking()

template<class T>
void G4QSSDriver< T >::OnStartTracking ( )
overridevirtual

Dispatch interface method for initialisation/reset of driver.

Reimplemented from G4InterpolationDriver< T, true >.

◆ operator=()

template<class T>
const G4QSSDriver & G4QSSDriver< T >::operator= ( const G4QSSDriver< T > & )
delete

◆ SetPrecision()

template<class T>
void G4QSSDriver< T >::SetPrecision ( G4double dq_rel,
G4double dq_min )
inline

Setter for driver precision parameters.


The documentation for this class was generated from the following file: