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"
51 #elif defined(USE_EXTVECT) && !defined(TRPRFN_SCALAR)
52 #include "AnalyticalCurvilinearJacobianEXT.icc"
79 double t11 = p1.
x();
double t12 = p1.
y();
double t13 = p1.
z();
80 double t21 = p2.
x();
double t22 = p2.
y();
double t23 = p2.
z();
81 double cosl0 = p1.
perp();
double cosl1 = 1./p2.
perp();
89 double theta = q*absS;
double sint =
sin(theta);
double cost =
cos(theta);
90 double hn1 = hn.
x();
double hn2 = hn.
y();
double hn3 = hn.
z();
91 double dx1 = dx.
x();
double dx2 = dx.
y();
double dx3 = dx.
z();
92 double gamma = hn1*t21 + hn2*t22 + hn3*t23;
93 double an1 = hn2*t23 - hn3*t22;
94 double an2 = hn3*t21 - hn1*t23;
95 double an3 = hn1*t22 - hn2*t21;
96 double au = 1./
sqrt(t11*t11 + t12*t12);
97 double u11 = -au*t12;
double u12 = au*t11;
98 double v11 = -t13*u12;
double v12 = t13*u11;
double v13 = t11*u12 - t12*u11;
99 au = 1./
sqrt(t21*t21 + t22*t22);
100 double u21 = -au*t22;
double u22 = au*t21;
101 double v21 = -t23*u22;
double v22 = t23*u21;
double v23 = t21*u22 - t22*u21;
108 double anv = -(hn1*u21 + hn2*u22 );
109 double anu = (hn1*v21 + hn2*v22 + hn3*v23);
110 double omcost = 1. -
cost;
double tmsint = theta - sint;
112 double hu1 = - hn3*u12;
113 double hu2 = hn3*u11;
114 double hu3 = hn1*u12 - hn2*u11;
116 double hv1 = hn2*v13 - hn3*v12;
117 double hv2 = hn3*v11 - hn1*v13;
118 double hv3 = hn1*v12 - hn2*v11;
124 theJacobian(1,0) = -qp*anv*(t21*dx1 + t22*dx2 + t23*dx3);
126 theJacobian(1,1) = cost*(v11*v21 + v12*v22 + v13*v23) +
127 sint*(hv1*v21 + hv2*v22 + hv3*v23) +
128 omcost*(hn1*v11 + hn2*v12 + hn3*v13) *
129 (hn1*v21 + hn2*v22 + hn3*v23) +
130 anv*(-sint*(v11*t21 + v12*t22 + v13*t23) +
131 omcost*(v11*an1 + v12*an2 + v13*an3) -
132 tmsint*gamma*(hn1*v11 + hn2*v12 + hn3*v13) );
134 theJacobian(1,2) = cost*(u11*v21 + u12*v22 ) +
135 sint*(hu1*v21 + hu2*v22 + hu3*v23) +
136 omcost*(hn1*u11 + hn2*u12 ) *
137 (hn1*v21 + hn2*v22 + hn3*v23) +
138 anv*(-sint*(u11*t21 + u12*t22 ) +
139 omcost*(u11*an1 + u12*an2 ) -
140 tmsint*gamma*(hn1*u11 + hn2*u12 ) );
141 theJacobian(1,2) *= cosl0;
143 theJacobian(1,3) = -q*anv*(u11*t21 + u12*t22 );
145 theJacobian(1,4) = -q*anv*(v11*t21 + v12*t22 + v13*t23);
149 theJacobian(2,0) = -qp*anu*(t21*dx1 + t22*dx2 + t23*dx3)*cosl1;
151 theJacobian(2,1) = cost*(v11*u21 + v12*u22 ) +
152 sint*(hv1*u21 + hv2*u22 ) +
153 omcost*(hn1*v11 + hn2*v12 + hn3*v13) *
154 (hn1*u21 + hn2*u22 ) +
155 anu*(-sint*(v11*t21 + v12*t22 + v13*t23) +
156 omcost*(v11*an1 + v12*an2 + v13*an3) -
157 tmsint*gamma*(hn1*v11 + hn2*v12 + hn3*v13) );
158 theJacobian(2,1) *= cosl1;
160 theJacobian(2,2) = cost*(u11*u21 + u12*u22 ) +
161 sint*(hu1*u21 + hu2*u22 ) +
162 omcost*(hn1*u11 + hn2*u12 ) *
163 (hn1*u21 + hn2*u22 ) +
164 anu*(-sint*(u11*t21 + u12*t22 ) +
165 omcost*(u11*an1 + u12*an2 ) -
166 tmsint*gamma*(hn1*u11 + hn2*u12 ) );
167 theJacobian(2,2) *= cosl1*cosl0;
169 theJacobian(2,3) = -q*anu*(u11*t21 + u12*t22 )*cosl1;
171 theJacobian(2,4) = -q*anu*(v11*t21 + v12*t22 + v13*t23)*cosl1;
176 double cutCriterion = fabs(s/globalParameters.
momentum().
mag());
177 const double limit = 5.;
179 if (cutCriterion > limit) {
181 theJacobian(3,0) = pp*(u21*dx1 + u22*dx2 );
182 theJacobian(4,0) = pp*(v21*dx1 + v22*dx2 + v23*dx3);
185 double hp11 = hn2*t13 - hn3*t12;
186 double hp12 = hn3*t11 - hn1*t13;
187 double hp13 = hn1*t12 - hn2*t11;
188 double temp1 = hp11*u21 + hp12*u22;
190 double secondOrder41 = 0.5 * qp * temp1 *
s2;
191 double ghnmp1 = gamma*hn1 - t11;
192 double ghnmp2 = gamma*hn2 - t12;
193 double ghnmp3 = gamma*hn3 - t13;
194 double temp2 = ghnmp1*u21 + ghnmp2*u22;
200 double qbp2 = qbp * qbp;
202 double thirdOrder41 = 1./3 * h2 * s3 * qbp * temp2;
204 double fourthOrder41 = 1./8 * h3 * s4 * qbp2 * temp1;
205 theJacobian(3,0) = secondOrder41 + (thirdOrder41 + fourthOrder41);
207 double temp3 = hp11*v21 + hp12*v22 + hp13*v23;
208 double secondOrder51 = 0.5 * qp * temp3 *
s2;
209 double temp4 = ghnmp1*v21 + ghnmp2*v22 + ghnmp3*v23;
210 double thirdOrder51 = 1./3 * h2 * s3 * qbp * temp4;
211 double fourthOrder51 = 1./8 * h3 * s4 * qbp2 * temp3;
212 theJacobian(4,0) = secondOrder51 + (thirdOrder51 + fourthOrder51);
215 theJacobian(3,1) = (sint*(v11*u21 + v12*u22 ) +
216 omcost*(hv1*u21 + hv2*u22 ) +
217 tmsint*(hn1*u21 + hn2*u22 ) *
218 (hn1*v11 + hn2*v12 + hn3*v13))/q;
220 theJacobian(3,2) = (sint*(u11*u21 + u12*u22 ) +
221 omcost*(hu1*u21 + hu2*u22 ) +
222 tmsint*(hn1*u21 + hn2*u22 ) *
223 (hn1*u11 + hn2*u12 ))*cosl0/q;
225 theJacobian(3,3) = (u11*u21 + u12*u22 );
227 theJacobian(3,4) = (v11*u21 + v12*u22 );
231 theJacobian(4,1) = (sint*(v11*v21 + v12*v22 + v13*v23) +
232 omcost*(hv1*v21 + hv2*v22 + hv3*v23) +
233 tmsint*(hn1*v21 + hn2*v22 + hn3*v23) *
234 (hn1*v11 + hn2*v12 + hn3*v13))/q;
236 theJacobian(4,2) = (sint*(u11*v21 + u12*v22 ) +
237 omcost*(hu1*v21 + hu2*v22 + hu3*v23) +
238 tmsint*(hn1*v21 + hn2*v22 + hn3*v23) *
239 (hn1*u11 + hn2*u12 ))*cosl0/q;
241 theJacobian(4,3) = (u11*v21 + u12*v22 );
243 theJacobian(4,4) = (v11*v21 + v12*v22 + v13*v23);
273 double sinl = tn.
z();
275 double cosl1 = 1./cosl;
276 double tgl=sinl*cosl1;
277 double sinp = tn.
y()*cosl1;
278 double cosp = tn.
x()*cosl1;
282 double b0= h.
x()*cosp+h.
y()*sinp;
283 double b2=-h.
x()*sinp+h.
y()*cosp;
284 double b3=-b0*sinl+h.
z()*cosl;
286 theJacobian(3,2)=absS*cosl;
287 theJacobian(4,1)=absS;
290 theJacobian(1,0) = absS*b2;
292 theJacobian(1,2) = -b0*(absS*qbp);
293 theJacobian(1,3) = b3*(b2*qbp*(absS*qbp));
294 theJacobian(1,4) = -b2*(b2*qbp*(absS*qbp));
296 theJacobian(2,0) = -absS*b3*cosl1;
298 theJacobian(2,1) = b0*(absS*qbp)*cosl1*cosl1;
299 theJacobian(2,2) = 1.+tgl*b2*(absS*qbp);
300 theJacobian(2,3) = -b3*(b3*qbp*(absS*qbp)*cosl1);
301 theJacobian(2,4) = b2*(b3*qbp*(absS*qbp)*cosl1);
303 theJacobian(3,4) = -b3*tgl*(absS*qbp);
304 theJacobian(4,3) = b3*tgl*(absS*qbp);
319 double cosl0 = p1.
perp();
320 theJacobian(3,2) = cosl0 *
s;
321 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)