CMS 3D CMS Logo

L1MuonPixelTrackFitter.h
Go to the documentation of this file.
1 #ifndef RecoMuon_TrackerSeedGenerator_L1MuonPixelTrackFitter_H
2 #define RecoMuon_TrackerSeedGenerator_L1MuonPixelTrackFitter_H
3 
5 
11 
12 #include <vector>
13 
14 namespace edm {class EventSetup;}
15 namespace reco { class Track;}
16 
17 class TrackingRegion;
18 class TrackingRecHit;
19 class L1MuGMTCand;
20 class PixelRecoLineRZ;
21 class SeedingHitSet;
22 
24 
25 public:
26  class Circle {
27  public:
30  Circle() : theValid(false) {}
31  Circle(const GlobalPoint& h1, const GlobalPoint& h2, double curvature):theCurvature(curvature){
32  Point p1(h1); Point p2(h2); Vector dp = (p2-p1)/2.; int charge = theCurvature > 0 ? 1 : -1;
33  Vector ec = charge * dp.cross(Vector(0,0,1)).unit();
34  long double dist_tmp = 1./theCurvature/theCurvature - dp.perp2();
35  theValid = (dist_tmp > 0.);
36  theCenter = p1+dp + ec*sqrt( std::abs(dist_tmp ) );
37  }
38  bool isValid() const { return theValid; }
39  const Point & center() const { return theCenter; }
40  const long double & curvature() const { return theCurvature; }
41  private:
42  bool theValid;
43  long double theCurvature;
44  Point theCenter;
45  };
46 
47 public:
48 
50 
52 
53  void setL1Constraint(const L1MuGMTCand& muon);
54  void setPxConstraint(const SeedingHitSet & hits);
55 
56  virtual reco::Track* run(
57  const edm::EventSetup& es,
58  const std::vector<const TrackingRecHit *>& hits,
59  const TrackingRegion& region) const;
60 
61  static double getBending( double invPt, double eta, int charge);
62  static double getBendingError(double invPt, double eta);
63 private:
64 
65  double valInversePt( double phi0, double phiL1, double eta) const;
66  double errInversePt(double invPt, double eta) const;
67 
68  double valPhi(const Circle &c, int charge) const;
69  double errPhi(double invPt, double eta) const;
70 
71  double valCotTheta(const PixelRecoLineRZ& line) const;
72  double errCotTheta(double invPt, double eta) const;
73 
74  double valZip(double curvature, const GlobalPoint& p0, const GlobalPoint& p1) const;
75  double errZip(double invPt, double eta) const;
76 
77  double valTip(const Circle &c, double curvature) const;
78  double errTip(double invPt, double eta) const;
79 
80  double findPt(double phi0, double phiL1, double eta, int charge) const;
81  double deltaPhi( double phi1, double phi2) const;
82  static void param( double eta, double &p1, double& p2, double& p3);
83 
84 
85 private:
86 
88 
89  const double invPtErrorScale;
90  const double phiErrorScale;
91  const double cotThetaErrorScale;
92  const double tipErrorScale;
93  const double zipErrorScale;
94 
95 
96  // L1 constraint
97  double thePhiL1, theEtaL1; int theChargeL1;
98 
99  // Px constraint
101 
102 private:
103  friend class L1Seeding;
104 };
105 #endif
Vector3DBase< long double, GlobalTag > Vector
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
T perp2() const
Definition: PV3DBase.h:71
Point3DBase< long double, GlobalTag > Point
T curvature(T InversePt, const edm::EventSetup &iSetup)
T sqrt(T t)
Definition: SSEVec.h:18
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:119
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double p2[4]
Definition: TauolaWrapper.h:90
const long double & curvature() const
auto dp
Definition: deltaR.h:22
fixed size matrix
HLT enums.
double p1[4]
Definition: TauolaWrapper.h:89
Circle(const GlobalPoint &h1, const GlobalPoint &h2, double curvature)
double p3[4]
Definition: TauolaWrapper.h:91