CMS 3D CMS Logo

Public Types | Public Member Functions

ErrorFrameTransformer Class Reference

#include <ErrorFrameTransformer.h>

List of all members.

Public Types

typedef Surface::Scalar Scalar

Public Member Functions

GlobalError transform (const LocalError &le, const Surface &surf) const
LocalError transform (const GlobalError &ge, const Surface &surf) const

Detailed Description

Definition at line 8 of file ErrorFrameTransformer.h.


Member Typedef Documentation

Definition at line 11 of file ErrorFrameTransformer.h.


Member Function Documentation

GlobalError ErrorFrameTransformer::transform ( const LocalError le,
const Surface surf 
) const [inline]

Definition at line 13 of file ErrorFrameTransformer.h.

References csvReporter::r, GloballyPositioned< T >::rotation(), LocalError::xx(), TkRotation< T >::xx(), LocalError::xy(), TkRotation< T >::xy(), TkRotation< T >::xz(), TkRotation< T >::yx(), TkRotation< T >::yy(), LocalError::yy(), and TkRotation< T >::yz().

Referenced by TestOutliers::analyze(), BeamSpotTransientTrackingRecHit::BeamSpotTransientTrackingRecHit(), GsfConstraintAtVertex::constrainAtPoint(), DTSegmentUpdator::fit(), HelpertRecHit2DLocalPos::getKfComponents(), MuonTransientTrackingRecHit::globalDirectionError(), TwoBodyDecayTrajectoryFactory::match(), MuonTransientTrackingRecHit::parametersError(), HelpertRecHit2DLocalPos::parError(), TransientTrackingRecHit::setPositionErrors(), SiTrackerGaussianSmearingRecHitConverter::smearHits(), and HelpertRecHit2DLocalPos::updateWithAPE().

                                                                         {
    // the GlobalError is a sym matrix, initialisation takes only
    // 6 T because GlobalError is stored as a lower triangular matrix.
    Scalar cxx = le.xx();
    Scalar cxy = le.xy();
    Scalar cyy = le.yy();

    Surface::RotationType r=surf.rotation();

    return GlobalError( r.xx()*(r.xx()*cxx+r.yx()*cxy) + r.yx()*(r.xx()*cxy+r.yx()*cyy) ,
                        r.xx()*(r.xy()*cxx+r.yy()*cxy) + r.yx()*(r.xy()*cxy+r.yy()*cyy) ,
                        r.xy()*(r.xy()*cxx+r.yy()*cxy) + r.yy()*(r.xy()*cxy+r.yy()*cyy) ,
                        r.xx()*(r.xz()*cxx+r.yz()*cxy) + r.yx()*(r.xz()*cxy+r.yz()*cyy) ,
                        r.xy()*(r.xz()*cxx+r.yz()*cxy) + r.yy()*(r.xz()*cxy+r.yz()*cyy) ,
                        r.xz()*(r.xz()*cxx+r.yz()*cxy) + r.yz()*(r.xz()*cxy+r.yz()*cyy) );
  }
LocalError ErrorFrameTransformer::transform ( const GlobalError ge,
const Surface surf 
) const [inline]

Definition at line 30 of file ErrorFrameTransformer.h.

References GlobalErrorBase< T, ErrorWeightType >::cxx(), GlobalErrorBase< T, ErrorWeightType >::cyx(), GlobalErrorBase< T, ErrorWeightType >::cyy(), GlobalErrorBase< T, ErrorWeightType >::czx(), GlobalErrorBase< T, ErrorWeightType >::czy(), GlobalErrorBase< T, ErrorWeightType >::czz(), csvReporter::r, GloballyPositioned< T >::rotation(), TkRotation< T >::xx(), TkRotation< T >::xy(), TkRotation< T >::xz(), TkRotation< T >::yx(), TkRotation< T >::yy(), and TkRotation< T >::yz().

                                                                         {
    Scalar cxx = ge.cxx(); Scalar cyx = ge.cyx(); Scalar cyy = ge.cyy();
    Scalar czx = ge.czx(); Scalar czy = ge.czy(); Scalar czz = ge.czz();
    
    Surface::RotationType r=surf.rotation();

    Scalar l11 
      = r.xx()*(r.xx()*cxx + r.xy()*cyx + r.xz()*czx)
      + r.xy()*(r.xx()*cyx + r.xy()*cyy + r.xz()*czy)
      + r.xz()*(r.xx()*czx + r.xy()*czy + r.xz()*czz);
    Scalar l12 
      = r.yx()*(r.xx()*cxx + r.xy()*cyx + r.xz()*czx)
      + r.yy()*(r.xx()*cyx + r.xy()*cyy + r.xz()*czy)
      + r.yz()*(r.xx()*czx + r.xy()*czy + r.xz()*czz);
    Scalar l22
      = r.yx()*(r.yx()*cxx + r.yy()*cyx + r.yz()*czx)
      + r.yy()*(r.yx()*cyx + r.yy()*cyy + r.yz()*czy)
      + r.yz()*(r.yx()*czx + r.yy()*czy + r.yz()*czz);

    return LocalError( l11, l12, l22);
  }