CMS 3D CMS Logo

L1MuonPixelTrackFitter.cc
Go to the documentation of this file.
2 
4 
12 
13 #include <cmath>
14 
15 template <class T>
16 T sqr(T t) {
17  return t * t;
18 }
19 
21  : theConfig(cfg),
22  invPtErrorScale{theConfig.getParameter<double>("invPtErrorScale")},
23  phiErrorScale{theConfig.getParameter<double>("phiErrorScale")},
24  cotThetaErrorScale{theConfig.getParameter<double>("cotThetaErrorScale")},
25  tipErrorScale{theConfig.getParameter<double>("tipErrorScale")},
26  zipErrorScale{theConfig.getParameter<double>("zipErrorScale")} {}
27 
29  thePhiL1 = muon.phiValue() + 0.021817;
30  theEtaL1 = muon.etaValue();
31  theChargeL1 = muon.charge();
32 }
33 
35  theHit1 = hits[0]->globalPosition();
36  theHit1 = hits[1]->globalPosition();
37 }
38 
40  const std::vector<const TrackingRecHit*>& hits,
41  const TrackingRegion& region) const {
43  es.get<IdealMagneticFieldRecord>().get(fieldESH);
44 
45  double phi_vtx_fromHits = (theHit2 - theHit1).phi();
46 
47  double invPt = valInversePt(phi_vtx_fromHits, thePhiL1, theEtaL1);
48  double invPtErr = errInversePt(invPt, theEtaL1);
49 
50  int charge = (invPt > 0.) ? 1 : -1;
51  double curvature = PixelRecoUtilities::curvature(invPt, es);
52 
53  Circle circle(theHit1, theHit2, curvature);
54 
55  double valPhi = this->valPhi(circle, charge);
56  double valTip = this->valTip(circle, curvature);
57  double valZip = this->valZip(curvature, theHit1, theHit2);
59 
60  // if ( (fabs(invPt)-0.1)/invPtErr > 3.) return 0;
61 
62  PixelTrackBuilder builder;
63  double valPt = (fabs(invPt) > 1.e-4) ? 1. / fabs(invPt) : 1.e4;
64  double errPt = invPtErrorScale * invPtErr * valPt * valPt;
65  double eta = asinh(valCotTheta);
66  double errPhi = this->errPhi(invPt, eta) * phiErrorScale;
67  double errCotTheta = this->errCotTheta(invPt, eta) * cotThetaErrorScale;
68  double errTip = this->errTip(invPt, eta) * tipErrorScale;
69  double errZip = this->errZip(invPt, eta) * zipErrorScale;
70 
71  Measurement1D pt(valPt, errPt);
76 
77  float chi2 = 0.;
78 
79  /*
80  std::ostringstream str;
81  str <<"\t ipt: " << invPt <<"+/-"<<invPtErr
82  <<"\t pt: " << pt.value() <<"+/-"<<pt.error()
83  <<"\t phi: " << phi.value() <<"+/-"<<phi.error()
84  <<"\t cot: " << cotTheta.value() <<"+/-"<<cotTheta.error()
85  <<"\t tip: " << tip.value() <<"+/-"<<tip.error()
86  <<"\t zip: " << zip.value() <<"+/-"<<zip.error()
87  <<"\t charge: " << charge;
88  std::cout <<str.str()<< std::endl;
89 */
90 
91  return builder.build(pt, phi, cotTheta, tip, zip, chi2, charge, hits, fieldESH.product());
92 }
93 
94 double L1MuonPixelTrackFitter::valPhi(const Circle& circle, int charge) const {
95  Circle::Point zero(0., 0., 0.);
96  Circle::Vector center = circle.center() - zero;
97  long double radius = center.perp();
98  center /= radius;
99  Circle::Vector dir = center.cross(-charge * Circle::Vector(0., 0., 1.));
100  return dir.phi();
101 }
102 
103 double L1MuonPixelTrackFitter::errPhi(double invPt, double eta) const {
104  //
105  // sigma = p0+p1/|pt|;
106  //
107  double p0, p1;
108  int ieta = int(10 * fabs(eta));
109  switch (ieta) {
110  case 0: {
111  p0 = 0.000597506;
112  p1 = 0.00221057;
113  break;
114  }
115  case 1: {
116  p0 = 0.000591867;
117  p1 = 0.00278744;
118  break;
119  }
120  case 2: {
121  p0 = 0.000635666;
122  p1 = 0.00207433;
123  break;
124  }
125  case 3: {
126  p0 = 0.000619086;
127  p1 = 0.00255121;
128  break;
129  }
130  case 4: {
131  p0 = 0.000572067;
132  p1 = 0.00310618;
133  break;
134  }
135  case 5: {
136  p0 = 0.000596239;
137  p1 = 0.00288442;
138  break;
139  }
140  case 6: {
141  p0 = 0.000607608;
142  p1 = 0.00282996;
143  break;
144  }
145  case 7: {
146  p0 = 0.000606446;
147  p1 = 0.00281118;
148  break;
149  }
150  case 8: {
151  p0 = 0.000594076;
152  p1 = 0.00280546;
153  break;
154  }
155  case 9: {
156  p0 = 0.000579615;
157  p1 = 0.00335534;
158  break;
159  }
160  case 10: {
161  p0 = 0.000659546;
162  p1 = 0.00340443;
163  break;
164  }
165  case 11: {
166  p0 = 0.000659031;
167  p1 = 0.00343151;
168  break;
169  }
170  case 12: {
171  p0 = 0.000738391;
172  p1 = 0.00337297;
173  break;
174  }
175  case 13: {
176  p0 = 0.000798966;
177  p1 = 0.00330008;
178  break;
179  }
180  case 14: {
181  p0 = 0.000702997;
182  p1 = 0.00562643;
183  break;
184  }
185  case 15: {
186  p0 = 0.000973417;
187  p1 = 0.00312666;
188  break;
189  }
190  case 16: {
191  p0 = 0.000995213;
192  p1 = 0.00564278;
193  break;
194  }
195  case 17: {
196  p0 = 0.00121436;
197  p1 = 0.00572704;
198  break;
199  }
200  case 18: {
201  p0 = 0.00119216;
202  p1 = 0.00760204;
203  break;
204  }
205  case 19: {
206  p0 = 0.00141204;
207  p1 = 0.0093777;
208  break;
209  }
210  default: {
211  p0 = 0.00153161;
212  p1 = 0.00940265;
213  break;
214  }
215  }
216  return p0 + p1 * fabs(invPt);
217 }
218 
219 double L1MuonPixelTrackFitter::valCotTheta(const PixelRecoLineRZ& line) const { return line.cotLine(); }
220 
221 double L1MuonPixelTrackFitter::errCotTheta(double invPt, double eta) const {
222  //
223  // sigma = p0+p1/|pt|;
224  //
225  double p0, p1;
226  int ieta = int(10 * fabs(eta));
227  switch (ieta) {
228  case 0: {
229  p0 = 0.00166115;
230  p1 = 5.75533e-05;
231  break;
232  }
233  case 1: {
234  p0 = 0.00157525;
235  p1 = 0.000707437;
236  break;
237  }
238  case 2: {
239  p0 = 0.00122246;
240  p1 = 0.000325456;
241  break;
242  }
243  case 3: {
244  p0 = 0.000852422;
245  p1 = 0.000429216;
246  break;
247  }
248  case 4: {
249  p0 = 0.000637561;
250  p1 = 0.00122298;
251  break;
252  }
253  case 5: {
254  p0 = 0.000555766;
255  p1 = 0.00158096;
256  break;
257  }
258  case 6: {
259  p0 = 0.000641202;
260  p1 = 0.00143339;
261  break;
262  }
263  case 7: {
264  p0 = 0.000803207;
265  p1 = 0.000648816;
266  break;
267  }
268  case 8: {
269  p0 = 0.000741394;
270  p1 = 0.0015289;
271  break;
272  }
273  case 9: {
274  p0 = 0.000652019;
275  p1 = 0.00168873;
276  break;
277  }
278  case 10: {
279  p0 = 0.000716902;
280  p1 = 0.00257556;
281  break;
282  }
283  case 11: {
284  p0 = 0.000800409;
285  p1 = 0.00190563;
286  break;
287  }
288  case 12: {
289  p0 = 0.000808778;
290  p1 = 0.00264139;
291  break;
292  }
293  case 13: {
294  p0 = 0.000775757;
295  p1 = 0.00318478;
296  break;
297  }
298  case 14: {
299  p0 = 0.000705781;
300  p1 = 0.00460576;
301  break;
302  }
303  case 15: {
304  p0 = 0.000580679;
305  p1 = 0.00748248;
306  break;
307  }
308  case 16: {
309  p0 = 0.000561667;
310  p1 = 0.00767487;
311  break;
312  }
313  case 17: {
314  p0 = 0.000521626;
315  p1 = 0.0100178;
316  break;
317  }
318  case 18: {
319  p0 = 0.00064253;
320  p1 = 0.0106062;
321  break;
322  }
323  case 19: {
324  p0 = 0.000636868;
325  p1 = 0.0140047;
326  break;
327  }
328  default: {
329  p0 = 0.000682478;
330  p1 = 0.0163569;
331  break;
332  }
333  }
334  return p0 + p1 * fabs(invPt);
335 }
336 
337 double L1MuonPixelTrackFitter::valTip(const Circle& circle, double curvature) const {
338  Circle::Point zero(0., 0., 0.);
339  Circle::Vector center = circle.center() - zero;
340  long double radius = center.perp();
341  return radius - 1. / fabs(curvature);
342 }
343 
344 double L1MuonPixelTrackFitter::errTip(double invPt, double eta) const {
345  //
346  // sigma = p0+p1/|pt|;
347  //
348  double p0, p1;
349  int ieta = int(10 * fabs(eta));
350  switch (ieta) {
351  case 0: {
352  p0 = 0.00392416;
353  p1 = 0.00551809;
354  break;
355  }
356  case 1: {
357  p0 = 0.00390391;
358  p1 = 0.00543244;
359  break;
360  }
361  case 2: {
362  p0 = 0.0040651;
363  p1 = 0.00406496;
364  break;
365  }
366  case 3: {
367  p0 = 0.00387782;
368  p1 = 0.00797637;
369  break;
370  }
371  case 4: {
372  p0 = 0.00376798;
373  p1 = 0.00866894;
374  break;
375  }
376  case 5: {
377  p0 = 0.0042131;
378  p1 = 0.00462184;
379  break;
380  }
381  case 6: {
382  p0 = 0.00392579;
383  p1 = 0.00784685;
384  break;
385  }
386  case 7: {
387  p0 = 0.00370472;
388  p1 = 0.00790174;
389  break;
390  }
391  case 8: {
392  p0 = 0.00364433;
393  p1 = 0.00928368;
394  break;
395  }
396  case 9: {
397  p0 = 0.00387578;
398  p1 = 0.00640431;
399  break;
400  }
401  case 10: {
402  p0 = 0.00382464;
403  p1 = 0.00960763;
404  break;
405  }
406  case 11: {
407  p0 = 0.0038907;
408  p1 = 0.0104562;
409  break;
410  }
411  case 12: {
412  p0 = 0.00392525;
413  p1 = 0.0106442;
414  break;
415  }
416  case 13: {
417  p0 = 0.00400634;
418  p1 = 0.011218;
419  break;
420  }
421  case 14: {
422  p0 = 0.0036229;
423  p1 = 0.0156403;
424  break;
425  }
426  case 15: {
427  p0 = 0.00444317;
428  p1 = 0.00832987;
429  break;
430  }
431  case 16: {
432  p0 = 0.00465492;
433  p1 = 0.0179908;
434  break;
435  }
436  case 17: {
437  p0 = 0.0049652;
438  p1 = 0.0216647;
439  break;
440  }
441  case 18: {
442  p0 = 0.0051395;
443  p1 = 0.0233692;
444  break;
445  }
446  case 19: {
447  p0 = 0.0062917;
448  p1 = 0.0262175;
449  break;
450  }
451  default: {
452  p0 = 0.00714444;
453  p1 = 0.0253856;
454  break;
455  }
456  }
457  return p0 + p1 * fabs(invPt);
458 }
459 
460 double L1MuonPixelTrackFitter::valZip(double curv, const GlobalPoint& pinner, const GlobalPoint& pouter) const {
461  //
462  // phi = asin(r*rho/2) with asin(x) ~= x+x**3/(2*3)
463  //
464  double rho3 = curv * curv * curv;
465  double r1 = pinner.perp();
466  double phi1 = r1 * curv / 2 + pinner.perp2() * r1 * rho3 / 48.;
467  double r2 = pouter.perp();
468  double phi2 = r2 * curv / 2 + pouter.perp2() * r2 * rho3 / 48.;
469  double z1 = pinner.z();
470  double z2 = pouter.z();
471 
472  return z1 - phi1 / (phi1 - phi2) * (z1 - z2);
473 }
474 
475 double L1MuonPixelTrackFitter::errZip(double invPt, double eta) const {
476  //
477  // sigma = p0+p1/pt;
478  //
479  double p0, p1;
480  int ieta = int(10 * fabs(eta));
481  switch (ieta) {
482  case 0: {
483  p0 = 0.0120743;
484  p1 = 0;
485  break;
486  }
487  case 1: {
488  p0 = 0.0110343;
489  p1 = 0.0051199;
490  break;
491  }
492  case 2: {
493  p0 = 0.00846487;
494  p1 = 0.00570084;
495  break;
496  }
497  case 3: {
498  p0 = 0.00668726;
499  p1 = 0.00331165;
500  break;
501  }
502  case 4: {
503  p0 = 0.00467126;
504  p1 = 0.00578239;
505  break;
506  }
507  case 5: {
508  p0 = 0.0043042;
509  p1 = 0.00598517;
510  break;
511  }
512  case 6: {
513  p0 = 0.00515392;
514  p1 = 0.00495422;
515  break;
516  }
517  case 7: {
518  p0 = 0.0060843;
519  p1 = 0.00320512;
520  break;
521  }
522  case 8: {
523  p0 = 0.00564942;
524  p1 = 0.00478876;
525  break;
526  }
527  case 9: {
528  p0 = 0.00532111;
529  p1 = 0.0073239;
530  break;
531  }
532  case 10: {
533  p0 = 0.00579429;
534  p1 = 0.00952782;
535  break;
536  }
537  case 11: {
538  p0 = 0.00614229;
539  p1 = 0.00977795;
540  break;
541  }
542  case 12: {
543  p0 = 0.00714661;
544  p1 = 0.00550482;
545  break;
546  }
547  case 13: {
548  p0 = 0.0066593;
549  p1 = 0.00999362;
550  break;
551  }
552  case 14: {
553  p0 = 0.00634922;
554  p1 = 0.0148156;
555  break;
556  }
557  case 15: {
558  p0 = 0.00600586;
559  p1 = 0.0318022;
560  break;
561  }
562  case 16: {
563  p0 = 0.00676919;
564  p1 = 0.027456;
565  break;
566  }
567  case 17: {
568  p0 = 0.00670066;
569  p1 = 0.0317005;
570  break;
571  }
572  case 18: {
573  p0 = 0.00752392;
574  p1 = 0.0347714;
575  break;
576  }
577  case 19: {
578  p0 = 0.00791425;
579  p1 = 0.0566665;
580  break;
581  }
582  default: {
583  p0 = 0.00882372;
584  p1 = 0.0596858;
585  break;
586  }
587  }
588  return p0 + p1 * fabs(invPt);
589 }
590 
591 double L1MuonPixelTrackFitter::valInversePt(double phi0, double phiL1, double eta) const {
592  double result = 0.;
593 
594  // solve equtaion p3*result^3 + p1*result + dphi = 0;
595  // where: result = 1/pt
596  // dphi = phiL1 - phi0
597  // Cardan way is used
598 
599  double p1, p2, p3; //parameters p1,p3 are negative by parameter fix in fit!
600  param(eta, p1, p2, p3);
601 
602  double dphi = deltaPhi(phiL1, phi0); // phi0-phiL1
603  if (fabs(dphi) < 0.01) {
604  result = -dphi / p1;
605  } else {
606  double q = dphi / 2. / p3;
607  double p = p1 / 3. / p3; // positive
608  double D = q * q + p * p * p; // positive
609  double u = pow(-q + sqrt(D), 1. / 3.);
610  double v = -pow(q + sqrt(D), 1. / 3.);
611  result = u + v;
612  }
613  return result;
614 }
615 
616 double L1MuonPixelTrackFitter::errInversePt(double invPt, double eta) const {
617  //
618  // pt*sigma(1/pt) = p0+p1*pt;
619  //
620  double p0, p1;
621  int ieta = int(10 * fabs(eta));
622  switch (ieta) {
623  case 0: {
624  p0 = 0.0196835;
625  p1 = 0.00517533;
626  break;
627  }
628  case 1: {
629  p0 = 0.0266583;
630  p1 = 0.00478101;
631  break;
632  }
633  case 2: {
634  p0 = 0.0217164;
635  p1 = 0.00545425;
636  break;
637  }
638  case 3: {
639  p0 = 0.0197547;
640  p1 = 0.00552263;
641  break;
642  }
643  case 4: {
644  p0 = 0.0208778;
645  p1 = 0.00536009;
646  break;
647  }
648  case 5: {
649  p0 = 0.024192;
650  p1 = 0.00521709;
651  break;
652  }
653  case 6: {
654  p0 = 0.0265315;
655  p1 = 0.0051897;
656  break;
657  }
658  case 7: {
659  p0 = 0.0198071;
660  p1 = 0.00566822;
661  break;
662  }
663  case 8: {
664  p0 = 0.0361955;
665  p1 = 0.00486352;
666  break;
667  }
668  case 9: {
669  p0 = 0.037864;
670  p1 = 0.00509094;
671  break;
672  }
673  case 10: {
674  p0 = 0.0382968;
675  p1 = 0.00612354;
676  break;
677  }
678  case 11: {
679  p0 = 0.0308326;
680  p1 = 0.0074234;
681  break;
682  }
683  case 12: {
684  p0 = 0.0248577;
685  p1 = 0.00883049;
686  break;
687  }
688  case 13: {
689  p0 = 0.0279965;
690  p1 = 0.00888293;
691  break;
692  }
693  case 14: {
694  p0 = 0.0372582;
695  p1 = 0.00950252;
696  break;
697  }
698  case 15: {
699  p0 = 0.0281366;
700  p1 = 0.0111501;
701  break;
702  }
703  case 16: {
704  p0 = 0.0421483;
705  p1 = 0.0109413;
706  break;
707  }
708  case 17: {
709  p0 = 0.0461798;
710  p1 = 0.0125824;
711  break;
712  }
713  case 18: {
714  p0 = 0.0530603;
715  p1 = 0.0132638;
716  break;
717  }
718  case 19: {
719  p0 = 0.0601148;
720  p1 = 0.0147911;
721  break;
722  }
723  default: {
724  p0 = 0.0552377;
725  p1 = 0.0155574;
726  break;
727  }
728  }
729  return p1 + p0 * fabs(invPt);
730 }
731 
732 double L1MuonPixelTrackFitter::findPt(double phi0, double phiL1, double eta, int charge) const {
733  double dphi_min = fabs(deltaPhi(phi0, phiL1));
734  double pt_best = 1.;
735  double pt_cur = 1;
736  while (pt_cur < 10000.) {
737  double phi_exp = phi0 + getBending(1. / pt_cur, eta, charge);
738  double dphi = fabs(deltaPhi(phi_exp, phiL1));
739  if (dphi < dphi_min) {
740  pt_best = pt_cur;
741  dphi_min = dphi;
742  }
743  if (pt_cur < 10.)
744  pt_cur += 0.01;
745  else if (pt_cur < 20.)
746  pt_cur += 0.025;
747  else if (pt_cur < 100.)
748  pt_cur += 0.1;
749  else
750  pt_cur += 1;
751  };
752  return pt_best;
753 }
754 
755 double L1MuonPixelTrackFitter::getBending(double invPt, double eta, int charge) {
756  double p1, p2, p3;
757  param(eta, p1, p2, p3);
758  return charge * p1 * invPt + charge * p2 * invPt * invPt + charge * p3 * invPt * invPt * invPt;
759 }
760 
761 double L1MuonPixelTrackFitter::getBendingError(double invPt, double eta) {
762  int ieta = int(10 * fabs(eta));
763  double p0, p1;
764  switch (ieta) {
765  case 0: {
766  p0 = 0.0196835;
767  p1 = 0.00517533;
768  break;
769  }
770  case 1: {
771  p0 = 0.0266583;
772  p1 = 0.00478101;
773  break;
774  }
775  case 2: {
776  p0 = 0.0217164;
777  p1 = 0.00545425;
778  break;
779  }
780  case 3: {
781  p0 = 0.0197547;
782  p1 = 0.00552263;
783  break;
784  }
785  case 4: {
786  p0 = 0.0208778;
787  p1 = 0.00536009;
788  break;
789  }
790  case 5: {
791  p0 = 0.024192;
792  p1 = 0.00521709;
793  break;
794  }
795  case 6: {
796  p0 = 0.0265315;
797  p1 = 0.0051897;
798  break;
799  }
800  case 7: {
801  p0 = 0.0198071;
802  p1 = 0.00566822;
803  break;
804  }
805  case 8: {
806  p0 = 0.0361955;
807  p1 = 0.00486352;
808  break;
809  }
810  case 9: {
811  p0 = 0.037864;
812  p1 = 0.00509094;
813  break;
814  }
815  case 10: {
816  p0 = 0.0382968;
817  p1 = 0.00612354;
818  break;
819  }
820  case 11: {
821  p0 = 0.0308326;
822  p1 = 0.0074234;
823  break;
824  }
825  case 12: {
826  p0 = 0.0248577;
827  p1 = 0.00883049;
828  break;
829  }
830  case 13: {
831  p0 = 0.0279965;
832  p1 = 0.00888293;
833  break;
834  }
835  case 14: {
836  p0 = 0.0372582;
837  p1 = 0.00950252;
838  break;
839  }
840  case 15: {
841  p0 = 0.0281366;
842  p1 = 0.0111501;
843  break;
844  }
845  case 16: {
846  p0 = 0.0421483;
847  p1 = 0.0109413;
848  break;
849  }
850  case 17: {
851  p0 = 0.0461798;
852  p1 = 0.0125824;
853  break;
854  }
855  case 18: {
856  p0 = 0.0530603;
857  p1 = 0.0132638;
858  break;
859  }
860  case 19: {
861  p0 = 0.0601148;
862  p1 = 0.0147911;
863  break;
864  }
865  default: {
866  p0 = 0.0552377;
867  p1 = 0.0155574;
868  break;
869  }
870  }
871  return p0 + p1 * sqr(invPt);
872 }
873 
874 void L1MuonPixelTrackFitter::param(double eta, double& p1, double& p2, double& p3) {
875  int ieta = int(10 * fabs(eta));
876  switch (ieta) {
877  case 0: {
878  p1 = -2.68016;
879  p2 = 0;
880  p3 = -12.9653;
881  break;
882  }
883  case 1: {
884  p1 = -2.67864;
885  p2 = 0;
886  p3 = -12.0036;
887  break;
888  }
889  case 2: {
890  p1 = -2.72997;
891  p2 = 0;
892  p3 = -10.3468;
893  break;
894  }
895  case 3: {
896  p1 = -2.68836;
897  p2 = 0;
898  p3 = -12.3369;
899  break;
900  }
901  case 4: {
902  p1 = -2.66885;
903  p2 = 0;
904  p3 = -11.589;
905  break;
906  }
907  case 5: {
908  p1 = -2.64932;
909  p2 = 0;
910  p3 = -12.7176;
911  break;
912  }
913  case 6: {
914  p1 = -2.64513;
915  p2 = 0;
916  p3 = -11.3912;
917  break;
918  }
919  case 7: {
920  p1 = -2.64487;
921  p2 = 0;
922  p3 = -9.83239;
923  break;
924  }
925  case 8: {
926  p1 = -2.58875;
927  p2 = 0;
928  p3 = -10.0541;
929  break;
930  }
931  case 9: {
932  p1 = -2.5551;
933  p2 = 0;
934  p3 = -9.75757;
935  break;
936  }
937  case 10: {
938  p1 = -2.55294;
939  p2 = 0;
940  p3 = -7.25238;
941  break;
942  }
943  case 11: {
944  p1 = -2.45333;
945  p2 = 0;
946  p3 = -7.966;
947  break;
948  }
949  case 12: {
950  p1 = -2.29283;
951  p2 = 0;
952  p3 = -7.03231;
953  break;
954  }
955  case 13: {
956  p1 = -2.13167;
957  p2 = 0;
958  p3 = -4.29182;
959  break;
960  }
961  case 14: {
962  p1 = -1.9102;
963  p2 = 0;
964  p3 = -3.21295;
965  break;
966  }
967  case 15: {
968  p1 = -1.74552;
969  p2 = 0;
970  p3 = -0.531827;
971  break;
972  }
973  case 16: {
974  p1 = -1.53642;
975  p2 = 0;
976  p3 = -1.74057;
977  break;
978  }
979  case 17: {
980  p1 = -1.39446;
981  p2 = 0;
982  p3 = -1.56819;
983  break;
984  }
985  case 18: {
986  p1 = -1.26176;
987  p2 = 0;
988  p3 = -0.598631;
989  break;
990  }
991  case 19: {
992  p1 = -1.14133;
993  p2 = 0;
994  p3 = -0.0941055;
995  break;
996  }
997  default: {
998  p1 = -1.02086;
999  p2 = 0;
1000  p3 = -0.100491;
1001  break;
1002  }
1003  }
1004 }
1005 
1006 double L1MuonPixelTrackFitter::deltaPhi(double phi1, double phi2) const {
1007  while (phi1 >= 2 * M_PI)
1008  phi1 -= 2 * M_PI;
1009  while (phi2 >= 2 * M_PI)
1010  phi2 -= 2 * M_PI;
1011  while (phi1 < 0)
1012  phi1 += 2 * M_PI;
1013  while (phi2 < 0)
1014  phi2 += 2 * M_PI;
1015  double dPhi = phi2 - phi1;
1016 
1017  if (dPhi > M_PI)
1018  dPhi -= 2 * M_PI;
1019  if (dPhi < -M_PI)
1020  dPhi += 2 * M_PI;
1021 
1022  return dPhi;
1023 }
Vector3DBase
Definition: Vector3DBase.h:8
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
Measurement1D
Definition: Measurement1D.h:11
L1MuonPixelTrackFitter::tipErrorScale
const double tipErrorScale
Definition: L1MuonPixelTrackFitter.h:95
L1MuonPixelTrackFitter::thePhiL1
double thePhiL1
Definition: L1MuonPixelTrackFitter.h:99
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
muon
Definition: MuonCocktails.h:17
SeedingHitSet
Definition: SeedingHitSet.h:6
L1MuonPixelTrackFitter::invPtErrorScale
const double invPtErrorScale
Definition: L1MuonPixelTrackFitter.h:92
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
L1MuonPixelTrackFitter::setPxConstraint
void setPxConstraint(const SeedingHitSet &hits)
Definition: L1MuonPixelTrackFitter.cc:34
TSGFromL1_cfi.invPtErrorScale
invPtErrorScale
Definition: TSGFromL1_cfi.py:9
L1MuonPixelTrackFitter::phiErrorScale
const double phiErrorScale
Definition: L1MuonPixelTrackFitter.h:93
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TSGFromL1_cfi.tipErrorScale
tipErrorScale
Definition: TSGFromL1_cfi.py:7
data-class-funcs.q
q
Definition: data-class-funcs.py:169
Measurement1D.h
L1MuonPixelTrackFitter::errTip
double errTip(double invPt, double eta) const
Definition: L1MuonPixelTrackFitter.cc:344
L1MuonPixelTrackFitter::errInversePt
double errInversePt(double invPt, double eta) const
Definition: L1MuonPixelTrackFitter.cc:616
findQualityFiles.v
v
Definition: findQualityFiles.py:179
L1MuonPixelTrackFitter::valCotTheta
double valCotTheta(const PixelRecoLineRZ &line) const
Definition: L1MuonPixelTrackFitter.cc:219
L1MuonPixelTrackFitter::theHit2
GlobalPoint theHit2
Definition: L1MuonPixelTrackFitter.h:103
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
L1MuonPixelTrackFitter::Circle
Definition: L1MuonPixelTrackFitter.h:29
PixelRecoUtilities::curvature
T curvature(T InversePt, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:42
L1MuonPixelTrackFitter::run
virtual reco::Track * run(const edm::EventSetup &es, const std::vector< const TrackingRecHit * > &hits, const TrackingRegion &region) const
Definition: L1MuonPixelTrackFitter.cc:39
L1MuGMTCand
Definition: L1MuGMTCand.h:39
testProducerWithPsetDescEmpty_cfi.z2
z2
Definition: testProducerWithPsetDescEmpty_cfi.py:41
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
L1MuonPixelTrackFitter::theChargeL1
int theChargeL1
Definition: L1MuonPixelTrackFitter.h:100
L1MuonPixelTrackFitter::errPhi
double errPhi(double invPt, double eta) const
Definition: L1MuonPixelTrackFitter.cc:103
TSGFromL1_cfi.zipErrorScale
zipErrorScale
Definition: TSGFromL1_cfi.py:11
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
SeedingHitSet.h
PVValHelper::eta
Definition: PVValidationHelpers.h:69
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
TSGFromL1_cfi.cotThetaErrorScale
cotThetaErrorScale
Definition: TSGFromL1_cfi.py:6
L1MuonPixelTrackFitter::getBending
static double getBending(double invPt, double eta, int charge)
Definition: L1MuonPixelTrackFitter.cc:755
HLT_2018_cff.dPhi
dPhi
Definition: HLT_2018_cff.py:12290
reco::Track
Definition: Track.h:27
IdealMagneticFieldRecord.h
edm::ESHandle< MagneticField >
p2
double p2[4]
Definition: TauolaWrapper.h:90
PixelTrackBuilder
Definition: PixelTrackBuilder.h:13
PixelRecoUtilities.h
Point3DBase< long double, GlobalTag >
OrderedSet.t
t
Definition: OrderedSet.py:90
L1MuonPixelTrackFitter::theHit1
GlobalPoint theHit1
Definition: L1MuonPixelTrackFitter.h:103
L1MuonPixelTrackFitter::getBendingError
static double getBendingError(double invPt, double eta)
Definition: L1MuonPixelTrackFitter.cc:761
qcdUeDQM_cfi.tip
tip
Definition: qcdUeDQM_cfi.py:23
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
TSGFromL1_cfi.phiErrorScale
phiErrorScale
Definition: TSGFromL1_cfi.py:10
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
edm::ParameterSet
Definition: ParameterSet.h:36
L1MuonPixelTrackFitter::valTip
double valTip(const Circle &c, double curvature) const
Definition: L1MuonPixelTrackFitter.cc:337
L1MuonPixelTrackFitter::param
static void param(double eta, double &p1, double &p2, double &p3)
Definition: L1MuonPixelTrackFitter.cc:874
L1MuonPixelTrackFitter::theConfig
edm::ParameterSet theConfig
Definition: L1MuonPixelTrackFitter.h:90
L1MuonPixelTrackFitter.h
L1MuonPixelTrackFitter::errZip
double errZip(double invPt, double eta) const
Definition: L1MuonPixelTrackFitter.cc:475
L1MuonPixelTrackFitter::zipErrorScale
const double zipErrorScale
Definition: L1MuonPixelTrackFitter.h:96
diffTwoXMLs.r2
r2
Definition: diffTwoXMLs.py:73
L1MuonPixelTrackFitter::theEtaL1
double theEtaL1
Definition: L1MuonPixelTrackFitter.h:99
createfilelist.int
int
Definition: createfilelist.py:10
PixelRecoLineRZ
Definition: PixelRecoLineRZ.h:12
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
L1MuonPixelTrackFitter::errCotTheta
double errCotTheta(double invPt, double eta) const
Definition: L1MuonPixelTrackFitter.cc:221
Vector3DBase::cross
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:110
p1
double p1[4]
Definition: TauolaWrapper.h:89
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:57
L1MuonPixelTrackFitter::setL1Constraint
void setL1Constraint(const L1MuGMTCand &muon)
Definition: L1MuonPixelTrackFitter.cc:28
get
#define get
ComparisonHelper::zip
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
Definition: L1TStage2CaloLayer1.h:38
looper.cfg
cfg
Definition: looper.py:297
L1MuonPixelTrackFitter::valPhi
double valPhi(const Circle &c, int charge) const
Definition: L1MuonPixelTrackFitter.cc:94
PixelTrackBuilder::build
reco::Track * build(const Measurement1D &pt, const Measurement1D &phi, const Measurement1D &cotTheta, const Measurement1D &tip, const Measurement1D &zip, float chi2, int charge, const std::vector< const TrackingRecHit * > &hits, const MagneticField *mf, const GlobalPoint &reference=GlobalPoint(0, 0, 0)) const
Definition: PixelTrackBuilder.cc:123
PixelTrackBuilder.h
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
L1MuonPixelTrackFitter::deltaPhi
double deltaPhi(double phi1, double phi2) const
Definition: L1MuonPixelTrackFitter.cc:1006
L1MuGMTCand.h
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
L1MuonPixelTrackFitter::cotThetaErrorScale
const double cotThetaErrorScale
Definition: L1MuonPixelTrackFitter.h:94
diffTwoXMLs.r1
r1
Definition: diffTwoXMLs.py:53
T
long double T
Definition: Basic3DVectorLD.h:48
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
sqr
T sqr(T t)
Definition: L1MuonPixelTrackFitter.cc:16
PixelRecoLineRZ.h
p3
double p3[4]
Definition: TauolaWrapper.h:91
L1MuonPixelTrackFitter::Circle::center
const Point & center() const
Definition: L1MuonPixelTrackFitter.h:45
TrackingRegion
Definition: TrackingRegion.h:38
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
mps_fire.result
result
Definition: mps_fire.py:303
L1MuonPixelTrackFitter::findPt
double findPt(double phi0, double phiL1, double eta, int charge) const
Definition: L1MuonPixelTrackFitter.cc:732
L1MuonPixelTrackFitter::L1MuonPixelTrackFitter
L1MuonPixelTrackFitter(const edm::ParameterSet &cfg)
Definition: L1MuonPixelTrackFitter.cc:20
mps_splice.line
line
Definition: mps_splice.py:76
L1MuonPixelTrackFitter::valInversePt
double valInversePt(double phi0, double phiL1, double eta) const
Definition: L1MuonPixelTrackFitter.cc:591
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
PV3DBase::perp2
T perp2() const
Definition: PV3DBase.h:68
L1MuonPixelTrackFitter::valZip
double valZip(double curvature, const GlobalPoint &p0, const GlobalPoint &p1) const
Definition: L1MuonPixelTrackFitter.cc:460
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23