CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
L1MuonPixelTrackFitter Class Reference

#include <L1MuonPixelTrackFitter.h>

Classes

class  Circle
 

Public Member Functions

 L1MuonPixelTrackFitter (const edm::ParameterSet &cfg)
 
virtual reco::Trackrun (const edm::EventSetup &es, const std::vector< const TrackingRecHit * > &hits, const TrackingRegion &region) const
 
void setL1Constraint (const L1MuGMTCand &muon)
 
void setPxConstraint (const SeedingHitSet &hits)
 
virtual ~L1MuonPixelTrackFitter ()
 

Static Public Member Functions

static double getBending (double invPt, double eta, int charge)
 
static double getBendingError (double invPt, double eta)
 

Private Member Functions

double deltaPhi (double phi1, double phi2) const
 
double errCotTheta (double invPt, double eta) const
 
double errInversePt (double invPt, double eta) const
 
double errPhi (double invPt, double eta) const
 
double errTip (double invPt, double eta) const
 
double errZip (double invPt, double eta) const
 
double findPt (double phi0, double phiL1, double eta, int charge) const
 
double valCotTheta (const PixelRecoLineRZ &line) const
 
double valInversePt (double phi0, double phiL1, double eta) const
 
double valPhi (const Circle &c, int charge) const
 
double valTip (const Circle &c, double curvature) const
 
double valZip (double curvature, const GlobalPoint &p0, const GlobalPoint &p1) const
 

Static Private Member Functions

static void param (double eta, double &p1, double &p2, double &p3)
 

Private Attributes

const double cotThetaErrorScale
 
const double invPtErrorScale
 
const double phiErrorScale
 
int theChargeL1
 
edm::ParameterSet theConfig
 
double theEtaL1
 
GlobalPoint theHit1
 
GlobalPoint theHit2
 
double thePhiL1
 
const double tipErrorScale
 
const double zipErrorScale
 

Friends

class L1Seeding
 

Detailed Description

Definition at line 27 of file L1MuonPixelTrackFitter.h.

Constructor & Destructor Documentation

L1MuonPixelTrackFitter::L1MuonPixelTrackFitter ( const edm::ParameterSet cfg)

Definition at line 20 of file L1MuonPixelTrackFitter.cc.

References cotThetaErrorScale, edm::ParameterSet::getParameter(), phiErrorScale, theConfig, tipErrorScale, and zipErrorScale.

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")} {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
virtual L1MuonPixelTrackFitter::~L1MuonPixelTrackFitter ( )
inlinevirtual

Definition at line 57 of file L1MuonPixelTrackFitter.h.

57 {}

Member Function Documentation

double L1MuonPixelTrackFitter::deltaPhi ( double  phi1,
double  phi2 
) const
private

Definition at line 1007 of file L1MuonPixelTrackFitter.cc.

References M_PI.

Referenced by findPt(), and valInversePt().

1007  {
1008  while (phi1 >= 2 * M_PI)
1009  phi1 -= 2 * M_PI;
1010  while (phi2 >= 2 * M_PI)
1011  phi2 -= 2 * M_PI;
1012  while (phi1 < 0)
1013  phi1 += 2 * M_PI;
1014  while (phi2 < 0)
1015  phi2 += 2 * M_PI;
1016  double dPhi = phi2 - phi1;
1017 
1018  if (dPhi > M_PI)
1019  dPhi -= 2 * M_PI;
1020  if (dPhi < -M_PI)
1021  dPhi += 2 * M_PI;
1022 
1023  return dPhi;
1024 }
#define M_PI
double L1MuonPixelTrackFitter::errCotTheta ( double  invPt,
double  eta 
) const
private

Definition at line 222 of file L1MuonPixelTrackFitter.cc.

References fireworks::p1.

Referenced by run().

222  {
223  //
224  // sigma = p0+p1/|pt|;
225  //
226  double p0, p1;
227  int ieta = int(10 * fabs(eta));
228  switch (ieta) {
229  case 0: {
230  p0 = 0.00166115;
231  p1 = 5.75533e-05;
232  break;
233  }
234  case 1: {
235  p0 = 0.00157525;
236  p1 = 0.000707437;
237  break;
238  }
239  case 2: {
240  p0 = 0.00122246;
241  p1 = 0.000325456;
242  break;
243  }
244  case 3: {
245  p0 = 0.000852422;
246  p1 = 0.000429216;
247  break;
248  }
249  case 4: {
250  p0 = 0.000637561;
251  p1 = 0.00122298;
252  break;
253  }
254  case 5: {
255  p0 = 0.000555766;
256  p1 = 0.00158096;
257  break;
258  }
259  case 6: {
260  p0 = 0.000641202;
261  p1 = 0.00143339;
262  break;
263  }
264  case 7: {
265  p0 = 0.000803207;
266  p1 = 0.000648816;
267  break;
268  }
269  case 8: {
270  p0 = 0.000741394;
271  p1 = 0.0015289;
272  break;
273  }
274  case 9: {
275  p0 = 0.000652019;
276  p1 = 0.00168873;
277  break;
278  }
279  case 10: {
280  p0 = 0.000716902;
281  p1 = 0.00257556;
282  break;
283  }
284  case 11: {
285  p0 = 0.000800409;
286  p1 = 0.00190563;
287  break;
288  }
289  case 12: {
290  p0 = 0.000808778;
291  p1 = 0.00264139;
292  break;
293  }
294  case 13: {
295  p0 = 0.000775757;
296  p1 = 0.00318478;
297  break;
298  }
299  case 14: {
300  p0 = 0.000705781;
301  p1 = 0.00460576;
302  break;
303  }
304  case 15: {
305  p0 = 0.000580679;
306  p1 = 0.00748248;
307  break;
308  }
309  case 16: {
310  p0 = 0.000561667;
311  p1 = 0.00767487;
312  break;
313  }
314  case 17: {
315  p0 = 0.000521626;
316  p1 = 0.0100178;
317  break;
318  }
319  case 18: {
320  p0 = 0.00064253;
321  p1 = 0.0106062;
322  break;
323  }
324  case 19: {
325  p0 = 0.000636868;
326  p1 = 0.0140047;
327  break;
328  }
329  default: {
330  p0 = 0.000682478;
331  p1 = 0.0163569;
332  break;
333  }
334  }
335  return p0 + p1 * fabs(invPt);
336 }
const TString p1
Definition: fwPaths.cc:12
double L1MuonPixelTrackFitter::errInversePt ( double  invPt,
double  eta 
) const
private

Definition at line 617 of file L1MuonPixelTrackFitter.cc.

References fireworks::p1.

Referenced by run().

617  {
618  //
619  // pt*sigma(1/pt) = p0+p1*pt;
620  //
621  double p0, p1;
622  int ieta = int(10 * fabs(eta));
623  switch (ieta) {
624  case 0: {
625  p0 = 0.0196835;
626  p1 = 0.00517533;
627  break;
628  }
629  case 1: {
630  p0 = 0.0266583;
631  p1 = 0.00478101;
632  break;
633  }
634  case 2: {
635  p0 = 0.0217164;
636  p1 = 0.00545425;
637  break;
638  }
639  case 3: {
640  p0 = 0.0197547;
641  p1 = 0.00552263;
642  break;
643  }
644  case 4: {
645  p0 = 0.0208778;
646  p1 = 0.00536009;
647  break;
648  }
649  case 5: {
650  p0 = 0.024192;
651  p1 = 0.00521709;
652  break;
653  }
654  case 6: {
655  p0 = 0.0265315;
656  p1 = 0.0051897;
657  break;
658  }
659  case 7: {
660  p0 = 0.0198071;
661  p1 = 0.00566822;
662  break;
663  }
664  case 8: {
665  p0 = 0.0361955;
666  p1 = 0.00486352;
667  break;
668  }
669  case 9: {
670  p0 = 0.037864;
671  p1 = 0.00509094;
672  break;
673  }
674  case 10: {
675  p0 = 0.0382968;
676  p1 = 0.00612354;
677  break;
678  }
679  case 11: {
680  p0 = 0.0308326;
681  p1 = 0.0074234;
682  break;
683  }
684  case 12: {
685  p0 = 0.0248577;
686  p1 = 0.00883049;
687  break;
688  }
689  case 13: {
690  p0 = 0.0279965;
691  p1 = 0.00888293;
692  break;
693  }
694  case 14: {
695  p0 = 0.0372582;
696  p1 = 0.00950252;
697  break;
698  }
699  case 15: {
700  p0 = 0.0281366;
701  p1 = 0.0111501;
702  break;
703  }
704  case 16: {
705  p0 = 0.0421483;
706  p1 = 0.0109413;
707  break;
708  }
709  case 17: {
710  p0 = 0.0461798;
711  p1 = 0.0125824;
712  break;
713  }
714  case 18: {
715  p0 = 0.0530603;
716  p1 = 0.0132638;
717  break;
718  }
719  case 19: {
720  p0 = 0.0601148;
721  p1 = 0.0147911;
722  break;
723  }
724  default: {
725  p0 = 0.0552377;
726  p1 = 0.0155574;
727  break;
728  }
729  }
730  return p1 + p0 * fabs(invPt);
731 }
const TString p1
Definition: fwPaths.cc:12
double L1MuonPixelTrackFitter::errPhi ( double  invPt,
double  eta 
) const
private

Definition at line 104 of file L1MuonPixelTrackFitter.cc.

References fireworks::p1.

Referenced by run().

104  {
105  //
106  // sigma = p0+p1/|pt|;
107  //
108  double p0, p1;
109  int ieta = int(10 * fabs(eta));
110  switch (ieta) {
111  case 0: {
112  p0 = 0.000597506;
113  p1 = 0.00221057;
114  break;
115  }
116  case 1: {
117  p0 = 0.000591867;
118  p1 = 0.00278744;
119  break;
120  }
121  case 2: {
122  p0 = 0.000635666;
123  p1 = 0.00207433;
124  break;
125  }
126  case 3: {
127  p0 = 0.000619086;
128  p1 = 0.00255121;
129  break;
130  }
131  case 4: {
132  p0 = 0.000572067;
133  p1 = 0.00310618;
134  break;
135  }
136  case 5: {
137  p0 = 0.000596239;
138  p1 = 0.00288442;
139  break;
140  }
141  case 6: {
142  p0 = 0.000607608;
143  p1 = 0.00282996;
144  break;
145  }
146  case 7: {
147  p0 = 0.000606446;
148  p1 = 0.00281118;
149  break;
150  }
151  case 8: {
152  p0 = 0.000594076;
153  p1 = 0.00280546;
154  break;
155  }
156  case 9: {
157  p0 = 0.000579615;
158  p1 = 0.00335534;
159  break;
160  }
161  case 10: {
162  p0 = 0.000659546;
163  p1 = 0.00340443;
164  break;
165  }
166  case 11: {
167  p0 = 0.000659031;
168  p1 = 0.00343151;
169  break;
170  }
171  case 12: {
172  p0 = 0.000738391;
173  p1 = 0.00337297;
174  break;
175  }
176  case 13: {
177  p0 = 0.000798966;
178  p1 = 0.00330008;
179  break;
180  }
181  case 14: {
182  p0 = 0.000702997;
183  p1 = 0.00562643;
184  break;
185  }
186  case 15: {
187  p0 = 0.000973417;
188  p1 = 0.00312666;
189  break;
190  }
191  case 16: {
192  p0 = 0.000995213;
193  p1 = 0.00564278;
194  break;
195  }
196  case 17: {
197  p0 = 0.00121436;
198  p1 = 0.00572704;
199  break;
200  }
201  case 18: {
202  p0 = 0.00119216;
203  p1 = 0.00760204;
204  break;
205  }
206  case 19: {
207  p0 = 0.00141204;
208  p1 = 0.0093777;
209  break;
210  }
211  default: {
212  p0 = 0.00153161;
213  p1 = 0.00940265;
214  break;
215  }
216  }
217  return p0 + p1 * fabs(invPt);
218 }
const TString p1
Definition: fwPaths.cc:12
double L1MuonPixelTrackFitter::errTip ( double  invPt,
double  eta 
) const
private

Definition at line 345 of file L1MuonPixelTrackFitter.cc.

References fireworks::p1.

Referenced by run().

345  {
346  //
347  // sigma = p0+p1/|pt|;
348  //
349  double p0, p1;
350  int ieta = int(10 * fabs(eta));
351  switch (ieta) {
352  case 0: {
353  p0 = 0.00392416;
354  p1 = 0.00551809;
355  break;
356  }
357  case 1: {
358  p0 = 0.00390391;
359  p1 = 0.00543244;
360  break;
361  }
362  case 2: {
363  p0 = 0.0040651;
364  p1 = 0.00406496;
365  break;
366  }
367  case 3: {
368  p0 = 0.00387782;
369  p1 = 0.00797637;
370  break;
371  }
372  case 4: {
373  p0 = 0.00376798;
374  p1 = 0.00866894;
375  break;
376  }
377  case 5: {
378  p0 = 0.0042131;
379  p1 = 0.00462184;
380  break;
381  }
382  case 6: {
383  p0 = 0.00392579;
384  p1 = 0.00784685;
385  break;
386  }
387  case 7: {
388  p0 = 0.00370472;
389  p1 = 0.00790174;
390  break;
391  }
392  case 8: {
393  p0 = 0.00364433;
394  p1 = 0.00928368;
395  break;
396  }
397  case 9: {
398  p0 = 0.00387578;
399  p1 = 0.00640431;
400  break;
401  }
402  case 10: {
403  p0 = 0.00382464;
404  p1 = 0.00960763;
405  break;
406  }
407  case 11: {
408  p0 = 0.0038907;
409  p1 = 0.0104562;
410  break;
411  }
412  case 12: {
413  p0 = 0.00392525;
414  p1 = 0.0106442;
415  break;
416  }
417  case 13: {
418  p0 = 0.00400634;
419  p1 = 0.011218;
420  break;
421  }
422  case 14: {
423  p0 = 0.0036229;
424  p1 = 0.0156403;
425  break;
426  }
427  case 15: {
428  p0 = 0.00444317;
429  p1 = 0.00832987;
430  break;
431  }
432  case 16: {
433  p0 = 0.00465492;
434  p1 = 0.0179908;
435  break;
436  }
437  case 17: {
438  p0 = 0.0049652;
439  p1 = 0.0216647;
440  break;
441  }
442  case 18: {
443  p0 = 0.0051395;
444  p1 = 0.0233692;
445  break;
446  }
447  case 19: {
448  p0 = 0.0062917;
449  p1 = 0.0262175;
450  break;
451  }
452  default: {
453  p0 = 0.00714444;
454  p1 = 0.0253856;
455  break;
456  }
457  }
458  return p0 + p1 * fabs(invPt);
459 }
const TString p1
Definition: fwPaths.cc:12
double L1MuonPixelTrackFitter::errZip ( double  invPt,
double  eta 
) const
private

Definition at line 476 of file L1MuonPixelTrackFitter.cc.

References fireworks::p1.

Referenced by run().

476  {
477  //
478  // sigma = p0+p1/pt;
479  //
480  double p0, p1;
481  int ieta = int(10 * fabs(eta));
482  switch (ieta) {
483  case 0: {
484  p0 = 0.0120743;
485  p1 = 0;
486  break;
487  }
488  case 1: {
489  p0 = 0.0110343;
490  p1 = 0.0051199;
491  break;
492  }
493  case 2: {
494  p0 = 0.00846487;
495  p1 = 0.00570084;
496  break;
497  }
498  case 3: {
499  p0 = 0.00668726;
500  p1 = 0.00331165;
501  break;
502  }
503  case 4: {
504  p0 = 0.00467126;
505  p1 = 0.00578239;
506  break;
507  }
508  case 5: {
509  p0 = 0.0043042;
510  p1 = 0.00598517;
511  break;
512  }
513  case 6: {
514  p0 = 0.00515392;
515  p1 = 0.00495422;
516  break;
517  }
518  case 7: {
519  p0 = 0.0060843;
520  p1 = 0.00320512;
521  break;
522  }
523  case 8: {
524  p0 = 0.00564942;
525  p1 = 0.00478876;
526  break;
527  }
528  case 9: {
529  p0 = 0.00532111;
530  p1 = 0.0073239;
531  break;
532  }
533  case 10: {
534  p0 = 0.00579429;
535  p1 = 0.00952782;
536  break;
537  }
538  case 11: {
539  p0 = 0.00614229;
540  p1 = 0.00977795;
541  break;
542  }
543  case 12: {
544  p0 = 0.00714661;
545  p1 = 0.00550482;
546  break;
547  }
548  case 13: {
549  p0 = 0.0066593;
550  p1 = 0.00999362;
551  break;
552  }
553  case 14: {
554  p0 = 0.00634922;
555  p1 = 0.0148156;
556  break;
557  }
558  case 15: {
559  p0 = 0.00600586;
560  p1 = 0.0318022;
561  break;
562  }
563  case 16: {
564  p0 = 0.00676919;
565  p1 = 0.027456;
566  break;
567  }
568  case 17: {
569  p0 = 0.00670066;
570  p1 = 0.0317005;
571  break;
572  }
573  case 18: {
574  p0 = 0.00752392;
575  p1 = 0.0347714;
576  break;
577  }
578  case 19: {
579  p0 = 0.00791425;
580  p1 = 0.0566665;
581  break;
582  }
583  default: {
584  p0 = 0.00882372;
585  p1 = 0.0596858;
586  break;
587  }
588  }
589  return p0 + p1 * fabs(invPt);
590 }
const TString p1
Definition: fwPaths.cc:12
double L1MuonPixelTrackFitter::findPt ( double  phi0,
double  phiL1,
double  eta,
int  charge 
) const
private

Definition at line 733 of file L1MuonPixelTrackFitter.cc.

References deltaPhi(), and getBending().

733  {
734  double dphi_min = fabs(deltaPhi(phi0, phiL1));
735  double pt_best = 1.;
736  double pt_cur = 1;
737  while (pt_cur < 10000.) {
738  double phi_exp = phi0 + getBending(1. / pt_cur, eta, charge);
739  double dphi = fabs(deltaPhi(phi_exp, phiL1));
740  if (dphi < dphi_min) {
741  pt_best = pt_cur;
742  dphi_min = dphi;
743  }
744  if (pt_cur < 10.)
745  pt_cur += 0.01;
746  else if (pt_cur < 20.)
747  pt_cur += 0.025;
748  else if (pt_cur < 100.)
749  pt_cur += 0.1;
750  else
751  pt_cur += 1;
752  };
753  return pt_best;
754 }
static double getBending(double invPt, double eta, int charge)
double deltaPhi(double phi1, double phi2) const
double L1MuonPixelTrackFitter::getBending ( double  invPt,
double  eta,
int  charge 
)
static

Definition at line 756 of file L1MuonPixelTrackFitter.cc.

References fireworks::p1, fireworks::p2, and param().

Referenced by findPt(), and L1MuonRegionProducer::regions().

756  {
757  double p1, p2, p3;
758  param(eta, p1, p2, p3);
759  return charge * p1 * invPt + charge * p2 * invPt * invPt + charge * p3 * invPt * invPt * invPt;
760 }
const TString p2
Definition: fwPaths.cc:13
static void param(double eta, double &p1, double &p2, double &p3)
const TString p1
Definition: fwPaths.cc:12
double L1MuonPixelTrackFitter::getBendingError ( double  invPt,
double  eta 
)
static

Definition at line 762 of file L1MuonPixelTrackFitter.cc.

References fireworks::p1, and sqr().

Referenced by L1MuonRegionProducer::regions().

762  {
763  int ieta = int(10 * fabs(eta));
764  double p0, p1;
765  switch (ieta) {
766  case 0: {
767  p0 = 0.0196835;
768  p1 = 0.00517533;
769  break;
770  }
771  case 1: {
772  p0 = 0.0266583;
773  p1 = 0.00478101;
774  break;
775  }
776  case 2: {
777  p0 = 0.0217164;
778  p1 = 0.00545425;
779  break;
780  }
781  case 3: {
782  p0 = 0.0197547;
783  p1 = 0.00552263;
784  break;
785  }
786  case 4: {
787  p0 = 0.0208778;
788  p1 = 0.00536009;
789  break;
790  }
791  case 5: {
792  p0 = 0.024192;
793  p1 = 0.00521709;
794  break;
795  }
796  case 6: {
797  p0 = 0.0265315;
798  p1 = 0.0051897;
799  break;
800  }
801  case 7: {
802  p0 = 0.0198071;
803  p1 = 0.00566822;
804  break;
805  }
806  case 8: {
807  p0 = 0.0361955;
808  p1 = 0.00486352;
809  break;
810  }
811  case 9: {
812  p0 = 0.037864;
813  p1 = 0.00509094;
814  break;
815  }
816  case 10: {
817  p0 = 0.0382968;
818  p1 = 0.00612354;
819  break;
820  }
821  case 11: {
822  p0 = 0.0308326;
823  p1 = 0.0074234;
824  break;
825  }
826  case 12: {
827  p0 = 0.0248577;
828  p1 = 0.00883049;
829  break;
830  }
831  case 13: {
832  p0 = 0.0279965;
833  p1 = 0.00888293;
834  break;
835  }
836  case 14: {
837  p0 = 0.0372582;
838  p1 = 0.00950252;
839  break;
840  }
841  case 15: {
842  p0 = 0.0281366;
843  p1 = 0.0111501;
844  break;
845  }
846  case 16: {
847  p0 = 0.0421483;
848  p1 = 0.0109413;
849  break;
850  }
851  case 17: {
852  p0 = 0.0461798;
853  p1 = 0.0125824;
854  break;
855  }
856  case 18: {
857  p0 = 0.0530603;
858  p1 = 0.0132638;
859  break;
860  }
861  case 19: {
862  p0 = 0.0601148;
863  p1 = 0.0147911;
864  break;
865  }
866  default: {
867  p0 = 0.0552377;
868  p1 = 0.0155574;
869  break;
870  }
871  }
872  return p0 + p1 * sqr(invPt);
873 }
int sqr(const T &t)
const TString p1
Definition: fwPaths.cc:12
void L1MuonPixelTrackFitter::param ( double  eta,
double &  p1,
double &  p2,
double &  p3 
)
staticprivate

Definition at line 875 of file L1MuonPixelTrackFitter.cc.

Referenced by getBending(), and valInversePt().

875  {
876  int ieta = int(10 * fabs(eta));
877  switch (ieta) {
878  case 0: {
879  p1 = -2.68016;
880  p2 = 0;
881  p3 = -12.9653;
882  break;
883  }
884  case 1: {
885  p1 = -2.67864;
886  p2 = 0;
887  p3 = -12.0036;
888  break;
889  }
890  case 2: {
891  p1 = -2.72997;
892  p2 = 0;
893  p3 = -10.3468;
894  break;
895  }
896  case 3: {
897  p1 = -2.68836;
898  p2 = 0;
899  p3 = -12.3369;
900  break;
901  }
902  case 4: {
903  p1 = -2.66885;
904  p2 = 0;
905  p3 = -11.589;
906  break;
907  }
908  case 5: {
909  p1 = -2.64932;
910  p2 = 0;
911  p3 = -12.7176;
912  break;
913  }
914  case 6: {
915  p1 = -2.64513;
916  p2 = 0;
917  p3 = -11.3912;
918  break;
919  }
920  case 7: {
921  p1 = -2.64487;
922  p2 = 0;
923  p3 = -9.83239;
924  break;
925  }
926  case 8: {
927  p1 = -2.58875;
928  p2 = 0;
929  p3 = -10.0541;
930  break;
931  }
932  case 9: {
933  p1 = -2.5551;
934  p2 = 0;
935  p3 = -9.75757;
936  break;
937  }
938  case 10: {
939  p1 = -2.55294;
940  p2 = 0;
941  p3 = -7.25238;
942  break;
943  }
944  case 11: {
945  p1 = -2.45333;
946  p2 = 0;
947  p3 = -7.966;
948  break;
949  }
950  case 12: {
951  p1 = -2.29283;
952  p2 = 0;
953  p3 = -7.03231;
954  break;
955  }
956  case 13: {
957  p1 = -2.13167;
958  p2 = 0;
959  p3 = -4.29182;
960  break;
961  }
962  case 14: {
963  p1 = -1.9102;
964  p2 = 0;
965  p3 = -3.21295;
966  break;
967  }
968  case 15: {
969  p1 = -1.74552;
970  p2 = 0;
971  p3 = -0.531827;
972  break;
973  }
974  case 16: {
975  p1 = -1.53642;
976  p2 = 0;
977  p3 = -1.74057;
978  break;
979  }
980  case 17: {
981  p1 = -1.39446;
982  p2 = 0;
983  p3 = -1.56819;
984  break;
985  }
986  case 18: {
987  p1 = -1.26176;
988  p2 = 0;
989  p3 = -0.598631;
990  break;
991  }
992  case 19: {
993  p1 = -1.14133;
994  p2 = 0;
995  p3 = -0.0941055;
996  break;
997  }
998  default: {
999  p1 = -1.02086;
1000  p2 = 0;
1001  p3 = -0.100491;
1002  break;
1003  }
1004  }
1005 }
const TString p2
Definition: fwPaths.cc:13
const TString p1
Definition: fwPaths.cc:12
reco::Track * L1MuonPixelTrackFitter::run ( const edm::EventSetup es,
const std::vector< const TrackingRecHit * > &  hits,
const TrackingRegion region 
) const
virtual

Definition at line 39 of file L1MuonPixelTrackFitter.cc.

References PixelTrackBuilder::build(), RecoTauCleanerPlugins::charge, HLT_FULL_cff::chi2, cotThetaErrorScale, PixelRecoUtilities::curvature(), errCotTheta(), errInversePt(), errPhi(), errTip(), errZip(), PVValHelper::eta, edm::EventSetup::get(), invPtErrorScale, phi, phiErrorScale, DiDispStaMuonMonitor_cfi::pt, theEtaL1, theHit1, theHit2, thePhiL1, HLT_FULL_cff::tip, tipErrorScale, valCotTheta(), valInversePt(), valPhi(), valTip(), valZip(), ComparisonHelper::zip(), and zipErrorScale.

41  {
43  es.get<IdealMagneticFieldRecord>().get(fieldESH);
44  const auto& field = *fieldESH;
45 
46  double phi_vtx_fromHits = (theHit2 - theHit1).phi();
47 
48  double invPt = valInversePt(phi_vtx_fromHits, thePhiL1, theEtaL1);
49  double invPtErr = errInversePt(invPt, theEtaL1);
50 
51  int charge = (invPt > 0.) ? 1 : -1;
52  double curvature = PixelRecoUtilities::curvature(invPt, field);
53 
54  Circle circle(theHit1, theHit2, curvature);
55 
56  double valPhi = this->valPhi(circle, charge);
57  double valTip = this->valTip(circle, curvature);
58  double valZip = this->valZip(curvature, theHit1, theHit2);
60 
61  // if ( (fabs(invPt)-0.1)/invPtErr > 3.) return 0;
62 
63  PixelTrackBuilder builder;
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;
68  double errCotTheta = this->errCotTheta(invPt, eta) * cotThetaErrorScale;
69  double errTip = this->errTip(invPt, eta) * tipErrorScale;
70  double errZip = this->errZip(invPt, eta) * zipErrorScale;
71 
72  Measurement1D pt(valPt, errPt);
73  Measurement1D phi(valPhi, errPhi);
74  Measurement1D cotTheta(valCotTheta, errCotTheta);
75  Measurement1D tip(valTip, errTip);
76  Measurement1D zip(valZip, errZip);
77 
78  float chi2 = 0.;
79 
80  /*
81  std::ostringstream str;
82  str <<"\t ipt: " << invPt <<"+/-"<<invPtErr
83  <<"\t pt: " << pt.value() <<"+/-"<<pt.error()
84  <<"\t phi: " << phi.value() <<"+/-"<<phi.error()
85  <<"\t cot: " << cotTheta.value() <<"+/-"<<cotTheta.error()
86  <<"\t tip: " << tip.value() <<"+/-"<<tip.error()
87  <<"\t zip: " << zip.value() <<"+/-"<<zip.error()
88  <<"\t charge: " << charge;
89  std::cout <<str.str()<< std::endl;
90 */
91 
92  return builder.build(pt, phi, cotTheta, tip, zip, chi2, charge, hits, &field);
93 }
double errZip(double invPt, double eta) const
double errTip(double invPt, double eta) const
double valTip(const Circle &c, double curvature) const
T curvature(T InversePt, const MagneticField &field)
double valPhi(const Circle &c, int charge) const
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
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
double valZip(double curvature, const GlobalPoint &p0, const GlobalPoint &p1) const
double valInversePt(double phi0, double phiL1, double eta) const
double errInversePt(double invPt, double eta) const
T get() const
Definition: EventSetup.h:82
double valCotTheta(const PixelRecoLineRZ &line) const
double errPhi(double invPt, double eta) const
double errCotTheta(double invPt, double eta) const
void L1MuonPixelTrackFitter::setL1Constraint ( const L1MuGMTCand muon)

Definition at line 28 of file L1MuonPixelTrackFitter.cc.

References L1MuGMTCand::charge(), L1MuGMTCand::etaValue(), L1MuGMTCand::phiValue(), theChargeL1, theEtaL1, and thePhiL1.

28  {
29  thePhiL1 = muon.phiValue() + 0.021817;
30  theEtaL1 = muon.etaValue();
31  theChargeL1 = muon.charge();
32 }
float etaValue() const
Definition: L1MuGMTCand.cc:102
float phiValue() const
Definition: L1MuGMTCand.cc:92
int charge() const
get charge (+1 -1)
Definition: L1MuGMTCand.h:132
void L1MuonPixelTrackFitter::setPxConstraint ( const SeedingHitSet hits)

Definition at line 34 of file L1MuonPixelTrackFitter.cc.

References theHit1.

34  {
35  theHit1 = hits[0]->globalPosition();
36  theHit1 = hits[1]->globalPosition();
37 }
double L1MuonPixelTrackFitter::valCotTheta ( const PixelRecoLineRZ line) const
private

Definition at line 220 of file L1MuonPixelTrackFitter.cc.

References PixelRecoLineRZ::cotLine().

Referenced by run().

220 { return line.cotLine(); }
float cotLine() const
double L1MuonPixelTrackFitter::valInversePt ( double  phi0,
double  phiL1,
double  eta 
) const
private

Definition at line 592 of file L1MuonPixelTrackFitter.cc.

References deltaPhi(), AlCaHLTBitMon_ParallelJobs::p, fireworks::p1, fireworks::p2, param(), funct::pow(), submitPVResolutionJobs::q, mps_fire::result, mathSSE::sqrt(), and findQualityFiles::v.

Referenced by run().

592  {
593  double result = 0.;
594 
595  // solve equtaion p3*result^3 + p1*result + dphi = 0;
596  // where: result = 1/pt
597  // dphi = phiL1 - phi0
598  // Cardan way is used
599 
600  double p1, p2, p3; //parameters p1,p3 are negative by parameter fix in fit!
601  param(eta, p1, p2, p3);
602 
603  double dphi = deltaPhi(phiL1, phi0); // phi0-phiL1
604  if (fabs(dphi) < 0.01) {
605  result = -dphi / p1;
606  } else {
607  double q = dphi / 2. / p3;
608  double p = p1 / 3. / p3; // positive
609  double D = q * q + p * p * p; // positive
610  double u = pow(-q + sqrt(D), 1. / 3.);
611  double v = -pow(q + sqrt(D), 1. / 3.);
612  result = u + v;
613  }
614  return result;
615 }
const TString p2
Definition: fwPaths.cc:13
tuple result
Definition: mps_fire.py:311
static void param(double eta, double &p1, double &p2, double &p3)
T sqrt(T t)
Definition: SSEVec.h:19
const TString p1
Definition: fwPaths.cc:12
double deltaPhi(double phi1, double phi2) const
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
double L1MuonPixelTrackFitter::valPhi ( const Circle c,
int  charge 
) const
private

Definition at line 95 of file L1MuonPixelTrackFitter.cc.

References L1MuonPixelTrackFitter::Circle::center(), Vector3DBase< T, FrameTag >::cross(), DeadROC_duringRun::dir, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), CosmicsPD_Skims::radius, and SiPixelPI::zero.

Referenced by run().

95  {
96  Circle::Point zero(0., 0., 0.);
97  Circle::Vector center = circle.center() - zero;
98  long double radius = center.perp();
99  center /= radius;
100  Circle::Vector dir = center.cross(-charge * Circle::Vector(0., 0., 1.));
101  return dir.phi();
102 }
Vector3DBase< long double, GlobalTag > Vector
Point3DBase< long double, GlobalTag > Point
double L1MuonPixelTrackFitter::valTip ( const Circle c,
double  curvature 
) const
private

Definition at line 338 of file L1MuonPixelTrackFitter.cc.

References L1MuonPixelTrackFitter::Circle::center(), PV3DBase< T, PVType, FrameType >::perp(), CosmicsPD_Skims::radius, and SiPixelPI::zero.

Referenced by run().

338  {
339  Circle::Point zero(0., 0., 0.);
340  Circle::Vector center = circle.center() - zero;
341  long double radius = center.perp();
342  return radius - 1. / fabs(curvature);
343 }
Vector3DBase< long double, GlobalTag > Vector
Point3DBase< long double, GlobalTag > Point
T curvature(T InversePt, const MagneticField &field)
double L1MuonPixelTrackFitter::valZip ( double  curvature,
const GlobalPoint p0,
const GlobalPoint p1 
) const
private

Definition at line 461 of file L1MuonPixelTrackFitter.cc.

References PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::perp2(), diffTwoXMLs::r1, diffTwoXMLs::r2, and PV3DBase< T, PVType, FrameType >::z().

Referenced by run().

461  {
462  //
463  // phi = asin(r*rho/2) with asin(x) ~= x+x**3/(2*3)
464  //
465  double rho3 = curv * curv * curv;
466  double r1 = pinner.perp();
467  double phi1 = r1 * curv / 2 + pinner.perp2() * r1 * rho3 / 48.;
468  double r2 = pouter.perp();
469  double phi2 = r2 * curv / 2 + pouter.perp2() * r2 * rho3 / 48.;
470  double z1 = pinner.z();
471  double z2 = pouter.z();
472 
473  return z1 - phi1 / (phi1 - phi2) * (z1 - z2);
474 }

Friends And Related Function Documentation

friend class L1Seeding
friend

Definition at line 106 of file L1MuonPixelTrackFitter.h.

Member Data Documentation

const double L1MuonPixelTrackFitter::cotThetaErrorScale
private

Definition at line 94 of file L1MuonPixelTrackFitter.h.

Referenced by L1MuonPixelTrackFitter(), and run().

const double L1MuonPixelTrackFitter::invPtErrorScale
private

Definition at line 92 of file L1MuonPixelTrackFitter.h.

Referenced by run().

const double L1MuonPixelTrackFitter::phiErrorScale
private

Definition at line 93 of file L1MuonPixelTrackFitter.h.

Referenced by L1MuonPixelTrackFitter(), and run().

int L1MuonPixelTrackFitter::theChargeL1
private

Definition at line 100 of file L1MuonPixelTrackFitter.h.

Referenced by setL1Constraint().

edm::ParameterSet L1MuonPixelTrackFitter::theConfig
private

Definition at line 90 of file L1MuonPixelTrackFitter.h.

Referenced by L1MuonPixelTrackFitter().

double L1MuonPixelTrackFitter::theEtaL1
private

Definition at line 99 of file L1MuonPixelTrackFitter.h.

Referenced by run(), and setL1Constraint().

GlobalPoint L1MuonPixelTrackFitter::theHit1
private

Definition at line 103 of file L1MuonPixelTrackFitter.h.

Referenced by run(), and setPxConstraint().

GlobalPoint L1MuonPixelTrackFitter::theHit2
private

Definition at line 103 of file L1MuonPixelTrackFitter.h.

Referenced by run().

double L1MuonPixelTrackFitter::thePhiL1
private

Definition at line 99 of file L1MuonPixelTrackFitter.h.

Referenced by run(), and setL1Constraint().

const double L1MuonPixelTrackFitter::tipErrorScale
private

Definition at line 95 of file L1MuonPixelTrackFitter.h.

Referenced by L1MuonPixelTrackFitter(), and run().

const double L1MuonPixelTrackFitter::zipErrorScale
private

Definition at line 96 of file L1MuonPixelTrackFitter.h.

Referenced by L1MuonPixelTrackFitter(), and run().