ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HelixMixedStepper.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4HelixMixedStepper.hh
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // G4HelixMixedStepper
27 //
28 // Class description:
29 //
30 // G4HelixMixedStepper split the Method used for Integration in two:
31 //
32 // If Stepping Angle ( h / R_curve) < pi/3 : use Stepper for small step
33 //
34 // Else use HelixExplicitEuler Stepper
35 //
36 // Stepper for the small step is G4ClassicalRK4 by default, but
37 // it possible to choose other stepper,like G4CashKarpRK45 or G4RKG3_Stepper,
38 // by setting StepperNumber : new HelixMixedStepper(EqRhs,N)
39 //
40 // N=2 G4SimpleRunge; N=3 G4SimpleHeum;
41 // N=4 G4ClassicalRK4;
42 // N=6 G4HelixImplicitEuler; N=7 G4HelixSimpleRunge;
43 // N=8 G4CashKarpRK45; N=9 G4ExactHelixStepper;
44 // N=10 G4RKG3_Stepper; N=13 G4NystromRK4
45 // N=23 BogackiShampine23 N=145 TsitourasRK45
46 // N=45 BogackiShampine45 N=745 DormandPrince745 (ie DoPri5)
47 //
48 // For completeness also available are:
49 // N=11 G4ExplicitEuler N=12 G4ImplicitEuler; -- Likely poor
50 // N=5 G4HelixExplicitEuler (testing only)
51 // For recommendations see comments in 'SetupStepper' method.
52 //
53 // Note: Like other helix steppers, only applicable in pure magnetic field
54 
55 // Created: T.Nikitina, CERN - 18.05.2007, derived from G4ExactHelicalStepper
56 // -------------------------------------------------------------------
57 #ifndef G4HELIXMIXEDSTEPPER_HH
58 #define G4HELIXMIXEDSTEPPER_HH
59 
60 #include "G4MagHelicalStepper.hh"
61 
63 {
64 
65  public:
66 
68  G4int StepperNumber = -1,
69  G4double Angle_threshold = -1.0);
71 
72  void Stepper( const G4double y[],
73  const G4double dydx[],
74  G4double h,
75  G4double yout[],
76  G4double yerr[] );
77  // Step 'integration' for step size 'h'
78  // If SteppingAngle= h/R_curve < pi/3 uses default RK stepper
79  // else use Helix Fast Method
80 
81  void DumbStepper( const G4double y[],
82  G4ThreeVector Bfld,
83  G4double h,
84  G4double yout[]);
85 
86  G4double DistChord() const;
87  // Estimate maximum distance of curved solution and chord ...
88 
89  public: // with description
90 
91  inline void SetVerbose (G4int newvalue) { fVerbose = newvalue; }
92 
93  public: // without description
94 
95  void PrintCalls();
97 
98  inline void SetAngleThreshold( G4double val ) { fAngle_threshold = val; }
100  inline G4int IntegratorOrder() const { return 4; }
101 
102  private:
103 
105  // Mixed Integration RK4 for 'small' steps
107  // Int ID of RK stepper
108 
110  // Threshold angle (in radians ) - above it Helical stepper is used
111 
112  private:
113 
115 
118  // Used for statistic = how many calls to different steppers
119 
120 };
121 
122 #endif