G4RKG3_Stepper.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 //
00028 // $Id: G4RKG3_Stepper.hh 69786 2013-05-15 09:38:51Z gcosmo $
00029 //
00030 //
00031 //
00032 // class G4RKG3_Stepper
00033 //
00034 // Class description:
00035 //
00036 // Integrator Runga-Kutta Stepper from Geant3.
00037 //
00038 // History:
00039 // - Created. J.Apostolakis, V.Grichine - 30.01.97
00040 // -------------------------------------------------------------------
00041 
00042 #ifndef G4RKG3_Stepper_hh
00043 #define G4RKG3_Stepper_hh
00044 
00045 #include "G4Types.hh"
00046 #include "G4MagIntegratorStepper.hh"
00047 #include "G4ThreeVector.hh"
00048 
00049 class G4Mag_EqRhs;
00050 
00051 class G4RKG3_Stepper : public G4MagIntegratorStepper
00052 {
00053   public:  // with description
00054 
00055     G4RKG3_Stepper(G4Mag_EqRhs *EqRhs);
00056       // Integrate over 6 variables only:  position & velocity.
00057       // Not implemented yet !
00058 
00059     ~G4RKG3_Stepper();
00060 
00061     void Stepper( const G4double yIn[],
00062                   const G4double dydx[],
00063                         G4double h,
00064                         G4double yOut[],
00065                         G4double yErr[]  );
00066       // The method which must be provided, even if less efficient.
00067 
00068     G4double  DistChord() const ;
00069  
00070     void StepNoErr( const G4double tIn[8],
00071                     const G4double dydx[6],
00072                           G4double Step,
00073                           G4double tOut[8],
00074                           G4double B[3] );
00075       // Integrator RK Stepper from G3 with only two field evaluation per 
00076       // Step. It is used in propagation initial Step by small substeps
00077       // after solution error and delta geometry considerations. 
00078       // B[3] is magnetic field which is passed from substep to substep.
00079 
00080     void StepWithEst( const G4double  tIn[8],
00081                       const G4double dydx[6],
00082                             G4double Step,
00083                             G4double tOut[8],
00084                             G4double& alpha2,
00085                             G4double& beta2,
00086                       const G4double B1[3],
00087                             G4double B2[3] );
00088       // Integrator for RK from G3 with evaluation of error in solution and delta
00089       // geometry based on naive similarity with the case of uniform magnetic field.
00090       // B1[3] is input  and is the first magnetic field values
00091       // B2[3] is output and is the final magnetic field values.
00092 
00093   public:  // without description
00094 
00095     G4int IntegratorOrder() const { return 4; }
00096 
00097   private:
00098 
00099     G4ThreeVector fyInitial,
00100                   fyMidPoint,
00101                   fyFinal;
00102    G4ThreeVector  fpInitial;
00103    G4ThreeVector  BfldIn;
00104    G4double       hStep;
00105 };
00106 
00107 #endif

Generated on Mon May 27 17:49:44 2013 for Geant4 by  doxygen 1.4.7