CMS 3D CMS Logo

L1MuKBMTrack.cc
Go to the documentation of this file.
2 
4  reco::LeafCandidate(-1,reco::LeafCandidate::PolarLorentzVector(0.1,0.0,0.0,0.105))
5 {
6 }
7 
9 
10 }
11 
13  reco::LeafCandidate(-1,reco::LeafCandidate::PolarLorentzVector(0.1,0.0,0.0,0.105)),
14  covariance_(std::vector<double>(6,0.0)),
15  curvVertex_(0),
16  phiVertex_(0),
17  dxy_(0),
18  curvMuon_(0),
19  phiMuon_(0),
20  phiBMuon_(0),
21  curv_(0),
22  phi_(phi),
23  phiB_(phiB),
24  coarseEta_(0),
25  approxChi2_(0),
26  hitPattern_(0),
27  step_(seed->stNum()),
28  sector_(seed->scNum()),
29  wheel_(seed->whNum()),
30  quality_(seed->quality()),
32  bx_(seed->bxNum()),
33  rank_(seed->bxNum()),
34  ptUnconstrained_(0.0)
35 {
36  stubs_.push_back(seed);
37  residuals_.push_back(0);
38  residuals_.push_back(0);
39  residuals_.push_back(0);
40 
41 }
42 
43 
45  return curvMuon_;
46 }
48  return phiMuon_;
49 }
51  return phiBMuon_;
52 }
53 
55  return curvVertex_;
56 }
57 
59  return phiVertex_;
60 }
61 
62 int L1MuKBMTrack::dxy() const{
63  return dxy_;
64 }
65 
67  return curv_;
68 }
69 
71  return phi_;
72 }
73 
75  return phiB_;
76 }
77 
79  return coarseEta_;
80 }
81 
83  return approxChi2_;
84 }
85 
87  return hitPattern_;
88 }
89 
90 int L1MuKBMTrack::step() const{
91  return step_;
92 }
94  return sector_;
95 }
96 int L1MuKBMTrack::wheel() const{
97  return wheel_;
98 }
99 
101  return quality_;
102 }
103 
105  return ptUnconstrained_;
106 }
107 
109  return fineEta_;
110 }
111 
113  return hasFineEta_;
114 }
115 
116 int L1MuKBMTrack::bx() const{
117  return bx_;
118 }
119 
120 int L1MuKBMTrack::rank() const{
121  return rank_;
122 }
123 
124 
125 
127  return stubs_;
128 }
129 
131  return residuals_[i];
132 }
133 
134 
135 
136 void L1MuKBMTrack::setCoordinates(int step,int curv,int phi,int phiB) {
137  step_=step;
138  curv_ = curv;
139  phiB_=phiB;
140  phi_=phi;
141 
142 }
143 
145  curvVertex_ = curv;
146  phiVertex_ = phi;
147  dxy_ = dxy;
148 }
149 
150 void L1MuKBMTrack::setCoordinatesAtMuon(int curv,int phi,int phiB) {
151  curvMuon_ = curv;
152  phiMuon_ = phi;
153  phiBMuon_ = phiB;
154 }
155 
156 
158  coarseEta_ = eta;
159 }
160 
163 }
164 
166  approxChi2_ = chi;
167 }
168 
169 void L1MuKBMTrack::setPtEtaPhi(double pt ,double eta, double phi) {
170  PolarLorentzVector v(pt,eta,phi,0.105);
171  setP4(v);
172 }
175 }
176 
178  if (stub->quality()<quality_)
179  quality_ = stub->quality();
180  stubs_.push_back(stub);
181 
182 
183 }
184 
186  fineEta_ = eta;
187  hasFineEta_=true;
188 }
189 
191  rank_ = rank;
192 }
193 
194 
195 void L1MuKBMTrack::setKalmanGain(unsigned int step,unsigned int K,float a1, float a2,float a3,float a4,float a5,float a6) {
196  switch(step) {
197  case 3:
198  kalmanGain3_.push_back(K);
199  kalmanGain3_.push_back(a1);
200  kalmanGain3_.push_back(a2);
201  kalmanGain3_.push_back(a3);
202  kalmanGain3_.push_back(a4);
203  kalmanGain3_.push_back(a5);
204  kalmanGain3_.push_back(a6);
205  break;
206  case 2:
207  kalmanGain2_.push_back(K);
208  kalmanGain2_.push_back(a1);
209  kalmanGain2_.push_back(a2);
210  kalmanGain2_.push_back(a3);
211  kalmanGain2_.push_back(a4);
212  kalmanGain2_.push_back(a5);
213  kalmanGain2_.push_back(a6);
214  break;
215  case 1:
216  kalmanGain1_.push_back(K);
217  kalmanGain1_.push_back(a1);
218  kalmanGain1_.push_back(a2);
219  kalmanGain1_.push_back(a3);
220  kalmanGain1_.push_back(a4);
221  kalmanGain1_.push_back(a5);
222  kalmanGain1_.push_back(a6);
223  break;
224  case 0:
225  kalmanGain0_.push_back(K);
226  kalmanGain0_.push_back(a1);
227  kalmanGain0_.push_back(a2);
228  kalmanGain0_.push_back(a3);
229  break;
230 
231  default:
232  printf("Critical ERROR on setting the Klamn gain\n");
233  }
234 }
235 
236 
238  residuals_[i]=val;
239 }
240 
241 
242 const std::vector<float>& L1MuKBMTrack::kalmanGain(unsigned int step) const{
243  switch(step) {
244  case 3:
245  return kalmanGain3_;
246  case 2:
247  return kalmanGain2_;
248  case 1:
249  return kalmanGain1_;
250  case 0:
251  return kalmanGain0_;
252  }
253  return kalmanGain0_;
254 }
255 
256 const std::vector<double>& L1MuKBMTrack::covariance() const {
257  return covariance_;
258 }
259 
260 
261 
263 
264  for (const auto& s1 : stubs_) {
265  for (const auto& s2 : other.stubs()) {
266  if (s1->scNum()== s2->scNum() &&
267  s1->whNum()==s2->whNum() &&
268  s1->stNum()==s2->stNum() &&
269  s1->tag()==s2->tag())
270  return true;
271  }
272  }
273  return false;
274 }
275 
276 
277 
279  covariance_[0] = c(0,0);
280  covariance_[1] = c(0,1);
281  covariance_[2] = c(1,1);
282  covariance_[3] = c(0,2);
283  covariance_[4] = c(1,2);
284  covariance_[5] = c(2,2);
285 }
286 
float ptUnconstrained_
Definition: L1MuKBMTrack.h:202
int fineEta() const
double eta() const final
momentum pseudorapidity
void setCoordinatesAtVertex(int, int, int)
int residual(uint) const
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
double pt() const final
transverse momentum
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
fixed size matrix
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< double > covariance_
Definition: L1MuKBMTrack.h:149
int sector() const
Definition: L1MuKBMTrack.cc:93
L1MuKBMTCombinedStubRefVector stubs_
Definition: L1MuKBMTrack.h:151
void addStub(const L1MuKBMTCombinedStubRef &)
step
int hitPattern() const
Definition: L1MuKBMTrack.cc:86
void setResidual(uint, int)
int rank() const
int quality() const
double phi() const final
momentum azimuthal angle
int positionAngle() const
Definition: L1MuKBMTrack.cc:70
void setP4(const LorentzVector &p4) final
set 4-momentum
~L1MuKBMTrack() override
Definition: L1MuKBMTrack.cc:8
void setApproxChi2(int)
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:39
bool overlapTrack(const L1MuKBMTrack &) const