OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
CyclotronRep.h
Go to the documentation of this file.
1//
2// Class CyclotronRep
3// Representation for a cyclotron magnet system
4//
5// Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
6// All rights reserved
7//
8// This file is part of OPAL.
9//
10// OPAL is free software: you can redistribute it and/or modify
11// it under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// You should have received a copy of the GNU General Public License
16// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
17//
18#ifndef CLASSIC_CyclotronRep_HH
19#define CLASSIC_CyclotronRep_HH
20
24
25
26class CyclotronRep: public Cyclotron {
27
28public:
29
31 explicit CyclotronRep(const std::string &name);
32
35 virtual ~CyclotronRep();
36
38 // Return an identical deep copy of the element.
39 virtual ElementBase *clone() const;
40
42 // This method constructs a Channel permitting read/write access to
43 // the attribute [b]aKey[/b] and returns it.
44 // If the attribute does not exist, it returns nullptr.
45 virtual Channel *getChannel(const std::string &aKey, bool = false);
46
48 // Return the initial radius
49 //virtual double getRadius() const;
50
52 // Assign the vertical component of the field in Teslas.
53 // virtual void setRadius(double r);
54
56 virtual double getSlices() const;
57
59 virtual double getStepsize() const;
60
62 virtual void setSlices(double sl);
63
65 virtual void setStepsize(double ds);
66
67
69 // Assign the multipole expansion.
70 virtual void setField(const BMultipoleField &field);
71
73 // Version for non-constant object.
74 virtual BMultipoleField &getField();
75
77 // Version for constant object.
78 virtual const BMultipoleField &getField() const;
79
80
82 // Version for non-constant object.
84
86 // Version for constant object.
87 virtual const PlanarArcGeometry &getGeometry() const;
88
89
90private:
91
92 // Not implemented.
93 void operator=(const CyclotronRep &);
94
96 double rInit;
97
99 double pInit;
100
102 double phiInit;
103
105 double rfFrequ;
106
109
112
113 // Parameters that determine integration step-size.
114 double slices;
115 double stepsize;
116};
117
118#endif // CLASSIC_CyclotronRep_HH
const std::string name
Cyclotron(const std::string &name)
Constructor with given name.
Definition Cyclotron.cpp:89
ElementBase(const std::string &name)
Constructor with given name.
double phiInit
The initial phase w.r.t. the rf of the cyclotron.
double pInit
The initial momenta of the cyclotron.
virtual double getStepsize() const
Get stepsize.
virtual void setStepsize(double ds)
Set stepsize.
virtual void setSlices(double sl)
Set number of slices.
virtual ~CyclotronRep()
virtual BMultipoleField & getField()
Get field.
virtual ElementBase * clone() const
Return clone.
CyclotronRep(const std::string &name)
Constructor with given name.
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
void operator=(const CyclotronRep &)
BMultipoleField field
The field expansion.
virtual double getSlices() const
Get the initial radius.
double rInit
The initial radius of the cyclotron.
double rfFrequ
The rf of the cyclotron.
virtual void setField(const BMultipoleField &field)
Set field.
PlanarArcGeometry geometry
The cyclotron geometry.
virtual PlanarArcGeometry & getGeometry()
Get geometry.
A simple arc in the XZ plane.
Abstract interface for read/write access to variable.
Definition Channel.h:32
The magnetic field of a multipole.