OPAL (Object Oriented Parallel Accelerator Library) 2024.2
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
42public:
43
45 // Construct an RBendGeometry from [b]length[/b] and [b]angle[/b].
46 RBendGeometry(double length, double angle);
47
49 virtual ~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 total bend angle.
60 virtual double getBendAngle() const;
61
63 // Assign the bend angle.
64 void setBendAngle(double angle);
65
67 // Equivalent to getTransform(getEntrance(), getExit()).
68 // Return the transform of the local coordinate system from the
69 // entrance to the exit of the element.
71
73 // Equivalent to getTransform(0.0, getEntrance()).
74 // Return the transform of the local coordinate system from the
75 // origin to the entrance of the element.
77
79 // Equivalent to getTransform(0.0, getExit()).
80 // Return the transform of the local coordinate system from the
81 // origin to the exit of the element.
82 Euclid3D getExitFrame() const;
83
85 // Returns the entrance patch (transformation) which is used to transform
86 // the global geometry to the local geometry at entrance.
88
90 // Returns the entrance patch (transformation) which is used to transform
91 // the local geometry to the global geometry at exit.
92 Euclid3D getExitPatch() const;
93
94private:
95
96 double half_angle;
97};
98
99#endif // CLASSIC_RBendGeometry_HH
Displacement and rotation in space.
Definition Euclid3D.h:68
The geometry for a RBend element.
void setBendAngle(double angle)
Set angle.
const RBendGeometry & operator=(const RBendGeometry &)
virtual double getBendAngle() const
Get angle.
Euclid3D getExitFrame() const
Get transform.
virtual double getArcLength() const
Get arc length.
Euclid3D getEntranceFrame() const
Get transform.
Euclid3D getEntrancePatch() const
Get patch.
virtual ~RBendGeometry()
Euclid3D getExitPatch() const
Get patch.
Euclid3D getTotalTransform() const
Get transform.
A geometry representing a straight line.