CMS 3D CMS Logo

List of all members | Public Types | Static Public Member Functions
ErrorFrameTransformer Struct Reference

#include <ErrorFrameTransformer.h>

Public Types

typedef Surface::Scalar Scalar
 

Static Public Member Functions

static GlobalError transform (const LocalError &le, const Surface &surf)
 
static LocalError transform (const GlobalError &ge, const Surface &surf)
 
static LocalErrorExtended transform46 (const GlobalErrorExtended &ge, const AlgebraicVector &positions, const AlgebraicVector &directions)
 

Detailed Description

Definition at line 11 of file ErrorFrameTransformer.h.

Member Typedef Documentation

Definition at line 12 of file ErrorFrameTransformer.h.

Member Function Documentation

static GlobalError ErrorFrameTransformer::transform ( const LocalError le,
const Surface surf 
)
inlinestatic

Definition at line 15 of file ErrorFrameTransformer.h.

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

Referenced by TestOutliers::analyze(), Vispa.Views.LineDecayView.DecayLine::boundingRect(), GsfConstraintAtVertex::constrainAtPoint(), Vispa.Views.LineDecayView.DecayLine::containsPoint(), DTSegmentUpdator::fit(), MuonTransientTrackingRecHit::globalDirectionError(), TValidTrackingRecHit::globalPositionError(), TRecHit5DParamConstraint::globalPositionError(), TRecHit2DPosConstraint::globalPositionError(), BaseTrackerRecHit::globalPositionError(), TValidTrackingRecHit::globalState(), BaseTrackerRecHit::globalState(), Vispa.Views.LineDecayView.DecayLine::paint(), TkMSParameterizationBuilder::produce(), MTDGeomDet::setAlignmentPositionError(), TrackerGeomDet::setAlignmentPositionError(), DynamicTruncation::testCSCstation(), and DynamicTruncation::testDTstation().

15  {
16  // the GlobalError is a sym matrix, initialisation takes only
17  // 6 T because GlobalError is stored as a lower triangular matrix.
18  Scalar cxx = le.xx();
19  Scalar cxy = le.xy();
20  Scalar cyy = le.yy();
21 
23 
24  return GlobalError(r.xx() * (r.xx() * cxx + r.yx() * cxy) + r.yx() * (r.xx() * cxy + r.yx() * cyy),
25  r.xx() * (r.xy() * cxx + r.yy() * cxy) + r.yx() * (r.xy() * cxy + r.yy() * cyy),
26  r.xy() * (r.xy() * cxx + r.yy() * cxy) + r.yy() * (r.xy() * cxy + r.yy() * cyy),
27  r.xx() * (r.xz() * cxx + r.yz() * cxy) + r.yx() * (r.xz() * cxy + r.yz() * cyy),
28  r.xy() * (r.xz() * cxx + r.yz() * cxy) + r.yy() * (r.xz() * cxy + r.yz() * cyy),
29  r.xz() * (r.xz() * cxx + r.yz() * cxy) + r.yz() * (r.xz() * cxy + r.yz() * cyy));
30  }
T xx() const
float xx() const
Definition: LocalError.h:24
T yx() const
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
T xy() const
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
T yy() const
T xz() const
const RotationType & rotation() const
T yz() const
static LocalError ErrorFrameTransformer::transform ( const GlobalError ge,
const Surface surf 
)
inlinestatic

Definition at line 32 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(), alignCSCRings::r, GloballyPositioned< T >::rotation(), TkRotation< T >::xx(), TkRotation< T >::xy(), TkRotation< T >::xz(), TkRotation< T >::yx(), TkRotation< T >::yy(), and TkRotation< T >::yz().

Referenced by Vispa.Views.LineDecayView.DecayLine::boundingRect(), Vispa.Views.LineDecayView.DecayLine::containsPoint(), and Vispa.Views.LineDecayView.DecayLine::paint().

32  {
33  Scalar cxx = ge.cxx();
34  Scalar cyx = ge.cyx();
35  Scalar cyy = ge.cyy();
36  Scalar czx = ge.czx();
37  Scalar czy = ge.czy();
38  Scalar czz = ge.czz();
39 
41 
42  Scalar l11 = r.xx() * (r.xx() * cxx + r.xy() * cyx + r.xz() * czx) +
43  r.xy() * (r.xx() * cyx + r.xy() * cyy + r.xz() * czy) +
44  r.xz() * (r.xx() * czx + r.xy() * czy + r.xz() * czz);
45  Scalar l12 = r.yx() * (r.xx() * cxx + r.xy() * cyx + r.xz() * czx) +
46  r.yy() * (r.xx() * cyx + r.xy() * cyy + r.xz() * czy) +
47  r.yz() * (r.xx() * czx + r.xy() * czy + r.xz() * czz);
48  Scalar l22 = r.yx() * (r.yx() * cxx + r.yy() * cyx + r.yz() * czx) +
49  r.yy() * (r.yx() * cyx + r.yy() * cyy + r.yz() * czy) +
50  r.yz() * (r.yx() * czx + r.yy() * czy + r.yz() * czz);
51 
52  return LocalError(l11, l12, l22);
53  }
T xx() const
T yx() const
T xy() const
T yy() const
T xz() const
const RotationType & rotation() const
T yz() const
static LocalErrorExtended ErrorFrameTransformer::transform46 ( const GlobalErrorExtended ge,
const AlgebraicVector positions,
const AlgebraicVector directions 
)
inlinestatic

Definition at line 56 of file ErrorFrameTransformer.h.

References GlobalErrorBaseExtended< T, ErrorWeightType >::matrix(), and MillePedeFileConverter_cfg::out.

Referenced by MuonTransientTrackingRecHit::parametersError().

58  {
59  const AlgebraicSymMatrix66& as(ge.matrix());
60 
61  AlgebraicMatrix46 jacobian46;
62  jacobian46[0][0] = 1.;
63  jacobian46[0][1] = 0.;
64  jacobian46[0][2] = -directions[0];
65  jacobian46[0][3] = -positions[1] * directions[0];
66  jacobian46[0][4] = positions[0] * directions[0];
67  jacobian46[0][5] = -positions[1];
68 
69  jacobian46[1][0] = 0.;
70  jacobian46[1][1] = 1.;
71  jacobian46[1][2] = -directions[1];
72  jacobian46[1][3] = -positions[1] * directions[1];
73  jacobian46[1][4] = positions[0] * directions[1];
74  jacobian46[1][5] = positions[0];
75 
76  jacobian46[2][0] = 0.;
77  jacobian46[2][1] = 0.;
78  jacobian46[2][2] = 0.;
79  jacobian46[2][3] = -directions[1] * directions[0];
80  jacobian46[2][4] = 1. + directions[0] * directions[0];
81  jacobian46[2][5] = -directions[1];
82 
83  jacobian46[3][0] = 0.;
84  jacobian46[3][1] = 0.;
85  jacobian46[3][2] = 0.;
86  jacobian46[3][3] = -1. - directions[1] * directions[1];
87  jacobian46[3][4] = directions[0] * directions[1];
88  jacobian46[3][5] = directions[0];
89 
90  AlgebraicSymMatrix44 out = ROOT::Math::Similarity(jacobian46, as);
91 
92  LocalErrorExtended newError(out);
93 
94  return newError;
95  }
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
ROOT::Math::SMatrix< double, 4, 6, ROOT::Math::MatRepStd< double, 4, 6 > > AlgebraicMatrix46
const AlgebraicSymMatrix66 & matrix() const