Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:34

0001 #ifndef Alignment_CommonAlignment_AlignableSurface_H
0002 #define Alignment_CommonAlignment_AlignableSurface_H
0003 
0004 /** \class AlignableSurface
0005  *
0006  *  A class to hold a surface with width and length for alignment purposes.
0007  *
0008  *  $Date: 2007/04/25 18:37:59 $
0009  *  $Revision: 1.8 $
0010  *  \author Chung Khim Lae
0011  */
0012 
0013 #include <vector>
0014 
0015 #include "Alignment/CommonAlignment/interface/Utilities.h"
0016 #include "DataFormats/GeometrySurface/interface/GloballyPositioned.h"
0017 
0018 class Plane;
0019 
0020 class AlignableSurface : public GloballyPositioned<align::Scalar> {
0021 public:
0022   /// Constructor to set surface from geometry.
0023   AlignableSurface(const Plane& surface);
0024 
0025   /// Constructor to set position and rotation; width and length default to 0.
0026   AlignableSurface(const align::PositionType& = PositionType(),  // default 0
0027                    const align::RotationType& = RotationType()   // default identity
0028   );
0029 
0030   align::Scalar width() const { return theWidth; }
0031 
0032   align::Scalar length() const { return theLength; }
0033 
0034   void setWidth(align::Scalar width) { theWidth = width; }
0035 
0036   void setLength(align::Scalar length) { theLength = length; }
0037 
0038   using GloballyPositioned<align::Scalar>::toGlobal;
0039   using GloballyPositioned<align::Scalar>::toLocal;
0040 
0041   /// Return in global coord given a set of local points.
0042   align::GlobalPoints toGlobal(const align::LocalPoints&) const;
0043 
0044   /// Return in global frame a rotation given in local frame.
0045   align::RotationType toGlobal(const align::RotationType&) const;
0046 
0047   /// Return in global coord given Euler angles in local coord.
0048   align::EulerAngles toGlobal(const align::EulerAngles&) const;
0049 
0050   /// Return in local frame a rotation given in global frame.
0051   align::RotationType toLocal(const align::RotationType&) const;
0052 
0053   /// Return in local coord given Euler angles in global coord.
0054   align::EulerAngles toLocal(const align::EulerAngles&) const;
0055 
0056 private:
0057   align::Scalar theWidth;
0058   align::Scalar theLength;
0059 };
0060 
0061 #endif