Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:39

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4MagErrorStepper
0027 //
0028 // Class description:
0029 //
0030 // Abstract base class for integrator of particle's equation of motion,
0031 // used in tracking in space dependent magnetic field.
0032 
0033 // Author: W.Wander <wwc@mit.edu>, 09.12.1997
0034 // --------------------------------------------------------------------
0035 #ifndef G4MAGERRORSTEPPER_HH
0036 #define G4MAGERRORSTEPPER_HH
0037 
0038 #include "G4Types.hh"
0039 #include "G4MagIntegratorStepper.hh"
0040 #include "G4Mag_EqRhs.hh"
0041 #include "G4ThreeVector.hh"
0042 
0043 class G4MagErrorStepper : public G4MagIntegratorStepper
0044 {
0045   public:
0046 
0047     G4MagErrorStepper(G4EquationOfMotion*EqRhs,
0048                       G4int numberOfVariables,
0049                       G4int numStateVariables = 12);
0050     ~G4MagErrorStepper() override;
0051   
0052     G4MagErrorStepper(const G4MagErrorStepper&) = delete;
0053     G4MagErrorStepper& operator=(const G4MagErrorStepper&) = delete;
0054 
0055     void Stepper( const G4double y[],
0056                   const G4double dydx[],
0057                         G4double h,
0058                         G4double yout[],
0059                         G4double yerr[] ) override;
0060       // The stepper for the Runge Kutta integration. The stepsize 
0061       // is fixed, with the Step size given by h.
0062       // Integrates ODE starting values y[0 to 6].
0063       // Outputs yout[] and its estimated error yerr[].
0064 
0065     virtual  void DumbStepper( const G4double y[],
0066                                const G4double dydx[],
0067                                      G4double h,
0068                                      G4double yout[] ) = 0;
0069       // Performs a 'dump' Step without error calculation.
0070 
0071     G4double DistChord() const override;
0072 
0073   private:
0074 
0075     // STATE
0076     G4ThreeVector fInitialPoint, fMidPoint, fFinalPoint;
0077       // Data stored in order to find the chord
0078  
0079     // Dependent Objects, owned --- part of the STATE 
0080     G4double *yInitial, *yMiddle, *dydxMid, *yOneStep;
0081       // The following arrays are used only for temporary storage
0082       // they are allocated at the class level only for efficiency -
0083       // so that calls to new and delete are not made in Stepper().
0084 };
0085 
0086 #include  "G4MagErrorStepper.icc"
0087 
0088 #endif