[2] | 1 | #ifndef ELEMENT_H |
---|
| 2 | #define ELEMENT_H |
---|
| 3 | #include <iostream> |
---|
| 4 | #include <vector> |
---|
| 5 | #include <string> |
---|
| 6 | using namespace std; |
---|
| 7 | |
---|
| 8 | /* |
---|
| 9 | ################################################################################################################################# |
---|
| 10 | |
---|
| 11 | This class describes all elements that are in the accelerator, except the collimators, which are inheriting from this class. |
---|
| 12 | |
---|
| 13 | ################################################################################################################################# |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | class Element |
---|
| 18 | { |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | public: |
---|
| 22 | |
---|
| 23 | //===================================Constructors, destructor======================================== |
---|
| 24 | |
---|
| 25 | Element() {}; |
---|
| 26 | |
---|
| 27 | Element(const double& ALFX, const double& ALFY, const double& APER_1, const double& APER_2, const double& APER_3, const double& APER_4, const string& APERTYPE, const double& BETX, const double& BETY, const double& DPX, const double& DPY, const double& DX, const double& DY, const string& KEYWORD, const double& L, const double& MUX, const double& MUY, const string& NAME, const double& PTC, const double& PXC, const double& PYC, const double& S, const double& TC, const double& XC, const double& YC, const double& K0L, const double& K0SL, const double& K1L, const double& K1SL, const double& K2L, const double& K2SL, const string& PARENT); |
---|
| 28 | |
---|
| 29 | Element(const Element& obj); |
---|
| 30 | |
---|
| 31 | virtual ~Element() {}; |
---|
| 32 | |
---|
| 33 | Element operator=(const Element& elt); |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | //displays the parameters of the element |
---|
| 37 | |
---|
| 38 | virtual void affiche(); |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | double ALFX;//correlation function in x (ALFX = -0.5*BETX' |
---|
| 42 | double ALFY;//correlation function in y |
---|
| 43 | |
---|
| 44 | //the following terms are aperture parameters |
---|
| 45 | double APER_1; |
---|
| 46 | double APER_2; |
---|
| 47 | double APER_3; |
---|
| 48 | double APER_4; |
---|
| 49 | string APERTYPE;//type of aperture (RECTANGLE, RECTELLIPSE, CIRCLE, ELLIPSE or NONE) |
---|
| 50 | double BETX;//amplitude function in x [m] |
---|
| 51 | double BETY;//amplitude function in y [m] |
---|
| 52 | double DPX;//dispertion Dpx |
---|
| 53 | double DPY;//dispertion Dpy |
---|
| 54 | double DX;//dispertion in x [m] |
---|
| 55 | double DY;//dispertion in y [m] |
---|
| 56 | string KEYWORD; |
---|
| 57 | double L;//length of the element [m] |
---|
| 58 | double MUX;//phase advance in x [2*pi] |
---|
| 59 | double MUY;//phase advance in y [2*pi] |
---|
| 60 | string NAME; |
---|
| 61 | double PTC;//energy error, divided by the reference momentum times the velocity of light |
---|
| 62 | double PXC;//horizontal canonical momentum of the (closed) orbit referred to the ideal orbit, divided by the reference momentum |
---|
| 63 | double PYC;//vertical canonical momentum of the (closed) orbit referred to the ideal orbit, divided by the reference momentum |
---|
| 64 | double S;//position of the element, measured as the distance along the accelerator [m] |
---|
| 65 | double TC;//velocity of light times the negative time difference with respect to the reference particle [m] |
---|
| 66 | double XC;//horizontal position x of the (closed) orbit, referred to the ideal orbit [m] |
---|
| 67 | double YC;//vertical position y of the (closed) orbit, referred to the ideal orbit [m] |
---|
| 68 | double K0L;//K0*L, where K0 is the normal dipole coefficient and L the magnetic length |
---|
| 69 | double K0SL;//K0S*L, K0S is the skew dipole coefficient |
---|
| 70 | double K1L;//K1*L, where K1 is the normal quadrupole coefficient and L the magnetic length |
---|
| 71 | double K1SL;//K1S*L, K1S is the skew quadrupole coefficient |
---|
| 72 | double K2L;//K2*L, where K2 is the normal sextupole coefficient and L the magnetic length |
---|
| 73 | double K2SL;//K2S*L, K2S is the skew sextupole coefficient |
---|
| 74 | string PARENT; |
---|
| 75 | |
---|
| 76 | double aperx;//aperture in x |
---|
| 77 | double apery;//aperture in y |
---|
| 78 | |
---|
| 79 | }; |
---|
| 80 | |
---|
| 81 | #endif |
---|