00001
00002
00003
00004
00005
00006
00007
00008 #ifndef BDSHELIXSTEPPER_HH
00009 #define BDSHELIXSTEPPER_HH
00010 #include "globals.hh"
00011 #include "G4MagIntegratorStepper.hh"
00012 #include "G4ThreeVector.hh"
00013 #include "G4Navigator.hh"
00014 #include "G4Mag_EqRhs.hh"
00015
00016
00017 class BDSHelixStepper : public G4MagIntegratorStepper
00018 {
00019
00020 public:
00021
00022 BDSHelixStepper(G4Mag_EqRhs *EqRhs);
00023
00024 ~BDSHelixStepper();
00025
00026 void Stepper( const G4double y[],
00027 const G4double dydx[],
00028 const G4double h,
00029 G4double yout[],
00030 G4double yerr[] );
00031
00032
00033
00034
00035
00036 G4double DistChord() const;
00037
00038
00039 void SetBField(G4double aBfield);
00040 G4double GetBField();
00041
00042 void StepperName();
00043
00044
00045
00046
00047
00048
00049
00050
00051 public:
00052
00053 G4int IntegratorOrder()const { return 2; }
00054
00055 protected:
00056
00057
00058 void AdvanceHelix( const G4double yIn[],
00059 G4double h,
00060 G4double yHelix[]);
00061
00062
00063 private:
00064
00065 G4ThreeVector yInitial, yMidPoint, yFinal;
00066
00067
00068 G4Mag_EqRhs* its_EqRhs;
00069
00070 G4double itsBField;
00071 G4ThreeVector itsInitialPoint, itsFinalPoint, itsMidPoint,itsDistVec;
00072 G4double itsDist;
00073
00074 };
00075
00076 inline void BDSHelixStepper::SetBField(G4double aBField)
00077 {itsBField=aBField;
00078 }
00079 inline G4double BDSHelixStepper::GetBField()
00080 {return itsBField;}
00081
00082 inline void BDSHelixStepper::StepperName()
00083 {G4cout<<"BDSHelixStepper"<<G4endl;}
00084
00085 #endif