Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HelixSimpleRunge Class Reference

G4HelixSimpleRunge implements a simple Helix stepper for magnetic field with 2nd order solver. More...

#include <G4HelixSimpleRunge.hh>

Inheritance diagram for G4HelixSimpleRunge:

Public Member Functions

 G4HelixSimpleRunge (G4Mag_EqRhs *EqRhs)
 ~G4HelixSimpleRunge () override=default
void DumbStepper (const G4double y[], G4ThreeVector Bfld, G4double h, G4double yout[]) override
G4int IntegratorOrder () const override
G4StepperType StepperType () const override
Public Member Functions inherited from G4MagHelicalStepper
 G4MagHelicalStepper (G4Mag_EqRhs *EqRhs)
 ~G4MagHelicalStepper () override=default
 G4MagHelicalStepper (const G4MagHelicalStepper &)=delete
G4MagHelicalStepperoperator= (const G4MagHelicalStepper &)=delete
void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[]) override
G4double DistChord () const override
Public Member Functions inherited from G4MagIntegratorStepper
 G4MagIntegratorStepper (G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12, G4bool isFSAL=false)
virtual ~G4MagIntegratorStepper ()=default
 G4MagIntegratorStepper (const G4MagIntegratorStepper &)=delete
G4MagIntegratorStepperoperator= (const G4MagIntegratorStepper &)=delete
void NormaliseTangentVector (G4double vec[6])
void NormalisePolarizationVector (G4double vec[12])
void RightHandSide (const G4double y[], G4double dydx[]) const
void RightHandSide (const G4double y[], G4double dydx[], G4double field[]) const
G4int GetNumberOfVariables () const
G4int GetNumberOfStateVariables () const
G4int IntegrationOrder ()
G4EquationOfMotionGetEquationOfMotion ()
const G4EquationOfMotionGetEquationOfMotion () const
void SetEquationOfMotion (G4EquationOfMotion *newEquation)
unsigned long GetfNoRHSCalls ()
void ResetfNORHSCalls ()
G4bool IsFSAL () const
G4bool isQSS () const
void SetIsQSS (G4bool val)

Additional Inherited Members

Protected Member Functions inherited from G4MagHelicalStepper
void LinearStep (const G4double yIn[], G4double h, G4double yHelix[]) const
void AdvanceHelix (const G4double yIn[], const G4ThreeVector &Bfld, G4double h, G4double yHelix[], G4double yHelix2[]=nullptr)
void MagFieldEvaluate (const G4double y[], G4ThreeVector &Bfield)
G4double GetInverseCurve (const G4double Momentum, const G4double Bmag)
void SetAngCurve (const G4double Ang)
G4double GetAngCurve () const
void SetCurve (const G4double Curve)
G4double GetCurve () const
void SetRadHelix (const G4double Rad)
G4double GetRadHelix () const
Protected Member Functions inherited from G4MagIntegratorStepper
void SetIntegrationOrder (G4int order)
void SetFSAL (G4bool flag=true)

Detailed Description

G4HelixSimpleRunge implements a simple Helix stepper for magnetic field with 2nd order solver.

Definition at line 49 of file G4HelixSimpleRunge.hh.

Constructor & Destructor Documentation

◆ G4HelixSimpleRunge()

G4HelixSimpleRunge::G4HelixSimpleRunge ( G4Mag_EqRhs * EqRhs)

Constructor for G4HelixSimpleRunge.

Parameters
[in]EqRhsPointer to the provided equation of motion.

Definition at line 41 of file G4HelixSimpleRunge.cc.

42 : G4MagHelicalStepper(EqRhs)
43{
44}
G4MagHelicalStepper(G4Mag_EqRhs *EqRhs)

◆ ~G4HelixSimpleRunge()

G4HelixSimpleRunge::~G4HelixSimpleRunge ( )
overridedefault

Default Destructor.

Member Function Documentation

◆ DumbStepper()

void G4HelixSimpleRunge::DumbStepper ( const G4double y[],
G4ThreeVector Bfld,
G4double h,
G4double yout[] )
overridevirtual

The stepper function for the integration.

Parameters
[in]yStarting values array of integration variables.
[in]BfldThe field vector.
[in]hThe given step size.
[out]youtIntegration output.

Implements G4MagHelicalStepper.

Definition at line 47 of file G4HelixSimpleRunge.cc.

51{
52 const G4int nvar = 6 ;
53 G4double yTemp[nvar]; // , yAdd[nvar];
54 G4ThreeVector Bfld_midpoint;
55
56 AdvanceHelix( yIn, Bfld, 0.5 * h, yTemp);
57
58 // now obtain the new field value at the new point
59 //
60 MagFieldEvaluate(yTemp, Bfld_midpoint);
61
62 AdvanceHelix( yIn, Bfld_midpoint, h, yOut);
63
64 // NormaliseTangentVector( yOut );
65}
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
void MagFieldEvaluate(const G4double y[], G4ThreeVector &Bfield)
void AdvanceHelix(const G4double yIn[], const G4ThreeVector &Bfld, G4double h, G4double yHelix[], G4double yHelix2[]=nullptr)

◆ IntegratorOrder()

G4int G4HelixSimpleRunge::IntegratorOrder ( ) const
inlineoverridevirtual

Returns the order, 2, of integration.

Implements G4MagIntegratorStepper.

Definition at line 79 of file G4HelixSimpleRunge.hh.

79{ return 2; }

◆ StepperType()

G4StepperType G4HelixSimpleRunge::StepperType ( ) const
inlineoverridevirtual

Returns the stepper type-ID, "kHelixSimpleRunge".

Reimplemented from G4MagIntegratorStepper.

Definition at line 84 of file G4HelixSimpleRunge.hh.

84{ return kHelixSimpleRunge; }
@ kHelixSimpleRunge
G4HelixSimpleRunge.

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