BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSIntegratorMultipoleThin.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSINTEGRATORMULTIPOLETHIN_H
19#define BDSINTEGRATORMULTIPOLETHIN_H
20
21#include "BDSIntegratorMag.hh"
22
23#include "globals.hh"
24#include <list>
25#include <vector>
26
27class G4Mag_EqRhs;
29
37{
38public:
40 G4double brhoIn,
41 G4Mag_EqRhs* eqOfMIn);
42
44
48 virtual void Stepper(const G4double yIn[],
49 const G4double dydx[],
50 const G4double h,
51 G4double yOut[],
52 G4double yErr[]);
53
57 void OneStep(const G4ThreeVector& posIn,
58 const G4ThreeVector& momUIn, // assumed unit momentum of momIn
59 const G4double momIn,
60 G4ThreeVector& posOut,
61 G4ThreeVector& momOut,
62 G4double h) const;
63
64private:
67
69 G4int Factorial(G4int n);
70
72 G4double brho;
73
75 G4double b0l;
77 std::list<double> bnl;
78 std::list<double> bsl;
79 std::vector<G4int> nfact;
81};
82
83#endif
Common functionality to BDSIM integrators.
Integrator that ignores the field and uses the analytical solution to a multipole.
std::vector< G4int > nfact
Higher order components.
G4int Factorial(G4int n)
Calculate the factorial of n.
void OneStep(const G4ThreeVector &posIn, const G4ThreeVector &momUIn, const G4double momIn, G4ThreeVector &posOut, G4ThreeVector &momOut, G4double h) const
BDSIntegratorMultipoleThin()=delete
Private default constructor to enforce use of supplied constructor.
std::list< double > bsl
Higher order components.
G4double brho
Magnetic rigidity for momentum scaling.
virtual void Stepper(const G4double yIn[], const G4double dydx[], const G4double h, G4double yOut[], G4double yErr[])
std::list< double > bnl
Higher order components.
Efficient storage of magnet strengths.