Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

G4IStepper.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------
00002 //
00003 // G4IStepper.h
00004 //
00005 //--------------------------------------------------------------
00006 #ifndef G4ISTEPPER_H
00007 #define G4ISTEPPER_H
00008 #ifndef CASSERT
00009 #include <cassert>
00010 #define CASSERT
00011 #endif
00012 #ifndef G4IBFIELD_H
00013 #include "G4I/G4IBField.h"
00014 #endif
00015 
00016 class BField;
00017 class G4Mag_UsualEqRhs;
00018 class G4ClassicalRK4;
00019 class G4MagInt_Driver;
00020 
00021 //======================================================================
00022 #ifdef SITE_HAS_GEANT4
00023 class G4IStepper {
00024 public:
00025   G4IStepper(BField* magField);
00026   G4IStepper(BField* magField, double stepMin, double errStep);
00027   ~G4IStepper();
00028   
00029   bool StepOnce(const double* xStart,
00030                 const double* vDir,
00031                 double momentum,
00032                 double mass,
00033                 double charge,
00034                 double stepSize,
00035                 double* xNext,
00036                 double* vDirNext,
00037                 double* pNext);
00038 
00039 private:
00040   double            fStepMin;     // Minimum step size (Geant4 internal units)
00041   double            fErrStep;     // Step size error
00042   G4IBField         fMagField;    // The magnetic field to use
00043   G4Mag_UsualEqRhs* fRhs;         // The right hand side of the eqn. of motion
00044   G4ClassicalRK4*   fStepper;     // The stepper class
00045   G4MagInt_Driver*  fDriver;      // The G4 integration driver
00046   double            fCurveLength; //...
00047 };
00048 
00049 //======================================================================
00050 #else  // SITE_HAS_GEANT4
00051 class G4IStepper {
00052 public:
00053   G4IStepper(BField* magField) { }
00054   G4IStepper(BField* magField, double stepMin, double errStep) { }
00055   ~G4IStepper() { }
00056   
00057   bool StepOnce(const double* xStart,
00058                 const double* vDir,
00059                 double momentum,
00060                 double mass,
00061                 double charge,
00062                 double stepSize,
00063                 double* xNext,
00064                 double* vDirNext,
00065                 double* pNext) { 
00066     assert("G4IStepper: Program compiled without GEANT4 support.\n"=0);
00067   }
00068 };
00069 #endif // SITE_HAS_GEANT4
00070 #endif // G4ISTEPPER_H
00071 

Generated on Mon Feb 15 11:06:45 2010 for loon by  doxygen 1.3.9.1