OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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"
22#include <iostream>
24#include "Utilities/Options.h"
25
26// Class OpalBend
27// ------------------------------------------------------------------------
28
29OpalBend::OpalBend(const char* name, const char* help) : OpalElement(SIZE, name, help) {
30 itsAttr[ANGLE] = Attributes::makeReal("ANGLE", "Upright dipole coefficient in m^(-1)");
31 itsAttr[K0] = Attributes::makeReal("K0", "Normal dipole coefficient in m^(-1)");
32 itsAttr[K0S] = Attributes::makeReal("K0S", "Skew dipole coefficient in m^(-1)");
33 itsAttr[K1] = Attributes::makeReal("K1", "Upright quadrupole coefficient in m^(-2)");
34 itsAttr[K1S] = Attributes::makeReal("K1S", "Skew quadrupole coefficient in m^(-2)");
35 itsAttr[K2] = Attributes::makeReal("K2", "Upright sextupole coefficient in m^(-3)");
36 itsAttr[K2S] = Attributes::makeReal("K2S", "Skew sextupole coefficient in m^(-3)");
37 itsAttr[K3] = Attributes::makeReal("K3", "Upright octupole coefficient in m^(-4)");
38 itsAttr[K3S] = Attributes::makeReal("K3S", "Skew octupole coefficient in m^(-4)");
39 itsAttr[E1] = Attributes::makeReal("E1", "Entry pole face angle in rad", 0.0);
40 itsAttr[E2] = Attributes::makeReal("E2", "Exit pole face angle in rad", 0.0);
41 itsAttr[H1] = Attributes::makeReal("H1", "Entry pole face curvature in m^(-1)");
42 itsAttr[H2] = Attributes::makeReal("H2", "Exit pole face curvature in m^(-1)");
43 itsAttr[HGAP] = Attributes::makeReal("HGAP", "Half gap width m");
44 itsAttr[FINT] = Attributes::makeReal("FINT", "Field integral (no dimension)", 0.5);
45 itsAttr[SLICES] = Attributes::makeReal("SLICES", "Number of slices to use", 1.0);
46 itsAttr[STEPSIZE] = Attributes::makeReal("STEPSIZE", "Step-size to use for integration");
47 itsAttr[FMAPFN] = Attributes::makeString("FMAPFN", "Filename for the fieldmap");
48 itsAttr[GAP] = Attributes::makeReal("GAP", "Full gap height of the magnet (m)", 0.0);
49 itsAttr[HAPERT] = Attributes::makeReal("HAPERT", "Bend plane magnet aperture (m)", 0.0);
51 Attributes::makeReal("ROTATION", "-- not supported any more; use PSI instead --");
53 Attributes::makeReal("DESIGNENERGY", "the mean energy of the particles in MeV");
54 itsAttr[GREATERTHANPI] = Attributes::makeBool("GREATERTHANPI", "-- not supported any more --");
56 "NSLICES", "The number of slices/ steps for this element in Map Tracking", 1);
57}
58
59OpalBend::OpalBend(const std::string& name, OpalBend* parent) : OpalElement(name, parent) {}
60
62
63void OpalBend::print(std::ostream& os) const { OpalElement::print(os); }
@ SIZE
Definition IndexMap.cpp:179
std::vector< Attribute > itsAttr
The object attributes.
Definition Object.h:210
Base class for all bending magnets.
Definition OpalBend.h:29
OpalBend(const char *name, const char *help)
Exemplar constructor.
Definition OpalBend.cpp:29
@ GREATERTHANPI
Definition OpalBend.h:55
@ NSLICES
Definition OpalBend.h:57
@ ROTATION
Definition OpalBend.h:53
@ STEPSIZE
Definition OpalBend.h:49
@ DESIGNENERGY
Definition OpalBend.h:54
virtual ~OpalBend()
Definition OpalBend.cpp:61
virtual void print(std::ostream &) const
Print the bend magnet.
Definition OpalBend.cpp:63
virtual void print(std::ostream &) const
Print the object.
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.