10 #include <framework/dataobjects/UncertainHelix.h>
17 using namespace HelixParameterIndex;
27 const TVector3& momentum,
28 const short int charge,
30 const TMatrixDSym& cartesianCovariance,
31 const double pValue) :
32 Helix(TVector3(0.0, 0.0, position.Z()), momentum, charge, bZ),
33 m_covariance(cartesianCovariance),
49 TMatrixD jacobianRot(6, 6);
54 const double pt = hypot(px, py);
63 jacobianRot(iZ, iZ) = 1.0;
65 jacobianRot(iPx, iPx) =
cosPhi0;
66 jacobianRot(iPx, iPy) =
sinPhi0;
67 jacobianRot(iPy, iPx) = -
sinPhi0;
68 jacobianRot(iPy, iPy) =
cosPhi0;
69 jacobianRot(iPz, iPz) = 1.0;
75 const double invPt = 1 / pt;
76 const double invPtSquared = invPt * invPt;
77 const double alpha = getAlpha(bZ);
79 TMatrixD jacobianToHelixParameters(5, 6);
80 jacobianToHelixParameters.Zero();
82 jacobianToHelixParameters(iD0, iY) = -1;
83 jacobianToHelixParameters(iPhi0, iX) = charge * invPt / alpha;
84 jacobianToHelixParameters(iPhi0, iPy) = invPt;
85 jacobianToHelixParameters(iOmega, iPx) = -charge * invPtSquared / alpha;
86 jacobianToHelixParameters(iTanLambda, iPx) = - pz * invPtSquared;
87 jacobianToHelixParameters(iTanLambda, iPz) = invPt;
88 jacobianToHelixParameters(iZ0, iX) = - pz * invPt;
89 jacobianToHelixParameters(iZ0, iZ) = 1;
104 const double& tanLambda,
105 const TMatrixDSym& covariance,
106 const double pValue) :
107 Helix(d0, phi0, omega, z0, tanLambda),
108 m_covariance(covariance),
128 TMatrixD jacobianInflate(6, 5);
129 jacobianInflate.Zero();
135 const double& d0 = getD0();
136 const double& omega = getOmega();
137 const double& tanLambda = getTanLambda();
139 const double alpha = getAlpha(bZ_tesla);
140 const double absAlphaOmega = alpha * std::fabs(omega);
141 const double signedAlphaOmega2 = absAlphaOmega * omega;
143 const double invAbsAlphaOmega = 1.0 / absAlphaOmega;
144 const double invSignedAlphaOmega2 = 1.0 / signedAlphaOmega2;
147 jacobianInflate(iX, iPhi0) = d0;
148 jacobianInflate(iY, iD0) = -1.0;
149 jacobianInflate(iZ, iZ0) = 1.0;
152 jacobianInflate(iPx, iOmega) = -invSignedAlphaOmega2;
153 jacobianInflate(iPy, iPhi0) = invAbsAlphaOmega;
154 jacobianInflate(iPz, iOmega) = -tanLambda * invSignedAlphaOmega2;
155 jacobianInflate(iPz, iTanLambda) = invAbsAlphaOmega;
158 cov6.Similarity(jacobianInflate);
161 const double&
cosPhi0 = getCosPhi0();
162 const double&
sinPhi0 = getSinPhi0();
164 TMatrixD jacobianRot(6, 6);
169 jacobianRot(iX, iY) = -
sinPhi0;
172 jacobianRot(iZ, iZ) = 1.0;
174 jacobianRot(iPx, iPx) =
cosPhi0;
175 jacobianRot(iPx, iPy) = -
sinPhi0;
176 jacobianRot(iPy, iPx) =
sinPhi0;
177 jacobianRot(iPy, iPy) =
cosPhi0;
178 jacobianRot(iPz, iPz) = 1.0;
180 cov6.Similarity(jacobianRot);
191 TMatrixD jacobianReverse(5, 5);
192 jacobianReverse.UnitMatrix();
193 jacobianReverse(iD0, iD0) = -1;
194 jacobianReverse(iOmega, iOmega) = -1;
195 jacobianReverse(iTanLambda, iTanLambda) = -1;
205 TMatrixD jacobianPassiveMove(5, 5);
206 calcPassiveMoveByJacobian(byX, byY, jacobianPassiveMove);
208 return Helix::passiveMoveBy(byX, byY, byZ);