CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 26 of file FrameChanger.h.

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

26  {
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  }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
SOAFrame< float > Frame
Definition: Plane.h:16
LocalPoint toLocal(const GlobalPoint &gp) const
TkRotation transposed() const
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 14 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().

14  {
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  }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
SOAFrame< float > Frame
Definition: Plane.h:16
LocalPoint toLocal(const GlobalPoint &gp) const
TkRotation transposed() const
const RotationType & rotation() const
const PositionType & position() const