OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
CyclotronValley.h
Go to the documentation of this file.
1 #ifndef CLASSIC_CyclotronValley_HH
2 #define CLASSIC_CyclotronValley_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: CyclotronValley.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: CyclotronValley
13 // Defines the abstract interface for an element modeling the valley of
14 // a cyclotron.
15 //
16 // ------------------------------------------------------------------------
17 // Class category: AbsBeamline
18 // ------------------------------------------------------------------------
19 //
20 // $Date: 2010/12/8 09:51:31 $
21 // $Author: fci $
22 //
23 // ------------------------------------------------------------------------
24 
25 
26 #include "AbsBeamline/Component.h"
27 
28 class Fieldmap;
29 
30 // Class CyclotronValley
31 // ------------------------------------------------------------------------
33 // Class CyclotronValley defines the abstract interface for the magnetic field of cyclotron valley.
34 
35 
36 class CyclotronValley: public Component {
37 
38 public:
39 
40 
42  explicit CyclotronValley(const std::string &name);
43 
46  virtual ~CyclotronValley();
47 
49  virtual void accept(BeamlineVisitor &) const;
50 
51 
53  void setFieldMapFN(std::string fmapfn);
54 
55  std::string getFieldMapFN() const;
56 
57  void setFast(bool fast);
58 
59  bool getFast() const;
61 
62  virtual bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B);
63 
64  virtual bool apply(const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B);
65 
66  virtual bool applyToReferenceParticle(const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B);
67 
68  virtual void initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField);
69 
70  //virtual void initialise(PartBunchBase<double, 3> *bunch);
71 
72  virtual void finalise();
73 
74  virtual bool bends() const;
75 
76  virtual void goOnline(const double &kineticEnergy);
77 
78  virtual void goOffline();
79 
80  virtual void getDimensions(double &zBegin, double &zEnd) const;
81 
82 private:
83  std::string filename_m;
85  double scale_m;
87  double ElementEdge_m;
88  double startField_m;
89  double endField_m;
90  bool fast_m;
91 
92 
93  // Not implemented.
94  void operator=(const CyclotronValley &);
95 };
96 
97 #endif // CLASSIC_CyclotronValley_HH
void setFast(bool fast)
bool getFast() const
virtual void goOffline()
std::string getFieldMapFN() const
std::string filename_m
virtual void finalise()
virtual void getDimensions(double &zBegin, double &zEnd) const
virtual ~CyclotronValley()
ElementBase::ElementType getType() const
Get element type std::string.
virtual bool bends() const
virtual void accept(BeamlineVisitor &) const
Apply visitor to CyclotronValley.
void operator=(const CyclotronValley &)
Interface for cyclotron valley.
void setFieldMapFN(std::string fmapfn)
Set the name of the field map.
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField)
const std::string name
Fieldmap * fieldmap_m
virtual bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B)
virtual bool applyToReferenceParticle(const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B)
Interface for a single beam element.
Definition: Component.h:51
Abstract algorithm.
virtual void goOnline(const double &kineticEnergy)