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  //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 
68  //BX
69  int bx() const;
70 
71  //rank
72  int rank() const;
73 
74  //Associated stubs
75  const L1MuKBMTCombinedStubRefVector& stubs() const;
76 
77  //get Kalman gain
78  const std::vector<float>& kalmanGain(unsigned int) const;
79 
80  //get covariance
81  const std::vector<double>& covariance() const;
82 
83 
84  //get residual
85  int residual(uint) const;
86 
87  //check ogverlap
88  bool overlapTrack(const L1MuKBMTrack&) const;
89 
90  bool operator==(const L1MuKBMTrack& t2) const{
91  if (this->stubs().size()!=t2.stubs().size())
92  return false;
93  for (unsigned int i=0;i<this->stubs().size();++i) {
94  const L1MuKBMTCombinedStubRef& s1 = this->stubs()[i];
95  const L1MuKBMTCombinedStubRef& s2 = t2.stubs()[i];
96  if (s1->scNum()!= s2->scNum() ||
97  s1->whNum()!=s2->whNum() ||
98  s1->stNum()!=s2->stNum() ||
99  s1->tag()!=s2->tag())
100  return false;
101  }
102  return true;
103  }
104 
105 
106 
107  //Set coordinates general
108  void setCoordinates(int,int,int,int );
109 
110  //Set coordinates at vertex
111  void setCoordinatesAtVertex(int,int,int );
112 
113  //Set coordinates at muon
114  void setCoordinatesAtMuon(int,int,int );
115 
116  //Set eta coarse and pattern
117  void setCoarseEta(int);
118 
119  //Set phi hit pattern
120  void setHitPattern(int);
121 
122  //Set chi2 like metric
123  void setApproxChi2(int);
124 
125  //Set floating point coordinates for studies
126  void setPtEtaPhi(double,double,double);
127  void setPtUnconstrained(float);
128 
129  //Add a stub
130  void addStub(const L1MuKBMTCombinedStubRef&);
131 
132  //kalman gain management
133  void setKalmanGain(unsigned int step, unsigned int K,float a1 ,float a2,float a3,float a4=0 ,float a5=0,float a6=0);
134 
135  //set covariance
136  void setCovariance(const CovarianceMatrix&);
137 
138  //set fine eta
139  void setFineEta(int);
140 
141  //set rank
142  void setRank(int);
143 
144  //set residual
145  void setResidual(uint,int);
146 
147 
148  private:
149 
150  //Covariance matrix for studies
151  std::vector<double> covariance_;
152 
154 
155  //vertex coordinates
158  int dxy_;
159 
160  //muon coordinates
162  int phiMuon_;
164 
165 
166  //generic coordinates
167  int curv_;
168  int phi_;
169  int phiB_;
170  //common coordinates
172 
173  //Approximate Chi2 metric
175 
176  //phi bitmask
178 
179  //propagation step
180  int step_;
181 
182  //sector
183  int sector_;
184  //wheel
185  int wheel_;
186 
187  //quality
188  int quality_;
189 
190  //Fine eta
191  int fineEta_;
192 
193  //has fine eta?
195 
196  //BX
197  int bx_;
198 
199  //rank
200  int rank_;
201 
202 
203  //Unconstrained floating point pt
205 
206  //Kalman Gain for making LUTs
207  std::vector<float> kalmanGain0_;
208  std::vector<float> kalmanGain1_;
209  std::vector<float> kalmanGain2_;
210  std::vector<float> kalmanGain3_;
211 
212 
213  std::vector<int> residuals_;
214 
215 
216 };
217 
218 #endif
float ptUnconstrained_
Definition: L1MuKBMTrack.h:204
int fineEta() const
void setCoordinatesAtVertex(int, int, int)
int residual(uint) const
bool operator==(const L1MuKBMTrack &t2) const
Definition: L1MuKBMTrack.h:90
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:207
std::vector< float > kalmanGain1_
Definition: L1MuKBMTrack.h:208
void setCoordinatesAtMuon(int, int, int)
int phiAtVertex() const
Definition: L1MuKBMTrack.cc:58
void setPtUnconstrained(float)
std::vector< float > kalmanGain3_
Definition: L1MuKBMTrack.h:210
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:213
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)
BXVector< L1MuKBMTrack > L1MuKBMTrackBxCollection
Definition: L1MuKBMTrack.h:17
void setFineEta(int)
const L1MuKBMTCombinedStubRefVector & stubs() const
std::vector< float > kalmanGain2_
Definition: L1MuKBMTrack.h:209
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:15
std::vector< double > covariance_
Definition: L1MuKBMTrack.h:151
int sector() const
Definition: L1MuKBMTrack.cc:93
L1MuKBMTCombinedStubRefVector stubs_
Definition: L1MuKBMTrack.h:153
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