OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
RBendGeometry.h
Go to the documentation of this file.
1 #ifndef CLASSIC_RBendGeometry_HH
2 #define CLASSIC_RBendGeometry_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: RBendGeometry.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: RBendGeometry
13 //
14 // ------------------------------------------------------------------------
15 // Class category: BeamlineGeometry
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:34 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
24 
25 // Class RBendGeometry
26 // ------------------------------------------------------------------------
28 // It is a Geometry wrapper which adds two rotations by alpha/2 (local
29 // y-axis rotations) to the entrance and exit planes of a StraightGeometry.
30 // The y-rotations become part of the global geometry definition.
31 // {P}
32 // NOTE: in general the transformations returned include the effects of
33 // the y-rotations when the required point specifies the entrance or exit
34 // point. Requests for transformations within the geometry (i.e. from s1
35 // to s2, where s1 and/or s2 are not the entrance or exit planes) do not
36 // contain the y-rotations.
37 // {P}
38 // A RBendGeometry can be seen as an OffsetGeometry, whose global geometry
39 // is a PlanarArcGeometry, and whose local geometry is a StraightGeometry.
40 
42 public:
43 
45  // Construct an RBendGeometry from [b]length[/b] and [b]angle[/b].
46  RBendGeometry(double length, double angle);
47 
49  virtual ~RBendGeometry();
50  const RBendGeometry &operator=(const RBendGeometry &);
51 
53  // Return the length measured along a circular arc tangent to the
54  // local s-axis at entrance and exit; an approximation to the actual
55  // design orbit.
56  virtual double getArcLength() const;
57 
59  // Return the straight length of the geometry.
60  virtual double getElementLength() const;
61 
63  // Return the total bend angle.
64  virtual double getBendAngle() const;
65 
67  // Assign the bend angle.
68  void setBendAngle(double angle);
69 
71  // Equivalent to getTransform(getEntrance(), getExit()).
72  // Return the transform of the local coordinate system from the
73  // entrance to the exit of the element.
75 
77  // Equivalent to getTransform(0.0, getEntrance()).
78  // Return the transform of the local coordinate system from the
79  // origin to the entrance of the element.
80  Euclid3D getEntranceFrame() const;
81 
83  // Equivalent to getTransform(0.0, getExit()).
84  // Return the transform of the local coordinate system from the
85  // origin to the exit of the element.
86  Euclid3D getExitFrame() const;
87 
89  // Returns the entrance patch (transformation) which is used to transform
90  // the global geometry to the local geometry at entrance.
91  Euclid3D getEntrancePatch() const;
92 
94  // Returns the entrance patch (transformation) which is used to transform
95  // the local geometry to the global geometry at exit.
96  Euclid3D getExitPatch() const;
97 
98 private:
99 
100  double half_angle;
101 };
102 
103 #endif // CLASSIC_RBendGeometry_HH
104 
Euclid3D getExitPatch() const
Get patch.
virtual double getArcLength() const
Get arc length.
Euclid3D getEntrancePatch() const
Get patch.
RBendGeometry(double length, double angle)
Constructor.
Euclid3D getTotalTransform() const
Get transform.
virtual ~RBendGeometry()
Displacement and rotation in space.
Definition: Euclid3D.h:68
Euclid3D getExitFrame() const
Get transform.
virtual double getElementLength() const
Get element length.
A geometry representing a straight line.
The geometry for a RBend element.
Definition: RBendGeometry.h:41
Euclid3D getEntranceFrame() const
Get transform.
void setBendAngle(double angle)
Set angle.
virtual double getBendAngle() const
Get angle.
const RBendGeometry & operator=(const RBendGeometry &)