CMS 3D CMS Logo

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
150  int curvVertex_ = 0;
151  int phiVertex_ = 0;
152  int dxy_ = 0;
153 
154  //muon coordinates
155  int curvMuon_ = 0;
156  int phiMuon_ = 0;
157  int phiBMuon_ = 0;
158 
159  //generic coordinates
160  int curv_ = 0;
161  int phi_ = 0;
162  int phiB_ = 0;
163  //common coordinates
164  int coarseEta_ = 0;
165 
166  //Approximate Chi2 metric
167  int approxChi2_ = 0;
169 
170  //phi bitmask
171  int hitPattern_ = 0;
172 
173  //propagation step
174  int step_ = 0;
175 
176  //sector
177  int sector_ = 0;
178  //wheel
179  int wheel_ = 0;
180 
181  //quality
182  int quality_ = 0;
183 
184  //Fine eta
185  int fineEta_ = 0;
186 
187  //has fine eta?
188  bool hasFineEta_ = false;
189 
190  //BX
191  int bx_ = 0;
192 
193  //rank
194  int rank_ = 0;
195 
196  //Unconstrained floating point pt
197  float ptUnconstrained_ = 0;
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 positionAngle() const
Definition: L1MuKBMTrack.cc:36
int bx() const
Definition: L1MuKBMTrack.cc:59
const std::vector< float > & kalmanGain(unsigned int) const
void setCoordinatesAtVertex(int, int, int)
Definition: L1MuKBMTrack.cc:74
int trackCompatibility_
Definition: L1MuKBMTrack.h:168
int curvature() const
Definition: L1MuKBMTrack.cc:34
int step() const
Definition: L1MuKBMTrack.cc:47
std::vector< float > kalmanGain0_
Definition: L1MuKBMTrack.h:200
void setTrackCompatibility(int)
Definition: L1MuKBMTrack.cc:91
float ptUnconstrained() const
Definition: L1MuKBMTrack.cc:53
int phiAtVertex() const
Definition: L1MuKBMTrack.cc:30
int sector() const
Definition: L1MuKBMTrack.cc:48
std::vector< float > kalmanGain1_
Definition: L1MuKBMTrack.h:201
void setCoordinatesAtMuon(int, int, int)
Definition: L1MuKBMTrack.cc:80
void setPtUnconstrained(float)
Definition: L1MuKBMTrack.cc:97
int fineEta() const
Definition: L1MuKBMTrack.cc:55
int dxy() const
Definition: L1MuKBMTrack.cc:32
int rank() const
Definition: L1MuKBMTrack.cc:61
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
std::vector< float > kalmanGain3_
Definition: L1MuKBMTrack.h:203
void setHitPattern(int)
Definition: L1MuKBMTrack.cc:88
int wheel() const
Definition: L1MuKBMTrack.cc:49
void setRank(int)
void setPtEtaPhi(double, double, double)
Definition: L1MuKBMTrack.cc:93
const std::vector< double > & covariance() const
int hitPattern() const
Definition: L1MuKBMTrack.cc:45
std::vector< int > residuals_
Definition: L1MuKBMTrack.h:205
int bendingAngle() const
Definition: L1MuKBMTrack.cc:38
int phiAtMuon() const
Definition: L1MuKBMTrack.cc:25
void setCoordinates(int, int, int, int)
Definition: L1MuKBMTrack.cc:67
void setCovariance(const CovarianceMatrix &)
void setCoarseEta(int)
Definition: L1MuKBMTrack.cc:86
int trackCompatibility() const
Definition: L1MuKBMTrack.cc:43
BXVector< L1MuKBMTrack > L1MuKBMTrackBxCollection
Definition: L1MuKBMTrack.h:17
bool overlapTrack(const L1MuKBMTrack &) const
void setFineEta(int)
std::vector< float > kalmanGain2_
Definition: L1MuKBMTrack.h:202
int approxChi2() const
Definition: L1MuKBMTrack.cc:42
int coarseEta() const
Definition: L1MuKBMTrack.cc:40
int residual(uint) const
Definition: L1MuKBMTrack.cc:65
int curvatureAtMuon() const
Definition: L1MuKBMTrack.cc:24
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 phiBAtMuon() const
Definition: L1MuKBMTrack.cc:26
L1MuKBMTCombinedStubRefVector stubs_
Definition: L1MuKBMTrack.h:147
void addStub(const L1MuKBMTCombinedStubRef &)
Definition: L1MuKBMTrack.cc:99
step
Definition: StallMonitor.cc:98
const L1MuKBMTCombinedStubRefVector & stubs() const
Definition: L1MuKBMTrack.cc:63
bool hasFineEta() const
Definition: L1MuKBMTrack.cc:57
void setResidual(uint, int)
bool operator==(const L1MuKBMTrack &t2) const
Definition: L1MuKBMTrack.h:88
~L1MuKBMTrack() override
Definition: L1MuKBMTrack.cc:5
void setApproxChi2(int)
Definition: L1MuKBMTrack.cc:90
int curvatureAtVertex() const
Definition: L1MuKBMTrack.cc:28
int quality() const
Definition: L1MuKBMTrack.cc:51