[1360] | 1 | #ifndef _H_BeamLine_
|
---|
| 2 | #define _H_BeamLine_
|
---|
| 3 |
|
---|
[1365] | 4 | /*
|
---|
| 5 | ---- Hector the simulator ----
|
---|
| 6 | A fast simulator of particles through generic beamlines.
|
---|
| 7 | J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
|
---|
[1360] | 8 |
|
---|
[1365] | 9 | http://www.fynu.ucl.ac.be/hector.html
|
---|
| 10 |
|
---|
| 11 | Centre de Physique des Particules et de Phénoménologie (CP3)
|
---|
| 12 | Université Catholique de Louvain (UCL)
|
---|
| 13 | */
|
---|
| 14 |
|
---|
[1360] | 15 | /// \file H_BeamLine.h
|
---|
| 16 | /// \brief Class aiming at retrieving features of the real beam optical elements.
|
---|
| 17 |
|
---|
| 18 | // local #includes
|
---|
| 19 | #include "H_AbstractBeamLine.h"
|
---|
| 20 |
|
---|
| 21 | // C++ #includes
|
---|
| 22 | #include <string>
|
---|
| 23 | using namespace std;
|
---|
| 24 |
|
---|
| 25 | // Caution : mad conventions for vertically(horizontally) focusing quadrupoles
|
---|
| 26 | // are opposite to Wille's. See fill() for more details.
|
---|
| 27 |
|
---|
| 28 | /// Reads external files and retrieves features of the real beam optical elements.
|
---|
| 29 | class H_BeamLine : public H_AbstractBeamLine {
|
---|
| 30 |
|
---|
| 31 | public:
|
---|
| 32 | /// Constructors and destructor
|
---|
| 33 | //@{
|
---|
[1365] | 34 | H_BeamLine():H_AbstractBeamLine() {direction=1; ips=0; };
|
---|
[1360] | 35 | H_BeamLine(const H_BeamLine& );
|
---|
| 36 | H_BeamLine(const int, const float);
|
---|
| 37 | H_BeamLine& operator=(const H_BeamLine& );
|
---|
[1365] | 38 | ~H_BeamLine() {return;};
|
---|
[1360] | 39 | //@
|
---|
| 40 | /// Finds the IP position (s) from the MAD table. Should be "IP5" or "IP1".
|
---|
[1365] | 41 | //@{
|
---|
| 42 | void findIP(const string);
|
---|
| 43 | void findIP(const string, const string);
|
---|
| 44 | //@}
|
---|
[1360] | 45 | /// Reader for the external MAD table
|
---|
[1365] | 46 | //@{
|
---|
| 47 | void fill(const string);
|
---|
| 48 | void fill(const string, const int, const string );
|
---|
| 49 | //@}
|
---|
[1360] | 50 | /// Returns the IP position (s)
|
---|
[1365] | 51 | double getIP() {return ips;};
|
---|
[1360] | 52 | /// Returns positions and angles of beam at IP
|
---|
| 53 | double* getIPProperties();
|
---|
| 54 |
|
---|
| 55 | private:
|
---|
| 56 | int direction; // to or from the IP.
|
---|
| 57 | double ips; // s-position of the IP [m]
|
---|
| 58 | double ipx; // x-position of the IP [µm]
|
---|
| 59 | double ipy; // y-position of the IP [µm]
|
---|
| 60 | double iptx; // x-angle of momentum at IP [µrad]
|
---|
| 61 | double ipty; // y-angle of momentum at IP [µrad]
|
---|
| 62 | };
|
---|
| 63 |
|
---|
| 64 | #endif
|
---|
| 65 |
|
---|