BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSIntegratorRMatrixThin.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef BDSINTEGRATORRMATRIXTHIN_HH
21#define BDSINTEGRATORRMATRIXTHIN_HH
22
23#include "BDSIntegratorMag.hh"
24
25#include "globals.hh"
26
27class G4Mag_EqRhs;
29
43{
44public:
46 G4Mag_EqRhs* eqOfMIn,
47 G4double maximumRadiusIn);
48
49 virtual ~BDSIntegratorRMatrixThin(){;}
50
51 virtual void Stepper(const G4double y[],
52 const G4double dydx[],
53 const G4double h,
54 G4double yOut[],
55 G4double yErr[]);
56
57private:
59
60protected:
61 // matrix elements set differently in derived cavity fringe class.
62 G4double kick1;
63 G4double kick2;
64 G4double kick3;
65 G4double kick4;
66 G4double rmat11;
67 G4double rmat12;
68 G4double rmat13;
69 G4double rmat14;
70 G4double rmat21;
71 G4double rmat22;
72 G4double rmat23;
73 G4double rmat24;
74 G4double rmat31;
75 G4double rmat32;
76 G4double rmat33;
77 G4double rmat34;
78 G4double rmat41;
79 G4double rmat42;
80 G4double rmat43;
81 G4double rmat44;
82
83 G4double maximumRadius;
84};
85
86#endif
Common functionality to BDSIM integrators.
Integrator that just moves the particle parallel to the s axis.
Efficient storage of magnet strengths.