70 if( angleThreshold < 0.0 )
72 fAngle_threshold = (1.0/3.0)*pi;
76 fAngle_threshold = angleThreshold;
86 fStepperNumber = stepperNumber;
120 if(Ang_curve < fAngle_threshold)
123 fRK4Stepper->
Stepper(yInput,dydx,Step,yOut,yErr);
127 constexpr G4int nvar = 6 ;
128 constexpr G4int nvarMax = 8 ;
129 G4double yTemp[nvarMax], yIn[nvarMax], yTemp2[nvarMax];
138 for(
G4int i=0; i<nvar; ++i)
161 for(
G4int i=0; i<nvar; ++i)
163 yErr[i] = yOut[i] - yTemp2[i];
189 distChord=
GetRadHelix()*(1-std::cos(0.5*Ang_curve));
195 distChord=
GetRadHelix()*(1+std::cos(0.5*(twopi-Ang_curve)));
209 G4cout <<
"In HelixMixedStepper::Number of calls to smallStepStepper = "
211 <<
" and Number of calls to Helix = " << fNumCallsHelix <<
G4endl;
219 if (fVerbose>0)
G4cout <<
" G4HelixMixedStepper: ";
220 switch ( StepperNumber )
225 if (fVerbose>0)
G4cout <<
"G4ClassicalRK4";
231 if (fVerbose>0)
G4cout <<
"G4CashKarpRKF45";
235 if (fVerbose>0)
G4cout <<
"G4NystromRK4";
241 if (fVerbose>0)
G4cout <<
"G4ImplicitEuler";
247 if (fVerbose>0)
G4cout <<
"G4SimpleRunge";
251 if (fVerbose>0)
G4cout <<
"G4SimpleHeum";
255 if (fVerbose>0)
G4cout <<
"G4BogackiShampine23";
262 if (fVerbose>0)
G4cout <<
"G4BogackiShampine45";
266 if (fVerbose>0)
G4cout <<
"G4TsitourasRK45";
270 if (fVerbose>0)
G4cout <<
"G4DormandPrince745";
276 if (fVerbose>0)
G4cout <<
"G4HelixImplicitEuler";
280 if (fVerbose>0)
G4cout <<
"G4HelixSimpleRunge";
284 if (fVerbose>0)
G4cout <<
"G4HelixExplicitEuler";
292 if (fVerbose>0)
G4cout <<
"G4ExactHelixStepper";
296 if (fVerbose>0)
G4cout <<
"G4RKG3_Stepper";
302 if (fVerbose>0)
G4cout <<
"G4ExplicitEuler";
306 if (fVerbose>0)
G4cout <<
"G4ImplicitEuler";
313 if (fVerbose>0)
G4cout <<
"G4DormandPrince745 (Default)";
319 G4cout <<
" chosen as stepper for small steps in G4HelixMixedStepper."
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
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[])
G4double DistChord() const
void DumbStepper(const G4double y[], G4ThreeVector Bfld, G4double h, G4double yout[])
G4MagIntegratorStepper * SetupStepper(G4Mag_EqRhs *EqRhs, G4int StepperName)
void SetCurve(const G4double Curve)
void AdvanceHelix(const G4double yIn[], G4ThreeVector Bfld, G4double h, G4double yHelix[], G4double yHelix2[]=0)
G4double GetRadHelix() const
void MagFieldEvaluate(const G4double y[], G4ThreeVector &Bfield)
G4double GetInverseCurve(const G4double Momentum, const G4double Bmag)
void SetAngCurve(const G4double Ang)
G4double GetAngCurve() const
virtual void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])=0