CMS 3D CMS Logo

L1MuKBMTrack.cc
Go to the documentation of this file.
2 
3 L1MuKBMTrack::L1MuKBMTrack() : reco::LeafCandidate(-1, reco::LeafCandidate::PolarLorentzVector(0.1, 0.0, 0.0, 0.105)) {}
4 
6 
8  : reco::LeafCandidate(-1, reco::LeafCandidate::PolarLorentzVector(0.1, 0.0, 0.0, 0.105)),
9  covariance_(std::vector<double>(6, 0.0)),
10  curvVertex_(0),
11  phiVertex_(0),
12  dxy_(0),
13  curvMuon_(0),
14  phiMuon_(0),
15  phiBMuon_(0),
16  curv_(0),
17  phi_(phi),
18  phiB_(phiB),
19  coarseEta_(0),
20  approxChi2_(0),
21  trackCompatibility_(0),
22  hitPattern_(0),
23  step_(seed->stNum()),
24  sector_(seed->scNum()),
25  wheel_(seed->whNum()),
26  quality_(seed->quality()),
27  hasFineEta_(false),
28  bx_(seed->bxNum()),
29  rank_(seed->bxNum()),
30  ptUnconstrained_(0.0) {
31  stubs_.push_back(seed);
32  residuals_.push_back(0);
33  residuals_.push_back(0);
34  residuals_.push_back(0);
35 }
36 
38 int L1MuKBMTrack::phiAtMuon() const { return phiMuon_; }
39 int L1MuKBMTrack::phiBAtMuon() const { return phiBMuon_; }
40 
42 
43 int L1MuKBMTrack::phiAtVertex() const { return phiVertex_; }
44 
45 int L1MuKBMTrack::dxy() const { return dxy_; }
46 
47 int L1MuKBMTrack::curvature() const { return curv_; }
48 
49 int L1MuKBMTrack::positionAngle() const { return phi_; }
50 
51 int L1MuKBMTrack::bendingAngle() const { return phiB_; }
52 
53 int L1MuKBMTrack::coarseEta() const { return coarseEta_; }
54 
55 int L1MuKBMTrack::approxChi2() const { return approxChi2_; }
57 
58 int L1MuKBMTrack::hitPattern() const { return hitPattern_; }
59 
60 int L1MuKBMTrack::step() const { return step_; }
61 int L1MuKBMTrack::sector() const { return sector_; }
62 int L1MuKBMTrack::wheel() const { return wheel_; }
63 
64 int L1MuKBMTrack::quality() const { return quality_; }
65 
67 
68 int L1MuKBMTrack::fineEta() const { return fineEta_; }
69 
70 bool L1MuKBMTrack::hasFineEta() const { return hasFineEta_; }
71 
72 int L1MuKBMTrack::bx() const { return bx_; }
73 
74 int L1MuKBMTrack::rank() const { return rank_; }
75 
77 
78 int L1MuKBMTrack::residual(uint i) const { return residuals_[i]; }
79 
80 void L1MuKBMTrack::setCoordinates(int step, int curv, int phi, int phiB) {
81  step_ = step;
82  curv_ = curv;
83  phiB_ = phiB;
84  phi_ = phi;
85 }
86 
87 void L1MuKBMTrack::setCoordinatesAtVertex(int curv, int phi, int dxy) {
88  curvVertex_ = curv;
89  phiVertex_ = phi;
90  dxy_ = dxy;
91 }
92 
93 void L1MuKBMTrack::setCoordinatesAtMuon(int curv, int phi, int phiB) {
94  curvMuon_ = curv;
95  phiMuon_ = phi;
96  phiBMuon_ = phiB;
97 }
98 
100 
102 
103 void L1MuKBMTrack::setApproxChi2(int chi) { approxChi2_ = chi; }
105 
106 void L1MuKBMTrack::setPtEtaPhi(double pt, double eta, double phi) {
107  PolarLorentzVector v(pt, eta, phi, 0.105);
108  setP4(v);
109 }
111 
113  if (stub->quality() < quality_)
114  quality_ = stub->quality();
115  stubs_.push_back(stub);
116 }
117 
119  fineEta_ = eta;
120  hasFineEta_ = true;
121 }
122 
123 void L1MuKBMTrack::setRank(int rank) { rank_ = rank; }
124 
126  unsigned int step, unsigned int K, float a1, float a2, float a3, float a4, float a5, float a6) {
127  switch (step) {
128  case 3:
129  kalmanGain3_.push_back(K);
130  kalmanGain3_.push_back(a1);
131  kalmanGain3_.push_back(a2);
132  kalmanGain3_.push_back(a3);
133  kalmanGain3_.push_back(a4);
134  kalmanGain3_.push_back(a5);
135  kalmanGain3_.push_back(a6);
136  break;
137  case 2:
138  kalmanGain2_.push_back(K);
139  kalmanGain2_.push_back(a1);
140  kalmanGain2_.push_back(a2);
141  kalmanGain2_.push_back(a3);
142  kalmanGain2_.push_back(a4);
143  kalmanGain2_.push_back(a5);
144  kalmanGain2_.push_back(a6);
145  break;
146  case 1:
147  kalmanGain1_.push_back(K);
148  kalmanGain1_.push_back(a1);
149  kalmanGain1_.push_back(a2);
150  kalmanGain1_.push_back(a3);
151  kalmanGain1_.push_back(a4);
152  kalmanGain1_.push_back(a5);
153  kalmanGain1_.push_back(a6);
154  break;
155  case 0:
156  kalmanGain0_.push_back(K);
157  kalmanGain0_.push_back(a1);
158  kalmanGain0_.push_back(a2);
159  kalmanGain0_.push_back(a3);
160  break;
161 
162  default:
163  printf("Critical ERROR on setting the Klamn gain\n");
164  }
165 }
166 
168 
169 const std::vector<float>& L1MuKBMTrack::kalmanGain(unsigned int step) const {
170  switch (step) {
171  case 3:
172  return kalmanGain3_;
173  case 2:
174  return kalmanGain2_;
175  case 1:
176  return kalmanGain1_;
177  case 0:
178  return kalmanGain0_;
179  }
180  return kalmanGain0_;
181 }
182 
183 const std::vector<double>& L1MuKBMTrack::covariance() const { return covariance_; }
184 
186  for (const auto& s1 : stubs_) {
187  for (const auto& s2 : other.stubs()) {
188  if (s1->scNum() == s2->scNum() && s1->whNum() == s2->whNum() && s1->stNum() == s2->stNum() &&
189  s1->tag() == s2->tag())
190  return true;
191  }
192  }
193  return false;
194 }
195 
197  covariance_[0] = c(0, 0);
198  covariance_[1] = c(0, 1);
199  covariance_[2] = c(1, 1);
200  covariance_[3] = c(0, 2);
201  covariance_[4] = c(1, 2);
202  covariance_[5] = c(2, 2);
203 }
L1MuKBMTrack::setResidual
void setResidual(uint, int)
Definition: L1MuKBMTrack.cc:167
L1MuKBMTrack::positionAngle
int positionAngle() const
Definition: L1MuKBMTrack.cc:49
L1MuKBMTrack::step_
int step_
Definition: L1MuKBMTrack.h:174
L1MuKBMTrack::trackCompatibility_
int trackCompatibility_
Definition: L1MuKBMTrack.h:168
L1MuKBMTrack::kalmanGain0_
std::vector< float > kalmanGain0_
Definition: L1MuKBMTrack.h:200
L1MuKBMTrack::rank_
int rank_
Definition: L1MuKBMTrack.h:194
L1MuKBMTrack::ptUnconstrained_
float ptUnconstrained_
Definition: L1MuKBMTrack.h:197
L1MuKBMTrack::setCovariance
void setCovariance(const CovarianceMatrix &)
Definition: L1MuKBMTrack.cc:196
L1MuKBMTrack::phiAtMuon
int phiAtMuon() const
Definition: L1MuKBMTrack.cc:38
mps_fire.i
i
Definition: mps_fire.py:428
L1MuKBMTrack::setCoarseEta
void setCoarseEta(int)
Definition: L1MuKBMTrack.cc:99
funct::false
false
Definition: Factorize.h:29
L1MuKBMTrack::trackCompatibility
int trackCompatibility() const
Definition: L1MuKBMTrack.cc:56
L1MuKBMTrack::dxy_
int dxy_
Definition: L1MuKBMTrack.h:152
L1MuKBMTrack::kalmanGain
const std::vector< float > & kalmanGain(unsigned int) const
Definition: L1MuKBMTrack.cc:169
L1MuKBMTrack::phiAtVertex
int phiAtVertex() const
Definition: L1MuKBMTrack.cc:43
L1MuKBMTrack::phiMuon_
int phiMuon_
Definition: L1MuKBMTrack.h:156
step
step
Definition: StallMonitor.cc:94
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
L1MuKBMTrack::approxChi2_
int approxChi2_
Definition: L1MuKBMTrack.h:167
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
L1MuKBMTrack::quality_
int quality_
Definition: L1MuKBMTrack.h:182
L1MuKBMTrack::residual
int residual(uint) const
Definition: L1MuKBMTrack.cc:78
L1MuKBMTrack::hitPattern
int hitPattern() const
Definition: L1MuKBMTrack.cc:58
L1MuKBMTrack::kalmanGain2_
std::vector< float > kalmanGain2_
Definition: L1MuKBMTrack.h:202
L1MuKBMTrack::hitPattern_
int hitPattern_
Definition: L1MuKBMTrack.h:171
L1MuKBMTrack::sector_
int sector_
Definition: L1MuKBMTrack.h:177
CovarianceMatrix
Definition: CovarianceMatrix.h:28
L1MuKBMTrack::coarseEta
int coarseEta() const
Definition: L1MuKBMTrack.cc:53
L1MuKBMTrack::stubs_
L1MuKBMTCombinedStubRefVector stubs_
Definition: L1MuKBMTrack.h:147
indexGen.s2
s2
Definition: indexGen.py:107
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
findQualityFiles.v
v
Definition: findQualityFiles.py:179
parallelization.uint
uint
Definition: parallelization.py:124
L1MuKBMTrack::phi_
int phi_
Definition: L1MuKBMTrack.h:161
L1MuKBMTrack::sector
int sector() const
Definition: L1MuKBMTrack.cc:61
edm::Ref
Definition: AssociativeIterator.h:58
testProducerWithPsetDescEmpty_cfi.a2
a2
Definition: testProducerWithPsetDescEmpty_cfi.py:35
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:109
L1MuKBMTrack::setHitPattern
void setHitPattern(int)
Definition: L1MuKBMTrack.cc:101
fileCollector.seed
seed
Definition: fileCollector.py:127
L1MuKBMTrack::hasFineEta_
bool hasFineEta_
Definition: L1MuKBMTrack.h:188
L1MuKBMTrack::addStub
void addStub(const L1MuKBMTCombinedStubRef &)
Definition: L1MuKBMTrack.cc:112
L1MuKBMTrack::~L1MuKBMTrack
~L1MuKBMTrack() override
Definition: L1MuKBMTrack.cc:5
L1MuKBMTrack::phiBAtMuon
int phiBAtMuon() const
Definition: L1MuKBMTrack.cc:39
L1MuKBMTrack::setCoordinates
void setCoordinates(int, int, int, int)
Definition: L1MuKBMTrack.cc:80
L1MuKBMTrack::stubs
const L1MuKBMTCombinedStubRefVector & stubs() const
Definition: L1MuKBMTrack.cc:76
L1MuKBMTrack::kalmanGain3_
std::vector< float > kalmanGain3_
Definition: L1MuKBMTrack.h:203
L1MuKBMTrack::ptUnconstrained
float ptUnconstrained() const
Definition: L1MuKBMTrack.cc:66
L1MuKBMTrack::curvMuon_
int curvMuon_
Definition: L1MuKBMTrack.h:155
L1MuKBMTrack::phiVertex_
int phiVertex_
Definition: L1MuKBMTrack.h:151
L1MuKBMTrack::setApproxChi2
void setApproxChi2(int)
Definition: L1MuKBMTrack.cc:103
PVValHelper::eta
Definition: PVValidationHelpers.h:70
L1MuKBMTrack::setFineEta
void setFineEta(int)
Definition: L1MuKBMTrack.cc:118
L1MuKBMTrack.h
L1MuKBMTrack::bx_
int bx_
Definition: L1MuKBMTrack.h:191
L1MuKBMTrack::setPtUnconstrained
void setPtUnconstrained(float)
Definition: L1MuKBMTrack.cc:110
L1MuKBMTrack::hasFineEta
bool hasFineEta() const
Definition: L1MuKBMTrack.cc:70
trackingPlots.other
other
Definition: trackingPlots.py:1460
L1MuKBMTrack::wheel
int wheel() const
Definition: L1MuKBMTrack.cc:62
L1MuKBMTrack::curvatureAtVertex
int curvatureAtVertex() const
Definition: L1MuKBMTrack.cc:41
L1MuKBMTrack::bx
int bx() const
Definition: L1MuKBMTrack.cc:72
L1MuKBMTrack::residuals_
std::vector< int > residuals_
Definition: L1MuKBMTrack.h:205
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
PVValHelper::phi
Definition: PVValidationHelpers.h:69
L1MuKBMTrack::phiBMuon_
int phiBMuon_
Definition: L1MuKBMTrack.h:157
L1MuKBMTrack::step
int step() const
Definition: L1MuKBMTrack.cc:60
L1MuKBMTrack::curvature
int curvature() const
Definition: L1MuKBMTrack.cc:47
L1MuKBMTrack::curv_
int curv_
Definition: L1MuKBMTrack.h:160
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
L1MuKBMTrack
Definition: L1MuKBMTrack.h:19
L1MuKBMTrack::fineEta_
int fineEta_
Definition: L1MuKBMTrack.h:185
L1MuKBMTrack::setCoordinatesAtMuon
void setCoordinatesAtMuon(int, int, int)
Definition: L1MuKBMTrack.cc:93
L1MuKBMTrack::phiB_
int phiB_
Definition: L1MuKBMTrack.h:162
L1MuKBMTrack::approxChi2
int approxChi2() const
Definition: L1MuKBMTrack.cc:55
L1MuKBMTrack::setTrackCompatibility
void setTrackCompatibility(int)
Definition: L1MuKBMTrack.cc:104
L1MuKBMTrack::L1MuKBMTrack
L1MuKBMTrack()
Definition: L1MuKBMTrack.cc:3
reco::LeafCandidate::setP4
void setP4(const LorentzVector &p4) final
set 4-momentum
Definition: LeafCandidate.h:158
heppy_batch.val
val
Definition: heppy_batch.py:351
L1MuKBMTrack::fineEta
int fineEta() const
Definition: L1MuKBMTrack.cc:68
std
Definition: JetResolutionObject.h:76
L1MuKBMTrack::kalmanGain1_
std::vector< float > kalmanGain1_
Definition: L1MuKBMTrack.h:201
L1MuKBMTrack::coarseEta_
int coarseEta_
Definition: L1MuKBMTrack.h:164
L1MuKBMTrack::rank
int rank() const
Definition: L1MuKBMTrack.cc:74
L1MuKBMTrack::dxy
int dxy() const
Definition: L1MuKBMTrack.cc:45
PVValHelper::dxy
Definition: PVValidationHelpers.h:48
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
L1MuKBMTrack::quality
int quality() const
Definition: L1MuKBMTrack.cc:64
L1MuKBMTrack::covariance_
std::vector< double > covariance_
Definition: L1MuKBMTrack.h:145
L1MuKBMTrack::setRank
void setRank(int)
Definition: L1MuKBMTrack.cc:123
L1MuKBMTrack::wheel_
int wheel_
Definition: L1MuKBMTrack.h:179
L1MuKBMTrack::curvVertex_
int curvVertex_
Definition: L1MuKBMTrack.h:150
L1MuKBMTrack::setPtEtaPhi
void setPtEtaPhi(double, double, double)
Definition: L1MuKBMTrack.cc:106
L1MuKBMTrack::bendingAngle
int bendingAngle() const
Definition: L1MuKBMTrack.cc:51
L1MuKBMTrack::curvatureAtMuon
int curvatureAtMuon() const
Definition: L1MuKBMTrack.cc:37
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
L1MuKBMTrack::setCoordinatesAtVertex
void setCoordinatesAtVertex(int, int, int)
Definition: L1MuKBMTrack.cc:87
L1MuKBMTrack::covariance
const std::vector< double > & covariance() const
Definition: L1MuKBMTrack.cc:183
L1MuKBMTrack::overlapTrack
bool overlapTrack(const L1MuKBMTrack &) const
Definition: L1MuKBMTrack.cc:185
L1MuKBMTrack::setKalmanGain
void setKalmanGain(unsigned int step, unsigned int K, float a1, float a2, float a3, float a4=0, float a5=0, float a6=0)
Definition: L1MuKBMTrack.cc:125
L1MuKBMTCombinedStubRefVector
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
Definition: L1MuKBMTCombinedStub.h:43