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

◆ toFrame()

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, and GloballyPositioned< T >::rotation().

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
const PositionType & position() const
const RotationType & rotation() const

◆ transformPlane()

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, and GloballyPositioned< T >::rotation().

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
const PositionType & position() const
const RotationType & rotation() const