OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
CyclotronRep.h
Go to the documentation of this file.
1 #ifndef CLASSIC_CyclotronRep_HH
2 #define CLASSIC_CyclotronRep_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: CyclotronRep.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1.2.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: CyclotronRep
13 //
14 // ------------------------------------------------------------------------
15 // Class category: BeamlineCore
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2004/11/12 18:57:54 $
19 // $Author: adelmann $
20 //
21 // ------------------------------------------------------------------------
22 
23 #include "AbsBeamline/Cyclotron.h"
25 #include "Fields/BMultipoleField.h"
26 
27 
28 // Class CyclotronRep
29 // ------------------------------------------------------------------------
31 
32 class CyclotronRep: public Cyclotron {
33 
34 public:
35 
37  explicit CyclotronRep(const std::string &name);
38 
39  CyclotronRep();
40  CyclotronRep(const CyclotronRep &);
41  virtual ~CyclotronRep();
42 
44  // Return an identical deep copy of the element.
45  virtual ElementBase *clone() const;
46 
48  // This method constructs a Channel permitting read/write access to
49  // the attribute [b]aKey[/b] and returns it.
50  // If the attribute does not exist, it returns NULL.
51  virtual Channel *getChannel(const std::string &aKey, bool = false);
52 
54  // Return the initial radius
55  //virtual double getRadius() const;
56 
58  // Assign the vertical component of the field in Teslas.
59  // virtual void setRadius(double r);
60 
62  // Build a FieldWrapper pointing to the bend and return a pointer to
63  // that wrapper.
64  virtual ElementBase *makeFieldWrapper();
65 
67  virtual double getSlices() const;
68 
70  virtual double getStepsize() const;
71 
73  virtual void setSlices(double sl);
74 
76  virtual void setStepsize(double ds);
77 
78 
80  // Assign the multipole expansion.
81  virtual void setField(const BMultipoleField &field);
82 
84  // Version for non-constant object.
85  virtual BMultipoleField &getField();
86 
88  // Version for constant object.
89  virtual const BMultipoleField &getField() const;
90 
91 
93  // Version for non-constant object.
94  virtual PlanarArcGeometry &getGeometry();
95 
97  // Version for constant object.
98  virtual const PlanarArcGeometry &getGeometry() const;
99 
100 
101 private:
102 
103  // Not implemented.
104  void operator=(const CyclotronRep &);
105 
107  double rInit;
108 
110  double pInit;
111 
113  double phiInit;
114 
116  double rfFrequ;
117 
120 
123 
124  // Parameters that determine integration step-size.
125  double slices;
126  double stepsize;
127 };
128 
129 #endif // CLASSIC_CyclotronRep_HH
double stepsize
Definition: CyclotronRep.h:126
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
Interface for basic beam line object.
Definition: ElementBase.h:128
PlanarArcGeometry geometry
The cyclotron geometry.
Definition: CyclotronRep.h:119
Interface for a Cyclotron.
Definition: Cyclotron.h:91
virtual void setSlices(double sl)
Set number of slices.
A simple arc in the XZ plane.
double phiInit
The initial phase w.r.t. the rf of the cyclotron.
Definition: CyclotronRep.h:113
virtual double getStepsize() const
Get stepsize.
virtual ElementBase * clone() const
Return clone.
virtual void setField(const BMultipoleField &field)
Set field.
virtual ~CyclotronRep()
BMultipoleField field
The field expansion.
Definition: CyclotronRep.h:122
double pInit
The initial momenta of the cyclotron.
Definition: CyclotronRep.h:110
void operator=(const CyclotronRep &)
virtual BMultipoleField & getField()
Get field.
Abstract interface for read/write access to variable.
Definition: Channel.h:32
double rInit
The initial radius of the cyclotron.
Definition: CyclotronRep.h:107
The magnetic field of a multipole.
const std::string name
double rfFrequ
The rf of the cyclotron.
Definition: CyclotronRep.h:116
Representation for a cyclotron magnet system.
Definition: CyclotronRep.h:32
virtual void setStepsize(double ds)
Set stepsize.
virtual PlanarArcGeometry & getGeometry()
Get geometry.
virtual double getSlices() const
Get number of slices.
virtual ElementBase * makeFieldWrapper()
Get the initial radius.