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