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: ";
221 switch ( StepperNumber )
226 if (fVerbose>0) {
G4cout <<
"G4ClassicalRK4"; }
232 if (fVerbose>0) {
G4cout <<
"G4CashKarpRKF45"; }
236 if (fVerbose>0) {
G4cout <<
"G4NystromRK4"; }
242 if (fVerbose>0) {
G4cout <<
"G4ImplicitEuler"; }
248 if (fVerbose>0) {
G4cout <<
"G4SimpleRunge"; }
252 if (fVerbose>0) {
G4cout <<
"G4SimpleHeum"; }
256 if (fVerbose>0) {
G4cout <<
"G4BogackiShampine23"; }
263 if (fVerbose>0) {
G4cout <<
"G4BogackiShampine45"; }
267 if (fVerbose>0) {
G4cout <<
"G4TsitourasRK45"; }
271 if (fVerbose>0) {
G4cout <<
"G4DormandPrince745"; }
277 if (fVerbose>0) {
G4cout <<
"G4HelixImplicitEuler"; }
281 if (fVerbose>0) {
G4cout <<
"G4HelixSimpleRunge"; }
285 if (fVerbose>0) {
G4cout <<
"G4HelixExplicitEuler"; }
293 if (fVerbose>0) {
G4cout <<
"G4ExactHelixStepper"; }
297 if (fVerbose>0) {
G4cout <<
"G4RKG3_Stepper"; }
303 if (fVerbose>0) {
G4cout <<
"G4ExplicitEuler"; }
307 if (fVerbose>0) {
G4cout <<
"G4ImplicitEuler"; }
314 if (fVerbose>0) {
G4cout <<
"G4DormandPrince745 (Default)"; }
320 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[]) 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)
void SetCurve(const G4double Curve)
G4double GetRadHelix() const
void MagFieldEvaluate(const G4double y[], G4ThreeVector &Bfield)
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
virtual void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])=0