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 | // $Id: G4ExactHelixStepper.hh,v 1.5 2007/05/18 12:50:31 tnikitin Exp $ |
---|
27 | // GEANT4 tag $Name: HEAD $ |
---|
28 | // |
---|
29 | // |
---|
30 | // class G4ExactHelixStepper |
---|
31 | // ------------------- |
---|
32 | // Class description: |
---|
33 | // |
---|
34 | // Concrete class for particle motion in constant magnetic field. |
---|
35 | |
---|
36 | // History: |
---|
37 | // - 28.Jan.05 J.Apostolakis Creation of new concrete class |
---|
38 | // -------------------------------------------------------------------- |
---|
39 | |
---|
40 | #ifndef G4ExactHelixStepper_hh |
---|
41 | #define G4ExactHelixStepper_hh |
---|
42 | |
---|
43 | #include "G4Types.hh" |
---|
44 | #include "G4ThreeVector.hh" |
---|
45 | |
---|
46 | #include "G4MagIntegratorStepper.hh" |
---|
47 | #include "G4MagHelicalStepper.hh" |
---|
48 | #include "G4Mag_EqRhs.hh" |
---|
49 | |
---|
50 | class G4ExactHelixStepper : public G4MagHelicalStepper |
---|
51 | { |
---|
52 | public: // with description |
---|
53 | |
---|
54 | G4ExactHelixStepper(G4Mag_EqRhs *EqRhs); |
---|
55 | ~G4ExactHelixStepper(); |
---|
56 | |
---|
57 | void Stepper( const G4double y[], |
---|
58 | const G4double dydx[], |
---|
59 | G4double h, |
---|
60 | G4double yout[], |
---|
61 | G4double yerr[] ); |
---|
62 | // Step 'integration' for step size 'h' |
---|
63 | // Provides helix starting at y[0 to 6] |
---|
64 | // Outputs yout[] and ZERO estimated error yerr[]=0. |
---|
65 | |
---|
66 | void DumbStepper( const G4double y[], |
---|
67 | G4ThreeVector Bfld, |
---|
68 | G4double h, |
---|
69 | G4double yout[] ); |
---|
70 | // Performs a 'dump' Step without error calculation. |
---|
71 | |
---|
72 | G4double DistChord() const; |
---|
73 | // Estimate maximum distance of curved solution and chord ... |
---|
74 | |
---|
75 | virtual G4int IntegratorOrder() const; |
---|
76 | |
---|
77 | private: |
---|
78 | |
---|
79 | G4ExactHelixStepper(const G4ExactHelixStepper&); |
---|
80 | G4ExactHelixStepper& operator=(const G4ExactHelixStepper&); |
---|
81 | // Private copy constructor and assignment operator. |
---|
82 | |
---|
83 | private: |
---|
84 | G4ThreeVector fBfieldValue; // Initial value of field at last step |
---|
85 | G4ThreeVector yInitialEHS, yFinalEHS; |
---|
86 | G4ThreeVector pInitial; |
---|
87 | G4double fLastStepSize; // Length of last step |
---|
88 | G4double fYInSav[7]; // Starting state of x, p, ... |
---|
89 | // Values saved for calculating mid-point for chord |
---|
90 | |
---|
91 | G4Mag_EqRhs* fPtrMagEqOfMot; |
---|
92 | }; |
---|
93 | |
---|
94 | |
---|
95 | |
---|
96 | #endif /* G4ExactHelixStepper_hh */ |
---|