71 if( angleThreshold < 0.0 )
73 fAngle_threshold = (1.0/3.0)*pi;
77 fAngle_threshold = angleThreshold;
87 fStepperNumber = stepperNumber;
121 if(Ang_curve < fAngle_threshold)
124 fRK4Stepper->Stepper(yInput,dydx,Step,yOut,yErr);
128 constexpr G4int nvar = 6 ;
129 constexpr G4int nvarMax = 8 ;
130 G4double yTemp[nvarMax], yIn[nvarMax], yTemp2[nvarMax];
139 for(
G4int i=0; i<nvar; ++i)
162 for(
G4int i=0; i<nvar; ++i)
164 yErr[i] = yOut[i] - yTemp2[i];
190 distChord=
GetRadHelix()*(1-std::cos(0.5*Ang_curve));
196 distChord=
GetRadHelix()*(1+std::cos(0.5*(twopi-Ang_curve)));
210 G4cout <<
"In HelixMixedStepper::Number of calls to smallStepStepper = "
212 <<
" and Number of calls to Helix = " << fNumCallsHelix <<
G4endl;
220 if (fVerbose>0) {
G4cout <<
" G4HelixMixedStepper: ";
222 switch ( StepperNumber )
227 if (fVerbose>0) {
G4cout <<
"G4ClassicalRK4"; }
233 if (fVerbose>0) {
G4cout <<
"G4CashKarpRKF45"; }
237 if (fVerbose>0) {
G4cout <<
"G4NystromRK4"; }
243 if (fVerbose>0) {
G4cout <<
"G4ImplicitEuler"; }
249 if (fVerbose>0) {
G4cout <<
"G4SimpleRunge"; }
253 if (fVerbose>0) {
G4cout <<
"G4SimpleHeum"; }
257 if (fVerbose>0) {
G4cout <<
"G4BogackiShampine23"; }
264 if (fVerbose>0) {
G4cout <<
"G4BogackiShampine45"; }
268 if (fVerbose>0) {
G4cout <<
"G4TsitourasRK45"; }
272 if (fVerbose>0) {
G4cout <<
"G4DormandPrince745"; }
278 if (fVerbose>0) {
G4cout <<
"G4HelixImplicitEuler"; }
282 if (fVerbose>0) {
G4cout <<
"G4HelixSimpleRunge"; }
286 if (fVerbose>0) {
G4cout <<
"G4HelixExplicitEuler"; }
294 if (fVerbose>0) {
G4cout <<
"G4ExactHelixStepper"; }
298 if (fVerbose>0) {
G4cout <<
"G4RKG3_Stepper"; }
304 if (fVerbose>0) {
G4cout <<
"G4ExplicitEuler"; }
308 if (fVerbose>0) {
G4cout <<
"G4ImplicitEuler"; }
315 if (fVerbose>0) {
G4cout <<
"G4DormandPrince745 (Default)"; }
321 G4cout <<
" chosen as stepper for small steps in G4HelixMixedStepper."
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
G4BogackiShampine23 is an integrator of particle's equation of motion based on the Bogacki-Shampine n...
G4BogackiShampine45 is an integrator of particle's equation of motion based on the Bogacki-Shampine m...
G4CashKarpRKF45 implements the Cash-Karp Runge-Kutta-Fehlberg 4/5 method, an embedded fourth order me...
G4ClassicalRK4 integrates the equations of the motion of a particle in a magnetic field using the cla...
G4DormandPrince745 implements the 5th order embedded Runge-Kutta method, non-FSAL definition of the s...
G4ExactHelixStepper is a concrete class for particle motion in constant magnetic field....
G4ExplicitEuler implements an Explicit Euler stepper for magnetic field: x_1 = x_0 + h * dx_0....
G4HelixExplicitEuler implements an Explicit Euler stepper for magnetic field: x_1 = x_0 + helix(h),...
G4HelixImplicitEuler implements a helix implicit Euler stepper for magnetic field with 2nd order solv...
G4HelixMixedStepper(G4Mag_EqRhs *EqRhs, G4int StepperNumber=-1, G4double Angle_threshold=-1.0)
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[]) override
void DumbStepper(const G4double y[], G4ThreeVector Bfld, G4double h, G4double yout[]) override
~G4HelixMixedStepper() override
G4double DistChord() const override
G4MagIntegratorStepper * SetupStepper(G4Mag_EqRhs *EqRhs, G4int StepperName)
G4HelixSimpleRunge implements a simple Helix stepper for magnetic field with 2nd order solver.
G4ImplicitEuler implements a Euler stepper for magnetic field with 2nd order solver.
void SetCurve(const G4double Curve)
G4double GetRadHelix() const
void MagFieldEvaluate(const G4double y[], G4ThreeVector &Bfield)
G4MagHelicalStepper(G4Mag_EqRhs *EqRhs)
G4double GetInverseCurve(const G4double Momentum, const G4double Bmag)
void AdvanceHelix(const G4double yIn[], const G4ThreeVector &Bfld, G4double h, G4double yHelix[], G4double yHelix2[]=nullptr)
void SetAngCurve(const G4double Ang)
G4double GetAngCurve() const
G4MagIntegratorStepper is an abstract base class for integrator of particle's equation of motion,...
G4MagIntegratorStepper(G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12, G4bool isFSAL=false)
G4Mag_EqRhs is the "standard" equation of motion of a particle in a pure magnetic field.
G4NystromRK4 integrates the equations of the motion of a particle in a magnetic field using 4th Runge...
G4RKG3_Stepper implements a Runga-Kutta integrator stepper used in Geant-3.
G4SimpleHeum implements a simple Heum stepper for magnetic field with 3rd order solver.
G4SimpleRunge implements a simple Runge stepper for magnetic field with 2nd order solver.
G4TsitourasRK45 is an implementation of the 5(4) Runge-Kutta stepper (non-FSAL version).