BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
__w
bdsim
bdsim
include
BDSBeamlineIntegral.hh
1
/*
2
Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4
This file is part of BDSIM.
5
6
BDSIM is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published
8
by the Free Software Foundation version 3 of the License.
9
10
BDSIM is distributed in the hope that it will be useful, but
11
WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
#ifndef BDSBEAMLINEINTEGRAL_H
19
#define BDSBEAMLINEINTEGRAL_H
20
21
#include "BDSParticleDefinition.hh"
22
23
#include "G4Types.hh"
24
25
namespace
GMAD
26
{
27
struct
Element
;
28
}
29
39
class
BDSBeamlineIntegral
40
{
41
public
:
42
BDSBeamlineIntegral
() =
delete
;
43
explicit
BDSBeamlineIntegral
(
const
BDSParticleDefinition
& incomingParticle,
44
G4double T0In = 0,
45
G4double integratedArcLength = 0,
46
G4bool integrateKineticEnergyIn =
true
);
47
~BDSBeamlineIntegral
();
48
51
void
Integrate
(
const
GMAD::Element
& componentAsDefined);
52
57
G4double
ProvideSynchronousTAtCentreOfNextElement
(
const
GMAD::Element
* el)
const
;
58
61
G4double
ProvideSynchronousTAtEndOfNextElement
(
const
GMAD::Element
* el)
const
;
62
63
G4double MomentumAtStartOfLastElement()
const
{
return
designParticle.
Momentum
();}
64
G4double KineticEnergyAtStartOfLastElement()
const
{
return
designParticle.
KineticEnergy
();}
65
66
G4bool
integrateKineticEnergy
;
67
G4double synchronousTAtEnd;
68
G4double synchronousTAtMiddleOfLastElement;
69
G4double arcLength;
70
BDSParticleDefinition
designParticle;
71
G4bool changeOfEnergyEncountered;
72
G4int
rigidityCount
;
73
};
74
75
#endif
BDSBeamlineIntegral
A class that holds the current integrated quantities along a beam line.
Definition
BDSBeamlineIntegral.hh:40
BDSBeamlineIntegral::Integrate
void Integrate(const GMAD::Element &componentAsDefined)
Definition
BDSBeamlineIntegral.cc:54
BDSBeamlineIntegral::integrateKineticEnergy
G4bool integrateKineticEnergy
On by default, but allow control to not integrate it for old behaviour.
Definition
BDSBeamlineIntegral.hh:66
BDSBeamlineIntegral::ProvideSynchronousTAtEndOfNextElement
G4double ProvideSynchronousTAtEndOfNextElement(const GMAD::Element *el) const
Definition
BDSBeamlineIntegral.cc:143
BDSBeamlineIntegral::rigidityCount
G4int rigidityCount
Which change in rigidity we're at. Starts at 0, +1 after each change. Used for naming.
Definition
BDSBeamlineIntegral.hh:72
BDSBeamlineIntegral::ProvideSynchronousTAtCentreOfNextElement
G4double ProvideSynchronousTAtCentreOfNextElement(const GMAD::Element *el) const
Definition
BDSBeamlineIntegral.cc:135
BDSParticleDefinition
Wrapper for particle definition.
Definition
BDSParticleDefinition.hh:42
BDSParticleDefinition::Momentum
G4double Momentum() const
Accessor.
Definition
BDSParticleDefinition.hh:104
BDSParticleDefinition::KineticEnergy
G4double KineticEnergy() const
Accessor.
Definition
BDSParticleDefinition.hh:103
GMAD
Parser namespace for GMAD language. Combination of Geant4 and MAD.
Definition
BDSBeamlineIntegral.hh:26
GMAD::Element
Element class.
Definition
element.h:47
Generated on Thu Nov 12 2026 21:36:59 for BDSIM by
1.9.8