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 
13 
15 typedef std::vector<L1MuKBMTrack> L1MuKBMTrackCollection;
16 
18 {
19 
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  //Approximate Chi2 metric
48  int hitPattern() const;
49  //step;
50  int step() const;
51  //sector;
52  int sector() const;
53  //wheel
54  int wheel() const;
55  //quality
56  int quality() const;
57 
58  //unconstrained pt
59  float ptUnconstrained() const;
60 
61  //fine eta
62  int fineEta() const;
63  bool hasFineEta() const;
64 
65 
66  //BX
67  int bx() const;
68 
69  //rank
70  int rank() const;
71 
72  //Associated stubs
73  const L1MuKBMTCombinedStubRefVector& stubs() const;
74 
75  //get Kalman gain
76  const std::vector<float>& kalmanGain(unsigned int) const;
77 
78  //get covariance
79  const std::vector<double>& covariance() const;
80 
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() ||
95  s1->whNum()!=s2->whNum() ||
96  s1->stNum()!=s2->stNum() ||
97  s1->tag()!=s2->tag())
98  return false;
99  }
100  return true;
101  }
102 
103 
104 
105  //Set coordinates general
106  void setCoordinates(int,int,int,int );
107 
108  //Set coordinates at vertex
109  void setCoordinatesAtVertex(int,int,int );
110 
111  //Set coordinates at muon
112  void setCoordinatesAtMuon(int,int,int );
113 
114  //Set eta coarse and pattern
115  void setCoarseEta(int);
116 
117  //Set phi hit pattern
118  void setHitPattern(int);
119 
120  //Set chi2 like metric
121  void setApproxChi2(int);
122 
123  //Set floating point coordinates for studies
124  void setPtEtaPhi(double,double,double);
125  void setPtUnconstrained(float);
126 
127  //Add a stub
128  void addStub(const L1MuKBMTCombinedStubRef&);
129 
130  //kalman gain management
131  void setKalmanGain(unsigned int step, unsigned int K,float a1 ,float a2,float a3,float a4=0 ,float a5=0,float a6=0);
132 
133  //set covariance
134  void setCovariance(const CovarianceMatrix&);
135 
136  //set fine eta
137  void setFineEta(int);
138 
139  //set rank
140  void setRank(int);
141 
142  //set residual
143  void setResidual(uint,int);
144 
145 
146  private:
147 
148  //Covariance matrix for studies
149  std::vector<double> covariance_;
150 
152 
153  //vertex coordinates
156  int dxy_;
157 
158  //muon coordinates
160  int phiMuon_;
162 
163 
164  //generic coordinates
165  int curv_;
166  int phi_;
167  int phiB_;
168  //common coordinates
170 
171  //Approximate Chi2 metric
173 
174  //phi bitmask
176 
177  //propagation step
178  int step_;
179 
180  //sector
181  int sector_;
182  //wheel
183  int wheel_;
184 
185  //quality
186  int quality_;
187 
188  //Fine eta
189  int fineEta_;
190 
191  //has fine eta?
193 
194  //BX
195  int bx_;
196 
197  //rank
198  int rank_;
199 
200 
201  //Unconstrained floating point pt
203 
204  //Kalman Gain for making LUTs
205  std::vector<float> kalmanGain0_;
206  std::vector<float> kalmanGain1_;
207  std::vector<float> kalmanGain2_;
208  std::vector<float> kalmanGain3_;
209 
210 
211  std::vector<int> residuals_;
212 
213 
214 };
215 
216 #endif
float ptUnconstrained_
Definition: L1MuKBMTrack.h:202
int fineEta() const
void setCoordinatesAtVertex(int, int, int)
int residual(uint) const
bool operator==(const L1MuKBMTrack &t2) const
Definition: L1MuKBMTrack.h:88
int step() const
Definition: L1MuKBMTrack.cc:90
int bendingAngle() const
Definition: L1MuKBMTrack.cc:74
float ptUnconstrained() const
int coarseEta() const
Definition: L1MuKBMTrack.cc:78
std::vector< float > kalmanGain0_
Definition: L1MuKBMTrack.h:205
std::vector< float > kalmanGain1_
Definition: L1MuKBMTrack.h:206
void setCoordinatesAtMuon(int, int, int)
int phiAtVertex() const
Definition: L1MuKBMTrack.cc:58
void setPtUnconstrained(float)
std::vector< float > kalmanGain3_
Definition: L1MuKBMTrack.h:208
void setHitPattern(int)
void setRank(int)
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
void setPtEtaPhi(double, double, double)
int phiBAtMuon() const
Definition: L1MuKBMTrack.cc:50
std::vector< int > residuals_
Definition: L1MuKBMTrack.h:211
int curvatureAtMuon() const
Definition: L1MuKBMTrack.cc:44
bool hasFineEta() const
void setCoordinates(int, int, int, int)
const std::vector< float > & kalmanGain(unsigned int) const
int approxChi2() const
Definition: L1MuKBMTrack.cc:82
void setCovariance(const CovarianceMatrix &)
void setCoarseEta(int)
void setFineEta(int)
const L1MuKBMTCombinedStubRefVector & stubs() const
std::vector< float > kalmanGain2_
Definition: L1MuKBMTrack.h:207
int curvature() const
Definition: L1MuKBMTrack.cc:66
int phiAtMuon() const
Definition: L1MuKBMTrack.cc:47
int wheel() const
Definition: L1MuKBMTrack.cc:96
const std::vector< double > & covariance() const
int dxy() const
Definition: L1MuKBMTrack.cc:62
def uint(string)
int curvatureAtVertex() const
Definition: L1MuKBMTrack.cc:54
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:14
std::vector< double > covariance_
Definition: L1MuKBMTrack.h:149
int sector() const
Definition: L1MuKBMTrack.cc:93
L1MuKBMTCombinedStubRefVector stubs_
Definition: L1MuKBMTrack.h:151
void addStub(const L1MuKBMTCombinedStubRef &)
int hitPattern() const
Definition: L1MuKBMTrack.cc:86
void setResidual(uint, int)
int rank() const
int quality() const
int positionAngle() const
Definition: L1MuKBMTrack.cc:70
~L1MuKBMTrack() override
Definition: L1MuKBMTrack.cc:8
void setApproxChi2(int)
bool overlapTrack(const L1MuKBMTrack &) const