BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSMagUsualEqRhs.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 BDSMAGUSUALEQRHS_H
19#define BDSMAGUSUALEQRHS_H
20
21#include "BDSAuxiliaryNavigator.hh"
22#include "BDSIntegratorDrift.hh"
23
24#include "globals.hh" // geant4 types / globals
25#include "G4MagIntegratorStepper.hh"
26#include "G4Mag_UsualEqRhs.hh"
27#include "G4ChargeState.hh"
28
35class BDSMagUsualEqRhs: public G4Mag_UsualEqRhs
36{
37public:
38 BDSMagUsualEqRhs(G4MagneticField* MagField);
39
40 virtual ~BDSMagUsualEqRhs(){;}
41
43 inline G4double FCof() const {return fCof_val;}
44
46 inline G4double Mass() const {return fMassCof;}
47
49 G4double Beta(const G4double y[6]);
50
52 G4double Beta(const G4ThreeVector& mom);
53
55 G4double TotalEnergy(const G4double y[]);
56
58 G4double TotalEnergy(const G4ThreeVector& mom);
59
61 virtual void SetChargeMomentumMass(G4ChargeState particleCharge,
62 G4double MomentumXc,
63 G4double particleMass);
64
65protected:
66 G4double fMassCof;
67 G4double fCof_val;
68
69};
70
71#endif
Override G4Mag_UsualEqRhs, provides BDSIM integrators access to particle attributes.
G4double fMassCof
Particle mass squared.
G4double TotalEnergy(const G4double y[])
Calculate total particle energy.
G4double Beta(const G4double y[6])
Calculate particle velocity W.R.T speed of light.
virtual void SetChargeMomentumMass(G4ChargeState particleCharge, G4double MomentumXc, G4double particleMass)
Copy of class method from G4Mag_UsualEqRhs.
G4double FCof() const
Accessor to variable for normalising to charge.
G4double Mass() const
Accessor to particle mass.