BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
__w
bdsim
bdsim
parser
tunnel.cc
1
/*
2
Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3
University of London 2001 - 2024.
4
5
This file is part of BDSIM.
6
7
BDSIM is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published
9
by the Free Software Foundation version 3 of the License.
10
11
BDSIM is distributed in the hope that it will be useful, but
12
WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#include "tunnel.h"
20
21
using namespace
GMAD
;
22
23
Tunnel::Tunnel
():
24
aper1(0.0),aper2(0.0),
25
offsetX(0.0),offsetY(0.0),
26
thickness(0.0),soilThickness(0.0),
27
floorOffset(0.0),visible(true)
28
{
29
PublishMembers
();
30
}
31
32
void
Tunnel::clear
()
33
{
34
name
=
""
;
35
type
=
""
;
36
37
aper1
= 0.0;
38
aper2 = 0.0;
39
offsetX
= 0.0;
40
offsetY = 0.0;
41
thickness
= 0.0;
42
soilThickness = 0.0;
43
floorOffset = 0.0;
44
visible
=
true
;
45
46
material
=
""
;
47
soilMaterial
=
""
;
48
startElement
=
""
;
49
endElement =
""
;
50
}
51
52
void
Tunnel::PublishMembers
()
53
{
54
publish
(
"name"
,&
Tunnel::name
);
55
publish
(
"type"
,&
Tunnel::type
);
56
publish
(
"radius"
,&
Tunnel::aper1
);
57
publish
(
"aper1"
,&
Tunnel::aper1
);
58
publish
(
"aper2"
,&Tunnel::aper2);
59
publish
(
"offsetX"
,&
Tunnel::offsetX
);
60
publish
(
"offsetY"
,&Tunnel::offsetY);
61
publish
(
"thickness"
,&
Tunnel::thickness
);
62
publish
(
"soilThickness"
,&Tunnel::soilThickness);
63
publish
(
"floorOffset"
,&Tunnel::floorOffset);
64
publish
(
"visible"
,&
Tunnel::visible
);
65
publish
(
"material"
,&
Tunnel::material
);
66
publish
(
"soilMaterial"
,&
Tunnel::soilMaterial
);
67
publish
(
"startElement"
,&
Tunnel::startElement
);
68
publish
(
"endElement"
,&Tunnel::endElement);
69
}
70
71
void
Tunnel::print
()
const
72
{
73
std::cout <<
"tunnel: "
74
<<
name
<<
" "
75
<<
type
<<
" "
76
<<
aper1
<<
" "
77
<< aper2 <<
" "
78
<<
offsetX
<<
" "
79
<< offsetY <<
" "
80
<<
thickness
<<
" "
81
<< soilThickness <<
" "
82
<< floorOffset <<
" "
83
<<
material
<<
" "
84
<<
soilMaterial
<<
" "
85
<<
startElement
<<
" "
86
<< endElement
87
<< std::endl;
88
}
GMAD::Published< Tunnel >::publish
void publish(const std::string &name, T C::*mp)
Make pointer to member from class C and type T with accessible with a name.
Definition
published.h:94
GMAD::Tunnel::aper1
double aper1
radius, aperture parameters
Definition
tunnel.h:43
GMAD::Tunnel::PublishMembers
void PublishMembers()
Publish members.
Definition
tunnel.cc:52
GMAD::Tunnel::soilMaterial
std::string soilMaterial
soil
Definition
tunnel.h:58
GMAD::Tunnel::startElement
std::string startElement
start and end element by name
Definition
tunnel.h:61
GMAD::Tunnel::thickness
double thickness
tunnel geometry parameters
Definition
tunnel.h:48
GMAD::Tunnel::visible
int visible
visibility
Definition
tunnel.h:53
GMAD::Tunnel::material
std::string material
material
Definition
tunnel.h:56
GMAD::Tunnel::clear
void clear()
reset
Definition
tunnel.cc:32
GMAD::Tunnel::name
std::string name
Definition
tunnel.h:38
GMAD::Tunnel::type
std::string type
geometry type
Definition
tunnel.h:40
GMAD::Tunnel::Tunnel
Tunnel()
constructor
Definition
tunnel.cc:23
GMAD::Tunnel::offsetX
double offsetX
offset x and y
Definition
tunnel.h:46
GMAD::Tunnel::print
void print() const
print some properties
Definition
tunnel.cc:71
GMAD
Parser namespace for GMAD language. Combination of Geant4 and MAD.
Definition
BDSBeamlineIntegral.hh:27
Generated on Sat Oct 18 2025 18:31:04 for BDSIM by
1.9.8