CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1MuKBMTrack.h
Go to the documentation of this file.
1 /*
2 Kalman Track class for
3 Kalman Muon Track Finder
4 Michalis Bachtis (UCLA)
5 Sep. 2017
6 */
7 
8 #ifndef L1MuKBMTrack_H
9 #define L1MuKBMTrack_H
10 
14 
16 typedef std::vector<L1MuKBMTrack> L1MuKBMTrackCollection;
18 
20 public:
21  L1MuKBMTrack();
22  ~L1MuKBMTrack() override;
23  L1MuKBMTrack(const L1MuKBMTCombinedStubRef&, int, int);
24 
25  //UnConstrained curvature at station 1
26  int curvatureAtMuon() const;
27  //unconstrained phi at station 1
28  int phiAtMuon() const;
29  //unconstrained phiB at station 1
30  int phiBAtMuon() const;
31  //Constrained curvature at vertex
32  int curvatureAtVertex() const;
33  //constrained phi at the vertex
34  int phiAtVertex() const;
35  //Impact parameter as calculated from the muon track
36  int dxy() const;
37  //Unconstrained curvature at the Muon systen
38  int curvature() const;
39  //Unconstrained phi at the Muon systen
40  int positionAngle() const;
41  //Unconstrained bending angle at the Muon systen
42  int bendingAngle() const;
43  //Coarse eta caluclated only using phi segments
44  int coarseEta() const;
45  //Approximate Chi2 metric
46  int approxChi2() const;
47  int trackCompatibility() const;
48 
49  //Approximate Chi2 metric
50  int hitPattern() const;
51  //step;
52  int step() const;
53  //sector;
54  int sector() const;
55  //wheel
56  int wheel() const;
57  //quality
58  int quality() const;
59 
60  //unconstrained pt
61  float ptUnconstrained() const;
62 
63  //fine eta
64  int fineEta() const;
65  bool hasFineEta() const;
66 
67  //BX
68  int bx() const;
69 
70  //rank
71  int rank() const;
72 
73  //Associated stubs
74  const L1MuKBMTCombinedStubRefVector& stubs() const;
75 
76  //get Kalman gain
77  const std::vector<float>& kalmanGain(unsigned int) const;
78 
79  //get covariance
80  const std::vector<double>& covariance() const;
81 
82  //get residual
83  int residual(uint) const;
84 
85  //check ogverlap
86  bool overlapTrack(const L1MuKBMTrack&) const;
87 
88  bool operator==(const L1MuKBMTrack& t2) const {
89  if (this->stubs().size() != t2.stubs().size())
90  return false;
91  for (unsigned int i = 0; i < this->stubs().size(); ++i) {
92  const L1MuKBMTCombinedStubRef& s1 = this->stubs()[i];
93  const L1MuKBMTCombinedStubRef& s2 = t2.stubs()[i];
94  if (s1->scNum() != s2->scNum() || s1->whNum() != s2->whNum() || s1->stNum() != s2->stNum() ||
95  s1->tag() != s2->tag())
96  return false;
97  }
98  return true;
99  }
100 
101  //Set coordinates general
102  void setCoordinates(int, int, int, int);
103 
104  //Set coordinates at vertex
105  void setCoordinatesAtVertex(int, int, int);
106 
107  //Set coordinates at muon
108  void setCoordinatesAtMuon(int, int, int);
109 
110  //Set eta coarse and pattern
111  void setCoarseEta(int);
112 
113  //Set phi hit pattern
114  void setHitPattern(int);
115 
116  //Set chi2 like metric
117  void setApproxChi2(int);
118  void setTrackCompatibility(int);
119 
120  //Set floating point coordinates for studies
121  void setPtEtaPhi(double, double, double);
122  void setPtUnconstrained(float);
123 
124  //Add a stub
125  void addStub(const L1MuKBMTCombinedStubRef&);
126 
127  //kalman gain management
128  void setKalmanGain(
129  unsigned int step, unsigned int K, float a1, float a2, float a3, float a4 = 0, float a5 = 0, float a6 = 0);
130 
131  //set covariance
132  void setCovariance(const CovarianceMatrix&);
133 
134  //set fine eta
135  void setFineEta(int);
136 
137  //set rank
138  void setRank(int);
139 
140  //set residual
141  void setResidual(uint, int);
142 
143 private:
144  //Covariance matrix for studies
145  std::vector<double> covariance_;
146 
148 
149  //vertex coordinates
152  int dxy_;
153 
154  //muon coordinates
156  int phiMuon_;
158 
159  //generic coordinates
160  int curv_;
161  int phi_;
162  int phiB_;
163  //common coordinates
165 
166  //Approximate Chi2 metric
169 
170  //phi bitmask
172 
173  //propagation step
174  int step_;
175 
176  //sector
177  int sector_;
178  //wheel
179  int wheel_;
180 
181  //quality
182  int quality_;
183 
184  //Fine eta
185  int fineEta_;
186 
187  //has fine eta?
189 
190  //BX
191  int bx_;
192 
193  //rank
194  int rank_;
195 
196  //Unconstrained floating point pt
198 
199  //Kalman Gain for making LUTs
200  std::vector<float> kalmanGain0_;
201  std::vector<float> kalmanGain1_;
202  std::vector<float> kalmanGain2_;
203  std::vector<float> kalmanGain3_;
204 
205  std::vector<int> residuals_;
206 };
207 
208 #endif
float ptUnconstrained_
Definition: L1MuKBMTrack.h:197
int fineEta() const
Definition: L1MuKBMTrack.cc:68
void setCoordinatesAtVertex(int, int, int)
Definition: L1MuKBMTrack.cc:87
int residual(uint) const
Definition: L1MuKBMTrack.cc:78
int trackCompatibility_
Definition: L1MuKBMTrack.h:168
bool operator==(const L1MuKBMTrack &t2) const
Definition: L1MuKBMTrack.h:88
int step() const
Definition: L1MuKBMTrack.cc:60
int bendingAngle() const
Definition: L1MuKBMTrack.cc:51
float ptUnconstrained() const
Definition: L1MuKBMTrack.cc:66
int coarseEta() const
Definition: L1MuKBMTrack.cc:53
std::vector< float > kalmanGain0_
Definition: L1MuKBMTrack.h:200
void setTrackCompatibility(int)
std::vector< float > kalmanGain1_
Definition: L1MuKBMTrack.h:201
void setCoordinatesAtMuon(int, int, int)
Definition: L1MuKBMTrack.cc:93
int phiAtVertex() const
Definition: L1MuKBMTrack.cc:43
void setPtUnconstrained(float)
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
std::vector< float > kalmanGain3_
Definition: L1MuKBMTrack.h:203
void setHitPattern(int)
void setRank(int)
void setPtEtaPhi(double, double, double)
int phiBAtMuon() const
Definition: L1MuKBMTrack.cc:39
std::vector< int > residuals_
Definition: L1MuKBMTrack.h:205
int curvatureAtMuon() const
Definition: L1MuKBMTrack.cc:37
bool hasFineEta() const
Definition: L1MuKBMTrack.cc:70
void setCoordinates(int, int, int, int)
Definition: L1MuKBMTrack.cc:80
const std::vector< float > & kalmanGain(unsigned int) const
int approxChi2() const
Definition: L1MuKBMTrack.cc:55
int trackCompatibility() const
Definition: L1MuKBMTrack.cc:56
void setCovariance(const CovarianceMatrix &)
void setCoarseEta(int)
Definition: L1MuKBMTrack.cc:99
BXVector< L1MuKBMTrack > L1MuKBMTrackBxCollection
Definition: L1MuKBMTrack.h:17
void setFineEta(int)
const L1MuKBMTCombinedStubRefVector & stubs() const
Definition: L1MuKBMTrack.cc:76
std::vector< float > kalmanGain2_
Definition: L1MuKBMTrack.h:202
int curvature() const
Definition: L1MuKBMTrack.cc:47
int phiAtMuon() const
Definition: L1MuKBMTrack.cc:38
int wheel() const
Definition: L1MuKBMTrack.cc:62
const std::vector< double > & covariance() const
int dxy() const
Definition: L1MuKBMTrack.cc:45
int curvatureAtVertex() const
Definition: L1MuKBMTrack.cc:41
int bx() const
Definition: L1MuKBMTrack.cc:72
void setKalmanGain(unsigned int step, unsigned int K, float a1, float a2, float a3, float a4=0, float a5=0, float a6=0)
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:15
std::vector< double > covariance_
Definition: L1MuKBMTrack.h:145
int sector() const
Definition: L1MuKBMTrack.cc:61
L1MuKBMTCombinedStubRefVector stubs_
Definition: L1MuKBMTrack.h:147
void addStub(const L1MuKBMTCombinedStubRef &)
int hitPattern() const
Definition: L1MuKBMTrack.cc:58
void setResidual(uint, int)
int rank() const
Definition: L1MuKBMTrack.cc:74
int quality() const
Definition: L1MuKBMTrack.cc:64
int positionAngle() const
Definition: L1MuKBMTrack.cc:49
~L1MuKBMTrack() override
Definition: L1MuKBMTrack.cc:5
void setApproxChi2(int)
bool overlapTrack(const L1MuKBMTrack &) const