|
||||
File indexing completed on 2025-01-18 09:58:15
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 // G4ExactHelixStepper 0027 // 0028 // Class description: 0029 // 0030 // Concrete class for particle motion in constant magnetic field. 0031 // Helix a-la-Explicity Euler: x_1 = x_0 + helix(h) 0032 // with helix(h) being a helix piece of length h. 0033 // simplest approach for solving linear differential equations. 0034 // Take the current derivative and add it to the current position. 0035 // 0036 // As the field is assumed constant, an error is not calculated. 0037 0038 // Author: J.Apostolakis, 28.01.2005. 0039 // Implementation adapted from ExplicitEuler by W.Wander 0040 // -------------------------------------------------------------------- 0041 #ifndef G4EXACTHELIXSTEPPER_HH 0042 #define G4EXACTHELIXSTEPPER_HH 0043 0044 #include "G4Types.hh" 0045 #include "G4ThreeVector.hh" 0046 0047 #include "G4MagIntegratorStepper.hh" 0048 #include "G4MagHelicalStepper.hh" 0049 #include "G4Mag_EqRhs.hh" 0050 0051 class G4ExactHelixStepper : public G4MagHelicalStepper 0052 { 0053 public: 0054 0055 G4ExactHelixStepper(G4Mag_EqRhs* EqRhs); 0056 ~G4ExactHelixStepper() override; 0057 0058 G4ExactHelixStepper(const G4ExactHelixStepper&) = delete; 0059 G4ExactHelixStepper& operator=(const G4ExactHelixStepper&) = delete; 0060 0061 void Stepper( const G4double y[], 0062 const G4double dydx[], 0063 G4double h, 0064 G4double yout[], 0065 G4double yerr[] ) override; 0066 // Step 'integration' for step size 'h' 0067 // Provides helix starting at y[0 to 6] 0068 // Outputs yout[] and ZERO estimated error yerr[]=0. 0069 0070 void DumbStepper( const G4double y[], 0071 G4ThreeVector Bfld, 0072 G4double h, 0073 G4double yout[] ) override; 0074 // Performs a 'dump' Step without error calculation. 0075 0076 G4double DistChord() const override; 0077 // Estimate maximum distance of curved solution and chord ... 0078 0079 G4int IntegratorOrder() const override; 0080 0081 private: 0082 0083 G4ThreeVector fBfieldValue; 0084 // Initial value of field at last step 0085 }; 0086 0087 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |