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) 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
#include "tunnel.h"
19
20
using namespace
GMAD
;
21
22
Tunnel::Tunnel
():
23
aper1(0.0),aper2(0.0),
24
offsetX(0.0),offsetY(0.0),
25
thickness(0.0),soilThickness(0.0),
26
floorOffset(0.0),visible(true)
27
{
28
PublishMembers
();
29
}
30
31
void
Tunnel::clear
()
32
{
33
name
=
""
;
34
type
=
""
;
35
36
aper1
= 0.0;
37
aper2 = 0.0;
38
offsetX
= 0.0;
39
offsetY = 0.0;
40
thickness
= 0.0;
41
soilThickness = 0.0;
42
floorOffset = 0.0;
43
visible
=
true
;
44
45
material
=
""
;
46
soilMaterial
=
""
;
47
startElement
=
""
;
48
endElement =
""
;
49
}
50
51
void
Tunnel::PublishMembers
()
52
{
53
publish
(
"name"
,&
Tunnel::name
);
54
publish
(
"type"
,&
Tunnel::type
);
55
publish
(
"radius"
,&
Tunnel::aper1
);
56
publish
(
"aper1"
,&
Tunnel::aper1
);
57
publish
(
"aper2"
,&Tunnel::aper2);
58
publish
(
"offsetX"
,&
Tunnel::offsetX
);
59
publish
(
"offsetY"
,&Tunnel::offsetY);
60
publish
(
"thickness"
,&
Tunnel::thickness
);
61
publish
(
"soilThickness"
,&Tunnel::soilThickness);
62
publish
(
"floorOffset"
,&Tunnel::floorOffset);
63
publish
(
"visible"
,&
Tunnel::visible
);
64
publish
(
"material"
,&
Tunnel::material
);
65
publish
(
"soilMaterial"
,&
Tunnel::soilMaterial
);
66
publish
(
"startElement"
,&
Tunnel::startElement
);
67
publish
(
"endElement"
,&Tunnel::endElement);
68
}
69
70
void
Tunnel::print
()
const
71
{
72
std::cout <<
"tunnel: "
73
<<
name
<<
" "
74
<<
type
<<
" "
75
<<
aper1
<<
" "
76
<< aper2 <<
" "
77
<<
offsetX
<<
" "
78
<< offsetY <<
" "
79
<<
thickness
<<
" "
80
<< soilThickness <<
" "
81
<< floorOffset <<
" "
82
<<
material
<<
" "
83
<<
soilMaterial
<<
" "
84
<<
startElement
<<
" "
85
<< endElement
86
<< std::endl;
87
}
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:93
GMAD::Tunnel::aper1
double aper1
radius, aperture parameters
Definition
tunnel.h:42
GMAD::Tunnel::PublishMembers
void PublishMembers()
Publish members.
Definition
tunnel.cc:51
GMAD::Tunnel::soilMaterial
std::string soilMaterial
soil
Definition
tunnel.h:57
GMAD::Tunnel::startElement
std::string startElement
start and end element by name
Definition
tunnel.h:60
GMAD::Tunnel::thickness
double thickness
tunnel geometry parameters
Definition
tunnel.h:47
GMAD::Tunnel::visible
int visible
visibility
Definition
tunnel.h:52
GMAD::Tunnel::material
std::string material
material
Definition
tunnel.h:55
GMAD::Tunnel::clear
void clear()
reset
Definition
tunnel.cc:31
GMAD::Tunnel::name
std::string name
Definition
tunnel.h:37
GMAD::Tunnel::type
std::string type
geometry type
Definition
tunnel.h:39
GMAD::Tunnel::Tunnel
Tunnel()
constructor
Definition
tunnel.cc:22
GMAD::Tunnel::offsetX
double offsetX
offset x and y
Definition
tunnel.h:45
GMAD::Tunnel::print
void print() const
print some properties
Definition
tunnel.cc:70
GMAD
Parser namespace for GMAD language. Combination of Geant4 and MAD.
Definition
BDSBeamlineIntegral.hh:26
Generated on Thu Nov 12 2026 21:36:59 for BDSIM by
1.9.8