CMS 3D CMS Logo

List of all members | Static Public Member Functions
FrameChanger Class Reference

#include <FrameChanger.h>

Static Public Member Functions

template<typename T , typename U >
static GloballyPositioned< TtoFrame (const GloballyPositioned< T > &plane, const GloballyPositioned< U > &frame)
 
template<typename T >
static Plane transformPlane (const Plane &plane, const GloballyPositioned< T > &frame)
 

Detailed Description

Definition at line 8 of file FrameChanger.h.

Member Function Documentation

template<typename T , typename U >
static GloballyPositioned<T> FrameChanger::toFrame ( const GloballyPositioned< T > &  plane,
const GloballyPositioned< U > &  frame 
)
inlinestatic

Moves the first argument ("plane") to the reference frame given by the second argument ("frame"). The returned frame is not positioned globally!

Definition at line 29 of file FrameChanger.h.

References GloballyPositioned< T >::position(), makeMuonMisalignmentScenario::rot, GloballyPositioned< T >::rotation(), GloballyPositioned< T >::toLocal(), and TkRotation< T >::transposed().

30  {
32  typedef GloballyPositioned<U> Frame;
33 
34  typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
35  typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
36  typename Plane::PositionType pos( lpos.basicVector()); // cheat!
37  return Plane( pos, rot);
38 
39  }
Definition: Plane.h:17
LocalPoint toLocal(const GlobalPoint &gp) const
TkRotation transposed() const
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
const RotationType & rotation() const
const PositionType & position() const
template<typename T >
static Plane FrameChanger::transformPlane ( const Plane plane,
const GloballyPositioned< T > &  frame 
)
inlinestatic

Moves the first argument ("plane") to the reference frame given by the second argument ("frame"). The returned frame is not positioned globally!

Definition at line 15 of file FrameChanger.h.

References GloballyPositioned< T >::position(), makeMuonMisalignmentScenario::rot, GloballyPositioned< T >::rotation(), GloballyPositioned< T >::toLocal(), and TkRotation< T >::transposed().

Referenced by PathToPlane2Order::operator()(), and RKPropagatorInS::propagateParametersOnPlane().

15  {
16  typedef GloballyPositioned<T> Frame;
17  typename Plane::RotationType rot = plane.rotation() * frame.rotation().transposed();
18  typename Frame::LocalPoint lpos = frame.toLocal(plane.position());
19  typename Plane::PositionType pos( lpos.basicVector()); // cheat!
20  return Plane(pos, rot);
21  }
Definition: Plane.h:17
LocalPoint toLocal(const GlobalPoint &gp) const
TkRotation transposed() const
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
const RotationType & rotation() const
const PositionType & position() const