15 template <
class T>
T sqr(
T t) {
return t*
t;}
30 theHit1 = hits[0]->globalPosition();
31 theHit1 = hits[1]->globalPosition();
35 const std::vector<const TrackingRecHit *>& hits,
const TrackingRegion& region)
const
45 int charge = (invPt > 0.) ? 1 : -1;
64 double valPt = (fabs(invPt) > 1.e-4) ? 1./fabs(invPt) : 1.e4;
65 double errPt = invPtErrorScale*invPtErr * valPt*valPt;
66 double eta = asinh(valCotTheta);
67 double errPhi = this->
errPhi(invPt, eta) * phiErrorScale;
69 double errTip = this->
errTip(invPt, eta) * tipErrorScale;
70 double errZip = this->
errZip(invPt, eta) * zipErrorScale;
93 return builder.build(pt, phi, cotTheta, tip, zip, chi2, charge, hits, fieldESH.
product());
112 int ieta = int (10*fabs(eta));
114 case 0: { p0 = 0.000597506; p1 = 0.00221057;
break; }
115 case 1: { p0 = 0.000591867; p1 = 0.00278744;
break; }
116 case 2: { p0 = 0.000635666; p1 = 0.00207433;
break; }
117 case 3: { p0 = 0.000619086; p1 = 0.00255121;
break; }
118 case 4: { p0 = 0.000572067; p1 = 0.00310618;
break; }
119 case 5: { p0 = 0.000596239; p1 = 0.00288442;
break; }
120 case 6: { p0 = 0.000607608; p1 = 0.00282996;
break; }
121 case 7: { p0 = 0.000606446; p1 = 0.00281118;
break; }
122 case 8: { p0 = 0.000594076; p1 = 0.00280546;
break; }
123 case 9: { p0 = 0.000579615; p1 = 0.00335534;
break; }
124 case 10: { p0 = 0.000659546; p1 = 0.00340443;
break; }
125 case 11: { p0 = 0.000659031; p1 = 0.00343151;
break; }
126 case 12: { p0 = 0.000738391; p1 = 0.00337297;
break; }
127 case 13: { p0 = 0.000798966; p1 = 0.00330008;
break; }
128 case 14: { p0 = 0.000702997; p1 = 0.00562643;
break; }
129 case 15: { p0 = 0.000973417; p1 = 0.00312666;
break; }
130 case 16: { p0 = 0.000995213; p1 = 0.00564278;
break; }
131 case 17: { p0 = 0.00121436; p1 = 0.00572704;
break; }
132 case 18: { p0 = 0.00119216; p1 = 0.00760204;
break; }
133 case 19: { p0 = 0.00141204; p1 = 0.0093777;
break; }
134 default: { p0 = 0.00153161; p1 = 0.00940265;
break; }
136 return p0+p1*fabs(invPt);
151 int ieta = int (10*fabs(eta));
153 case 0: { p0 = 0.00166115; p1 = 5.75533e-05;
break; }
154 case 1: { p0 = 0.00157525; p1 = 0.000707437;
break; }
155 case 2: { p0 = 0.00122246; p1 = 0.000325456;
break; }
156 case 3: { p0 = 0.000852422; p1 = 0.000429216;
break; }
157 case 4: { p0 = 0.000637561; p1 = 0.00122298;
break; }
158 case 5: { p0 = 0.000555766; p1 = 0.00158096;
break; }
159 case 6: { p0 = 0.000641202; p1 = 0.00143339;
break; }
160 case 7: { p0 = 0.000803207; p1 = 0.000648816;
break; }
161 case 8: { p0 = 0.000741394; p1 = 0.0015289;
break; }
162 case 9: { p0 = 0.000652019; p1 = 0.00168873;
break; }
163 case 10: { p0 = 0.000716902; p1 = 0.00257556;
break; }
164 case 11: { p0 = 0.000800409; p1 = 0.00190563;
break; }
165 case 12: { p0 = 0.000808778; p1 = 0.00264139;
break; }
166 case 13: { p0 = 0.000775757; p1 = 0.00318478;
break; }
167 case 14: { p0 = 0.000705781; p1 = 0.00460576;
break; }
168 case 15: { p0 = 0.000580679; p1 = 0.00748248;
break; }
169 case 16: { p0 = 0.000561667; p1 = 0.00767487;
break; }
170 case 17: { p0 = 0.000521626; p1 = 0.0100178;
break; }
171 case 18: { p0 = 0.00064253; p1 = 0.0106062;
break; }
172 case 19: { p0 = 0.000636868; p1 = 0.0140047;
break; }
173 default: { p0 = 0.000682478; p1 = 0.0163569;
break; }
175 return p0+p1*fabs(invPt);
184 return radius-1./fabs(curvature);
192 int ieta = int (10*fabs(eta));
194 case 0: { p0 = 0.00392416; p1 = 0.00551809;
break; }
195 case 1: { p0 = 0.00390391; p1 = 0.00543244;
break; }
196 case 2: { p0 = 0.0040651; p1 = 0.00406496;
break; }
197 case 3: { p0 = 0.00387782; p1 = 0.00797637;
break; }
198 case 4: { p0 = 0.00376798; p1 = 0.00866894;
break; }
199 case 5: { p0 = 0.0042131; p1 = 0.00462184;
break; }
200 case 6: { p0 = 0.00392579; p1 = 0.00784685;
break; }
201 case 7: { p0 = 0.00370472; p1 = 0.00790174;
break; }
202 case 8: { p0 = 0.00364433; p1 = 0.00928368;
break; }
203 case 9: { p0 = 0.00387578; p1 = 0.00640431;
break; }
204 case 10: { p0 = 0.00382464; p1 = 0.00960763;
break; }
205 case 11: { p0 = 0.0038907; p1 = 0.0104562;
break; }
206 case 12: { p0 = 0.00392525; p1 = 0.0106442;
break; }
207 case 13: { p0 = 0.00400634; p1 = 0.011218;
break; }
208 case 14: { p0 = 0.0036229; p1 = 0.0156403;
break; }
209 case 15: { p0 = 0.00444317; p1 = 0.00832987;
break; }
210 case 16: { p0 = 0.00465492; p1 = 0.0179908;
break; }
211 case 17: { p0 = 0.0049652; p1 = 0.0216647;
break; }
212 case 18: { p0 = 0.0051395; p1 = 0.0233692;
break; }
213 case 19: { p0 = 0.0062917; p1 = 0.0262175;
break; }
214 default: { p0 = 0.00714444; p1 = 0.0253856;
break; }
216 return p0+p1*fabs(invPt);
226 double rho3 = curv*curv*curv;
227 double r1 = pinner.
perp();
228 double phi1 = r1*curv/2 + pinner.
perp2()*r1*rho3/48.;
229 double r2 = pouter.
perp();
230 double phi2 = r2*curv/2 + pouter.
perp2()*r2*rho3/48.;
231 double z1 = pinner.
z();
232 double z2 = pouter.
z();
234 return z1 - phi1/(phi1-phi2)*(z1-z2);
243 int ieta = int (10*fabs(eta));
245 case 0: { p0 = 0.0120743; p1 = 0;
break; }
246 case 1: { p0 = 0.0110343; p1 = 0.0051199;
break; }
247 case 2: { p0 = 0.00846487; p1 = 0.00570084;
break; }
248 case 3: { p0 = 0.00668726; p1 = 0.00331165;
break; }
249 case 4: { p0 = 0.00467126; p1 = 0.00578239;
break; }
250 case 5: { p0 = 0.0043042; p1 = 0.00598517;
break; }
251 case 6: { p0 = 0.00515392; p1 = 0.00495422;
break; }
252 case 7: { p0 = 0.0060843; p1 = 0.00320512;
break; }
253 case 8: { p0 = 0.00564942; p1 = 0.00478876;
break; }
254 case 9: { p0 = 0.00532111; p1 = 0.0073239;
break; }
255 case 10: { p0 = 0.00579429; p1 = 0.00952782;
break; }
256 case 11: { p0 = 0.00614229; p1 = 0.00977795;
break; }
257 case 12: { p0 = 0.00714661; p1 = 0.00550482;
break; }
258 case 13: { p0 = 0.0066593; p1 = 0.00999362;
break; }
259 case 14: { p0 = 0.00634922; p1 = 0.0148156;
break; }
260 case 15: { p0 = 0.00600586; p1 = 0.0318022;
break; }
261 case 16: { p0 = 0.00676919; p1 = 0.027456;
break; }
262 case 17: { p0 = 0.00670066; p1 = 0.0317005;
break; }
263 case 18: { p0 = 0.00752392; p1 = 0.0347714;
break; }
264 case 19: { p0 = 0.00791425; p1 = 0.0566665;
break; }
265 default: { p0 = 0.00882372; p1 = 0.0596858;
break; }
267 return p0+p1*fabs(invPt);
281 param(eta, p1, p2, p3);
284 if ( fabs(dphi) < 0.01) {
287 double q = dphi/2./
p3;
289 double D = q*q + p*p*
p;
290 double u =
pow(-q+
sqrt(D), 1./3.);
303 int ieta = int (10*fabs(eta));
305 case 0: { p0 = 0.0196835; p1 = 0.00517533;
break; }
306 case 1: { p0 = 0.0266583; p1 = 0.00478101;
break; }
307 case 2: { p0 = 0.0217164; p1 = 0.00545425;
break; }
308 case 3: { p0 = 0.0197547; p1 = 0.00552263;
break; }
309 case 4: { p0 = 0.0208778; p1 = 0.00536009;
break; }
310 case 5: { p0 = 0.024192; p1 = 0.00521709;
break; }
311 case 6: { p0 = 0.0265315; p1 = 0.0051897;
break; }
312 case 7: { p0 = 0.0198071; p1 = 0.00566822;
break; }
313 case 8: { p0 = 0.0361955; p1 = 0.00486352;
break; }
314 case 9: { p0 = 0.037864; p1 = 0.00509094;
break; }
315 case 10: { p0 = 0.0382968; p1 = 0.00612354;
break; }
316 case 11: { p0 = 0.0308326; p1 = 0.0074234;
break; }
317 case 12: { p0 = 0.0248577; p1 = 0.00883049;
break; }
318 case 13: { p0 = 0.0279965; p1 = 0.00888293;
break; }
319 case 14: { p0 = 0.0372582; p1 = 0.00950252;
break; }
320 case 15: { p0 = 0.0281366; p1 = 0.0111501;
break; }
321 case 16: { p0 = 0.0421483; p1 = 0.0109413;
break; }
322 case 17: { p0 = 0.0461798; p1 = 0.0125824;
break; }
323 case 18: { p0 = 0.0530603; p1 = 0.0132638;
break; }
324 case 19: { p0 = 0.0601148; p1 = 0.0147911;
break; }
325 default: { p0 = 0.0552377; p1 = 0.0155574;
break; }
327 return p1+p0*fabs(invPt);
332 double dphi_min = fabs(
deltaPhi(phi0,phiL1));
335 while ( pt_cur < 10000.) {
336 double phi_exp = phi0+
getBending(1./pt_cur, eta, charge);
337 double dphi = fabs(
deltaPhi(phi_exp,phiL1));
338 if ( dphi < dphi_min) {
342 if (pt_cur < 10.) pt_cur += 0.01;
343 else if (pt_cur < 20.) pt_cur+= 0.025;
344 else if( pt_cur < 100.) pt_cur+= 0.1;
355 return charge*p1*invPt + charge*p2*invPt*invPt + charge*p3*invPt*invPt*invPt;
360 int ieta = int (10*fabs(eta));
363 case 0: { p0 = 0.0196835; p1 = 0.00517533;
break; }
364 case 1: { p0 = 0.0266583; p1 = 0.00478101;
break; }
365 case 2: { p0 = 0.0217164; p1 = 0.00545425;
break; }
366 case 3: { p0 = 0.0197547; p1 = 0.00552263;
break; }
367 case 4: { p0 = 0.0208778; p1 = 0.00536009;
break; }
368 case 5: { p0 = 0.024192; p1 = 0.00521709;
break; }
369 case 6: { p0 = 0.0265315; p1 = 0.0051897;
break; }
370 case 7: { p0 = 0.0198071; p1 = 0.00566822;
break; }
371 case 8: { p0 = 0.0361955; p1 = 0.00486352;
break; }
372 case 9: { p0 = 0.037864; p1 = 0.00509094;
break; }
373 case 10: { p0 = 0.0382968; p1 = 0.00612354;
break; }
374 case 11: { p0 = 0.0308326; p1 = 0.0074234;
break; }
375 case 12: { p0 = 0.0248577; p1 = 0.00883049;
break; }
376 case 13: { p0 = 0.0279965; p1 = 0.00888293;
break; }
377 case 14: { p0 = 0.0372582; p1 = 0.00950252;
break; }
378 case 15: { p0 = 0.0281366; p1 = 0.0111501;
break; }
379 case 16: { p0 = 0.0421483; p1 = 0.0109413;
break; }
380 case 17: { p0 = 0.0461798; p1 = 0.0125824;
break; }
381 case 18: { p0 = 0.0530603; p1 = 0.0132638;
break; }
382 case 19: { p0 = 0.0601148; p1 = 0.0147911;
break; }
383 default: { p0 = 0.0552377; p1 = 0.0155574;
break; }
385 return p0+p1*
sqr(invPt);
391 int ieta = int (10*fabs(eta));
393 case 0: { p1 = -2.68016; p2 = 0; p3 = -12.9653;
break; }
394 case 1: { p1 = -2.67864; p2 = 0; p3 = -12.0036;
break; }
395 case 2: { p1 = -2.72997; p2 = 0; p3 = -10.3468;
break; }
396 case 3: { p1 = -2.68836; p2 = 0; p3 = -12.3369;
break; }
397 case 4: { p1 = -2.66885; p2 = 0; p3 = -11.589;
break; }
398 case 5: { p1 = -2.64932; p2 = 0; p3 = -12.7176;
break; }
399 case 6: { p1 = -2.64513; p2 = 0; p3 = -11.3912;
break; }
400 case 7: { p1 = -2.64487; p2 = 0; p3 = -9.83239;
break; }
401 case 8: { p1 = -2.58875; p2 = 0; p3 = -10.0541;
break; }
402 case 9: { p1 = -2.5551; p2 = 0; p3 = -9.75757;
break; }
403 case 10: { p1 = -2.55294; p2 = 0; p3 = -7.25238;
break; }
404 case 11: { p1 = -2.45333; p2 = 0; p3 = -7.966;
break; }
405 case 12: { p1 = -2.29283; p2 = 0; p3 = -7.03231;
break; }
406 case 13: { p1 = -2.13167; p2 = 0; p3 = -4.29182;
break; }
407 case 14: { p1 = -1.9102; p2 = 0; p3 = -3.21295;
break; }
408 case 15: { p1 = -1.74552; p2 = 0; p3 = -0.531827;
break; }
409 case 16: { p1 = -1.53642; p2 = 0; p3 = -1.74057;
break; }
410 case 17: { p1 = -1.39446; p2 = 0; p3 = -1.56819;
break; }
411 case 18: { p1 = -1.26176; p2 = 0; p3 = -0.598631;
break; }
412 case 19: { p1 = -1.14133; p2 = 0; p3 = -0.0941055;
break; }
413 default: { p1 = -1.02086; p2 = 0; p3 = -0.100491;
break; }
419 while ( phi1 >= 2*
M_PI) phi1 -= 2*
M_PI;
420 while ( phi2 >= 2*
M_PI) phi2 -= 2*
M_PI;
421 while ( phi1 < 0) phi1 += 2*
M_PI;
422 while ( phi2 < 0) phi2 += 2*
M_PI;
423 double dPhi = phi2-phi1;
double errZip(double invPt, double eta) const
T getParameter(std::string const &) const
double errTip(double invPt, double eta) const
void setPxConstraint(const SeedingHitSet &hits)
double findPt(double phi0, double phiL1, double eta, int charge) const
double valTip(const Circle &c, double curvature) const
const Point & center() const
Geom::Phi< T > phi() const
static double getBendingError(double invPt, double eta)
double valPhi(const Circle &c, int charge) const
T curvature(T InversePt, const edm::EventSetup &iSetup)
double dPhi(double phi1, double phi2)
static void param(double eta, double &p1, double &p2, double &p3)
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
virtual reco::Track * run(const edm::EventSetup &es, const std::vector< const TrackingRecHit * > &hits, const TrackingRegion ®ion) const
double valZip(double curvature, const GlobalPoint &p0, const GlobalPoint &p1) const
static double getBending(double invPt, double eta, int charge)
edm::ParameterSet theConfig
double deltaPhi(double phi1, double phi2) const
DecomposeProduct< arg, typename Div::arg > D
double valInversePt(double phi0, double phiL1, double eta) const
T const * product() const
double errInversePt(double invPt, double eta) const
Square< F >::type sqr(const F &f)
void setL1Constraint(const L1MuGMTCand &muon)
double valCotTheta(const PixelRecoLineRZ &line) const
double errPhi(double invPt, double eta) const
Power< A, B >::type pow(const A &a, const B &b)
double errCotTheta(double invPt, double eta) const
int charge() const
get charge (+1 -1)