OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
OpalBend.cpp
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2// $RCSfile: OpalBend.cpp,v $
3// ------------------------------------------------------------------------
4// $Revision: 1.2.4.1 $
5// ------------------------------------------------------------------------
6// Copyright: see Copyright.readme
7// ------------------------------------------------------------------------
8//
9// Class: OpalBend
10// The parent class of all OPAL bending magnets.
11// This class factors out all special behaviour for the DOOM interface
12// and the printing in OPAL format, as well as the bend attributes.
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2004/11/12 20:10:11 $
17// $Author: adelmann $
18//
19// ------------------------------------------------------------------------
20
21#include "Elements/OpalBend.h"
23#include "Utilities/Options.h"
24#include <iostream>
25
26
27// Class OpalBend
28// ------------------------------------------------------------------------
29
30OpalBend::OpalBend(const char *name, const char *help):
31 OpalElement(SIZE, name, help) {
33 ("ANGLE", "Upright dipole coefficient in m^(-1)");
35 ("K0", "Normal dipole coefficient in m^(-1)");
37 ("K0S", "Skew dipole coefficient in m^(-1)");
39 ("K1", "Upright quadrupole coefficient in m^(-2)");
41 ("K1S", "Skew quadrupole coefficient in m^(-2)");
43 ("K2", "Upright sextupole coefficient in m^(-3)");
45 ("K2S", "Skew sextupole coefficient in m^(-3)");
47 ("K3", "Upright octupole coefficient in m^(-4)");
49 ("K3S", "Skew octupole coefficient in m^(-4)");
51 ("E1", "Entry pole face angle in rad", 0.0);
53 ("E2", "Exit pole face angle in rad", 0.0);
55 ("H1", "Entry pole face curvature in m^(-1)");
57 ("H2", "Exit pole face curvature in m^(-1)");
59 ("HGAP", "Half gap width m");
61 ("FINT", "Field integral (no dimension)", 0.5);
63 ("SLICES", "Number of slices to use", 1.0);
65 ("STEPSIZE", "Step-size to use for integration");
67 ("FMAPFN", "Filename for the fieldmap");
69 ("GAP", "Full gap height of the magnet (m)", 0.0);
71 ("HAPERT", "Bend plane magnet aperture (m)", 0.0);
73 ("ROTATION", "-- not supported any more; use PSI instead --");
75 ("DESIGNENERGY", "the mean energy of the particles in MeV");
77 ("GREATERTHANPI",
78 "-- not supported any more --");
80 ("NSLICES",
81 "The number of slices/ steps for this element in Map Tracking", 1);
82}
83
84
85OpalBend::OpalBend(const std::string &name, OpalBend *parent):
86 OpalElement(name, parent)
87{}
88
89
91{}
92
93
94void OpalBend::print(std::ostream &os) const {
95
97
98}
@ SIZE
Definition: IndexMap.cpp:174
const std::string name
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
Definition: Attributes.cpp:90
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
Definition: Attributes.cpp:240
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
Definition: Attributes.cpp:332
std::vector< Attribute > itsAttr
The object attributes.
Definition: Object.h:216
Base class for all bending magnets.
Definition: OpalBend.h:30
@ GREATERTHANPI
Definition: OpalBend.h:50
@ SLICES
Definition: OpalBend.h:44
@ NSLICES
Definition: OpalBend.h:52
@ ROTATION
Definition: OpalBend.h:48
@ STEPSIZE
Definition: OpalBend.h:44
@ HAPERT
Definition: OpalBend.h:47
@ FMAPFN
Definition: OpalBend.h:45
@ HGAP
Definition: OpalBend.h:43
@ DESIGNENERGY
Definition: OpalBend.h:49
@ ANGLE
Definition: OpalBend.h:36
@ FINT
Definition: OpalBend.h:43
OpalBend(const char *name, const char *help)
Exemplar constructor.
Definition: OpalBend.cpp:30
virtual ~OpalBend()
Definition: OpalBend.cpp:90
virtual void print(std::ostream &) const
Print the bend magnet.
Definition: OpalBend.cpp:94
virtual void print(std::ostream &) const
Print the object.