BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
cavitymodel.cc
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#include "cavitymodel.h"
20
21using namespace GMAD;
22
24{
25 clear();
27}
28
30{
31 name = "";
32 type = "";
33 material = "";
34 irisRadius = 0.0;
35 equatorRadius = 0.0;
36 halfCellLength = 0.0;
40 irisVerticalAxis = 0.0;
41 tangentLineAngle = 0.0;
42 thickness = 0.0;
43 numberOfPoints = 24;
44 numberOfCells = 1;
45}
46
48{
49 publish("name", &CavityModel::name);
50 publish("type", &CavityModel::type);
51 publish("material", &CavityModel::material);
52 publish("irisRadius", &CavityModel::irisRadius);
53 publish("halfCellLength", &CavityModel::halfCellLength);
54 publish("equatorHorizontalAxis", &CavityModel::equatorHorizontalAxis);
55 publish("equatorVerticalAxis", &CavityModel::equatorVerticalAxis);
56 publish("equatorRadius", &CavityModel::equatorRadius);
57 publish("irisHorizontalAxis", &CavityModel::irisHorizontalAxis);
58 publish("irisVerticalAxis", &CavityModel::irisVerticalAxis);
59 publish("tangentLineAngle", &CavityModel::tangentLineAngle);
60 publish("thickness", &CavityModel::thickness);
61 publish("numberOfPoints", &CavityModel::numberOfPoints);
62 publish("numberOfCells", &CavityModel::numberOfCells);
63}
64
66{
67 std::cout << "cavitymodel: "
68 << "name " << name << " " << std::endl
69 << "type " << type << " " << std::endl
70 << "material " << material << " " << std::endl
71 << "irisRadius " << irisRadius << " " << std::endl
72 << "equatorRadius " << equatorRadius << " " << std::endl
73 << "halfCellLength " << halfCellLength << " " << std::endl
74 << "equatorHorizontalAxis " << equatorHorizontalAxis << " " << std::endl
75 << "equatorVerticalAxis " << equatorVerticalAxis << " " << std::endl
76 << "irisHorizontalAxis " << irisHorizontalAxis << " " << std::endl
77 << "irisVerticalAxis " << irisVerticalAxis << " " << std::endl
78 << "tangentLineAngle " << tangentLineAngle << " " << std::endl
79 << "thickness " << thickness << " " << std::endl
80 << "numberOfPoints " << numberOfPoints << " " << std::endl
81 << "numberOfCells " << numberOfCells << " " << std::endl
82 << std::endl;
83}
double equatorRadius
equator radius
Definition: cavitymodel.h:41
double thickness
thickness
Definition: cavitymodel.h:48
double irisHorizontalAxis
iris horizontal axis
Definition: cavitymodel.h:45
double irisRadius
iris radius
Definition: cavitymodel.h:40
double tangentLineAngle
tangent angle
Definition: cavitymodel.h:47
double equatorHorizontalAxis
equator ellipse vertical semi axis;
Definition: cavitymodel.h:43
double irisVerticalAxis
Iris axis.
Definition: cavitymodel.h:46
double equatorVerticalAxis
equator ellipse horizontal semi axis;
Definition: cavitymodel.h:44
double halfCellLength
half cell length
Definition: cavitymodel.h:42
std::string name
name
Definition: cavitymodel.h:37
CavityModel()
constructor
Definition: cavitymodel.cc:23
std::string material
material name
Definition: cavitymodel.h:39
std::string type
geometry type
Definition: cavitymodel.h:38
void print() const
print some properties
Definition: cavitymodel.cc:65
void PublishMembers()
publish members
Definition: cavitymodel.cc:47
void clear()
reset
Definition: cavitymodel.cc:29
int numberOfCells
number of cells per cavity
Definition: cavitymodel.h:54
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:92
Parser namespace for GMAD language. Combination of Geant4 and MAD.