16 computeFullJacobian(globalParameters,x,p,h,s);
22 computeStraightLineJacobian(globalParameters,x,p,s);
38 computeFullJacobian(globalParameters,x,p,h,s);
43 computeStraightLineJacobian(globalParameters,x,p,s);
49 #if defined(USE_SSEVECT) && !defined(TRPRFN_SCALAR)
50 #include "AnalyticalCurvilinearJacobianSSE.icc"
76 double t11 = p1.
x();
double t12 = p1.
y();
double t13 = p1.
z();
77 double t21 = p2.
x();
double t22 = p2.
y();
double t23 = p2.
z();
78 double cosl0 = p1.
perp();
double cosl1 = 1./p2.
perp();
86 double theta = q*absS;
double sint =
sin(theta);
double cost =
cos(theta);
87 double hn1 = hn.
x();
double hn2 = hn.
y();
double hn3 = hn.
z();
88 double dx1 = dx.
x();
double dx2 = dx.
y();
double dx3 = dx.
z();
89 double gamma = hn1*t21 + hn2*t22 + hn3*t23;
90 double an1 = hn2*t23 - hn3*t22;
91 double an2 = hn3*t21 - hn1*t23;
92 double an3 = hn1*t22 - hn2*t21;
93 double au = 1./
sqrt(t11*t11 + t12*t12);
94 double u11 = -au*t12;
double u12 = au*t11;
95 double v11 = -t13*u12;
double v12 = t13*u11;
double v13 = t11*u12 - t12*u11;
96 au = 1./
sqrt(t21*t21 + t22*t22);
97 double u21 = -au*t22;
double u22 = au*t21;
98 double v21 = -t23*u22;
double v22 = t23*u21;
double v23 = t21*u22 - t22*u21;
105 double anv = -(hn1*u21 + hn2*u22 );
106 double anu = (hn1*v21 + hn2*v22 + hn3*v23);
107 double omcost = 1. -
cost;
double tmsint = theta - sint;
109 double hu1 = - hn3*u12;
110 double hu2 = hn3*u11;
111 double hu3 = hn1*u12 - hn2*u11;
113 double hv1 = hn2*v13 - hn3*v12;
114 double hv2 = hn3*v11 - hn1*v13;
115 double hv3 = hn1*v12 - hn2*v11;
121 theJacobian(1,0) = -qp*anv*(t21*dx1 + t22*dx2 + t23*dx3);
123 theJacobian(1,1) = cost*(v11*v21 + v12*v22 + v13*v23) +
124 sint*(hv1*v21 + hv2*v22 + hv3*v23) +
125 omcost*(hn1*v11 + hn2*v12 + hn3*v13) *
126 (hn1*v21 + hn2*v22 + hn3*v23) +
127 anv*(-sint*(v11*t21 + v12*t22 + v13*t23) +
128 omcost*(v11*an1 + v12*an2 + v13*an3) -
129 tmsint*gamma*(hn1*v11 + hn2*v12 + hn3*v13) );
131 theJacobian(1,2) = cost*(u11*v21 + u12*v22 ) +
132 sint*(hu1*v21 + hu2*v22 + hu3*v23) +
133 omcost*(hn1*u11 + hn2*u12 ) *
134 (hn1*v21 + hn2*v22 + hn3*v23) +
135 anv*(-sint*(u11*t21 + u12*t22 ) +
136 omcost*(u11*an1 + u12*an2 ) -
137 tmsint*gamma*(hn1*u11 + hn2*u12 ) );
138 theJacobian(1,2) *= cosl0;
140 theJacobian(1,3) = -q*anv*(u11*t21 + u12*t22 );
142 theJacobian(1,4) = -q*anv*(v11*t21 + v12*t22 + v13*t23);
146 theJacobian(2,0) = -qp*anu*(t21*dx1 + t22*dx2 + t23*dx3)*cosl1;
148 theJacobian(2,1) = cost*(v11*u21 + v12*u22 ) +
149 sint*(hv1*u21 + hv2*u22 ) +
150 omcost*(hn1*v11 + hn2*v12 + hn3*v13) *
151 (hn1*u21 + hn2*u22 ) +
152 anu*(-sint*(v11*t21 + v12*t22 + v13*t23) +
153 omcost*(v11*an1 + v12*an2 + v13*an3) -
154 tmsint*gamma*(hn1*v11 + hn2*v12 + hn3*v13) );
155 theJacobian(2,1) *= cosl1;
157 theJacobian(2,2) = cost*(u11*u21 + u12*u22 ) +
158 sint*(hu1*u21 + hu2*u22 ) +
159 omcost*(hn1*u11 + hn2*u12 ) *
160 (hn1*u21 + hn2*u22 ) +
161 anu*(-sint*(u11*t21 + u12*t22 ) +
162 omcost*(u11*an1 + u12*an2 ) -
163 tmsint*gamma*(hn1*u11 + hn2*u12 ) );
164 theJacobian(2,2) *= cosl1*cosl0;
166 theJacobian(2,3) = -q*anu*(u11*t21 + u12*t22 )*cosl1;
168 theJacobian(2,4) = -q*anu*(v11*t21 + v12*t22 + v13*t23)*cosl1;
173 double cutCriterion = fabs(s/globalParameters.
momentum().
mag());
174 const double limit = 5.;
176 if (cutCriterion > limit) {
178 theJacobian(3,0) = pp*(u21*dx1 + u22*dx2 );
179 theJacobian(4,0) = pp*(v21*dx1 + v22*dx2 + v23*dx3);
182 double hp11 = hn2*t13 - hn3*t12;
183 double hp12 = hn3*t11 - hn1*t13;
184 double hp13 = hn1*t12 - hn2*t11;
185 double temp1 = hp11*u21 + hp12*u22;
187 double secondOrder41 = 0.5 * qp * temp1 *
s2;
188 double ghnmp1 = gamma*hn1 - t11;
189 double ghnmp2 = gamma*hn2 - t12;
190 double ghnmp3 = gamma*hn3 - t13;
191 double temp2 = ghnmp1*u21 + ghnmp2*u22;
197 double qbp2 = qbp * qbp;
199 double thirdOrder41 = 1./3 * h2 * s3 * qbp * temp2;
201 double fourthOrder41 = 1./8 * h3 * s4 * qbp2 * temp1;
202 theJacobian(3,0) = secondOrder41 + (thirdOrder41 + fourthOrder41);
204 double temp3 = hp11*v21 + hp12*v22 + hp13*v23;
205 double secondOrder51 = 0.5 * qp * temp3 *
s2;
206 double temp4 = ghnmp1*v21 + ghnmp2*v22 + ghnmp3*v23;
207 double thirdOrder51 = 1./3 * h2 * s3 * qbp * temp4;
208 double fourthOrder51 = 1./8 * h3 * s4 * qbp2 * temp3;
209 theJacobian(4,0) = secondOrder51 + (thirdOrder51 + fourthOrder51);
212 theJacobian(3,1) = (sint*(v11*u21 + v12*u22 ) +
213 omcost*(hv1*u21 + hv2*u22 ) +
214 tmsint*(hn1*u21 + hn2*u22 ) *
215 (hn1*v11 + hn2*v12 + hn3*v13))/q;
217 theJacobian(3,2) = (sint*(u11*u21 + u12*u22 ) +
218 omcost*(hu1*u21 + hu2*u22 ) +
219 tmsint*(hn1*u21 + hn2*u22 ) *
220 (hn1*u11 + hn2*u12 ))*cosl0/q;
222 theJacobian(3,3) = (u11*u21 + u12*u22 );
224 theJacobian(3,4) = (v11*u21 + v12*u22 );
228 theJacobian(4,1) = (sint*(v11*v21 + v12*v22 + v13*v23) +
229 omcost*(hv1*v21 + hv2*v22 + hv3*v23) +
230 tmsint*(hn1*v21 + hn2*v22 + hn3*v23) *
231 (hn1*v11 + hn2*v12 + hn3*v13))/q;
233 theJacobian(4,2) = (sint*(u11*v21 + u12*v22 ) +
234 omcost*(hu1*v21 + hu2*v22 + hu3*v23) +
235 tmsint*(hn1*v21 + hn2*v22 + hn3*v23) *
236 (hn1*u11 + hn2*u12 ))*cosl0/q;
238 theJacobian(4,3) = (u11*v21 + u12*v22 );
240 theJacobian(4,4) = (v11*v21 + v12*v22 + v13*v23);
270 double sinl = tn.
z();
272 double cosl1 = 1./cosl;
273 double tgl=sinl*cosl1;
274 double sinp = tn.
y()*cosl1;
275 double cosp = tn.
x()*cosl1;
279 double b0= h.
x()*cosp+h.
y()*sinp;
280 double b2=-h.
x()*sinp+h.
y()*cosp;
281 double b3=-b0*sinl+h.
z()*cosl;
283 theJacobian(3,2)=absS*cosl;
284 theJacobian(4,1)=absS;
287 theJacobian(1,0) = absS*b2;
289 theJacobian(1,2) = -b0*(absS*qbp);
290 theJacobian(1,3) = b3*(b2*qbp*(absS*qbp));
291 theJacobian(1,4) = -b2*(b2*qbp*(absS*qbp));
293 theJacobian(2,0) = -absS*b3*cosl1;
295 theJacobian(2,1) = b0*(absS*qbp)*cosl1*cosl1;
296 theJacobian(2,2) = 1.+tgl*b2*(absS*qbp);
297 theJacobian(2,3) = -b3*(b3*qbp*(absS*qbp)*cosl1);
298 theJacobian(2,4) = b2*(b3*qbp*(absS*qbp)*cosl1);
300 theJacobian(3,4) = -b3*tgl*(absS*qbp);
301 theJacobian(4,3) = b3*tgl*(absS*qbp);
316 double cosl0 = p1.
perp();
317 theJacobian(3,2) = cosl0 *
s;
318 theJacobian(4,1) =
s;
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
void computeStraightLineJacobian(const GlobalTrajectoryParameters &, const GlobalPoint &, const GlobalVector &, const double &s)
straight line approximation
void computeInfinitesimalJacobian(const GlobalTrajectoryParameters &, const GlobalPoint &, const GlobalVector &, const GlobalVector &, const double &s)
result for non-vanishing curvature and "small" step
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
float transverseCurvature() const
float signedInverseMomentum() const
GlobalVector momentum() const
Cos< T >::type cos(const T &t)
GlobalPoint position() const
Vector3DBase unit() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void computeFullJacobian(const GlobalTrajectoryParameters &, const GlobalPoint &, const GlobalVector &, const GlobalVector &, const double &s)
result for non-vanishing curvature
AnalyticalCurvilinearJacobian()
default constructor (for tests)