CMS 3D CMS Logo

FrameChanger.h
Go to the documentation of this file.
1 #ifndef FrameChanger_H
2 #define FrameChanger_H
3 
7 
9 public:
13  template <typename T>
14  static Plane transformPlane(const Plane& plane, const GloballyPositioned<T>& frame) {
15  typedef GloballyPositioned<T> Frame;
16  typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
17  typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
18  typename Plane::PositionType pos(lpos.basicVector()); // cheat!
19  return Plane(pos, rot);
20  }
21 
25  template <typename T, typename U>
28  typedef GloballyPositioned<U> Frame;
29 
30  typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
31  typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
32  typename Plane::PositionType pos(lpos.basicVector()); // cheat!
33  return Plane(pos, rot);
34  }
35 };
36 
37 #endif
GloballyPositioned
Definition: GloballyPositioned.h:18
TkRotation< float >
Visibility.h
pos
Definition: PixelAliasList.h:18
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
Plane.h
Point3DBase< float, GlobalTag >
FrameChanger
Definition: FrameChanger.h:8
FrameChanger::transformPlane
static Plane transformPlane(const Plane &plane, const GloballyPositioned< T > &frame)
Definition: FrameChanger.h:14
dso_internal
#define dso_internal
Definition: Visibility.h:13
FrameChanger::toFrame
static GloballyPositioned< T > toFrame(const GloballyPositioned< T > &plane, const GloballyPositioned< U > &frame)
Definition: FrameChanger.h:26
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
ReferenceCounted.h
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
Plane
Definition: Plane.h:16
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
GloballyPositioned::rotation
const RotationType & rotation() const
Definition: GloballyPositioned.h:38