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.

26  {
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  }

References amptDefault_cfi::frame, GloballyPositioned< T >::position(), makeMuonMisalignmentScenario::rot, and GloballyPositioned< T >::rotation().

◆ 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.

14  {
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  }

References amptDefault_cfi::frame, GloballyPositioned< T >::position(), makeMuonMisalignmentScenario::rot, and GloballyPositioned< T >::rotation().

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

GloballyPositioned
Definition: GloballyPositioned.h:18
TkRotation< float >
pos
Definition: PixelAliasList.h:18
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
Point3DBase< float, GlobalTag >
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
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