00001
00002 #ifndef BDSRK4Stepper_h
00003 #define BDSRK4Stepper_h 1
00004
00005
00006 #include "globals.hh"
00007 #include "G4MagIntegratorStepper.hh"
00008 #include "G4EquationOfMotion.hh"
00009 #include "G4Mag_EqRhs.hh"
00010 #include "G4ThreeVector.hh"
00011 #include "G4Navigator.hh"
00012
00013 class BDSRK4Stepper : public G4MagIntegratorStepper
00014 {
00015
00016 public:
00017
00018 BDSRK4Stepper(G4EquationOfMotion *EqRhs, int nvar=6);
00019
00020
00021 ~BDSRK4Stepper();
00022
00023 void Stepper( const G4double y[],
00024 const G4double dydx[],
00025 const G4double h,
00026 G4double yout[],
00027 G4double yerr[] );
00028
00029
00030
00031
00032
00033 G4double DistChord() const;
00034
00035
00036
00037 void StepperName();
00038
00039 void SetVolLength(G4double aVolLength);
00040
00041
00042 G4int IntegratorOrder()const { return 2; }
00043
00044 protected:
00045
00046
00047 void AdvanceHelix( const G4double yIn[],
00048 const G4double dydx[],
00049 const G4double h,
00050 G4double yRK[]);
00051
00052
00053 private:
00054
00055 G4ThreeVector yInitial, yMidPoint, yFinal;
00056
00057
00058 G4EquationOfMotion* itsEqRhs;
00059
00060 G4double itsDist;
00061
00062 G4double itsVolLength;
00063
00064 G4double *yt, *dydx, *dydxt, *dydxm, *dydxr, *yTemp, *yIn;
00065
00066 };
00067
00068 inline void BDSRK4Stepper::SetVolLength(G4double aVolLength)
00069 {itsVolLength=aVolLength;
00070 }
00071 inline void BDSRK4Stepper::StepperName()
00072 {G4cout<<"BDSRK4Stepper"<<G4endl;}
00073
00074 #endif