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 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  int trackCompatibility() const;
48 
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  //BX
68  int bx() const;
69 
70  //rank
71  int rank() const;
72 
73  //Associated stubs
74  const L1MuKBMTCombinedStubRefVector& stubs() const;
75 
76  //get Kalman gain
77  const std::vector<float>& kalmanGain(unsigned int) const;
78 
79  //get covariance
80  const std::vector<double>& covariance() const;
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() || s1->whNum() != s2->whNum() || s1->stNum() != s2->stNum() ||
95  s1->tag() != s2->tag())
96  return false;
97  }
98  return true;
99  }
100 
101  //Set coordinates general
102  void setCoordinates(int, int, int, int);
103 
104  //Set coordinates at vertex
105  void setCoordinatesAtVertex(int, int, int);
106 
107  //Set coordinates at muon
108  void setCoordinatesAtMuon(int, int, int);
109 
110  //Set eta coarse and pattern
111  void setCoarseEta(int);
112 
113  //Set phi hit pattern
114  void setHitPattern(int);
115 
116  //Set chi2 like metric
117  void setApproxChi2(int);
118  void setTrackCompatibility(int);
119 
120  //Set floating point coordinates for studies
121  void setPtEtaPhi(double, double, double);
122  void setPtUnconstrained(float);
123 
124  //Add a stub
125  void addStub(const L1MuKBMTCombinedStubRef&);
126 
127  //kalman gain management
128  void setKalmanGain(
129  unsigned int step, unsigned int K, float a1, float a2, float a3, float a4 = 0, float a5 = 0, float a6 = 0);
130 
131  //set covariance
132  void setCovariance(const CovarianceMatrix&);
133 
134  //set fine eta
135  void setFineEta(int);
136 
137  //set rank
138  void setRank(int);
139 
140  //set residual
141  void setResidual(uint, int);
142 
143 private:
144  //Covariance matrix for studies
145  std::vector<double> covariance_;
146 
148 
149  //vertex coordinates
152  int dxy_;
153 
154  //muon coordinates
156  int phiMuon_;
158 
159  //generic coordinates
160  int curv_;
161  int phi_;
162  int phiB_;
163  //common coordinates
165 
166  //Approximate Chi2 metric
169 
170  //phi bitmask
172 
173  //propagation step
174  int step_;
175 
176  //sector
177  int sector_;
178  //wheel
179  int wheel_;
180 
181  //quality
182  int quality_;
183 
184  //Fine eta
185  int fineEta_;
186 
187  //has fine eta?
189 
190  //BX
191  int bx_;
192 
193  //rank
194  int rank_;
195 
196  //Unconstrained floating point pt
198 
199  //Kalman Gain for making LUTs
200  std::vector<float> kalmanGain0_;
201  std::vector<float> kalmanGain1_;
202  std::vector<float> kalmanGain2_;
203  std::vector<float> kalmanGain3_;
204 
205  std::vector<int> residuals_;
206 };
207 
208 #endif
reco::Candidate::size
Definition: Candidate.h:48
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
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
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
BXVector.h
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
L1MuKBMTrack::approxChi2_
int approxChi2_
Definition: L1MuKBMTrack.h:167
L1MuKBMTrackCollection
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:15
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
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
L1MuKBMTrack::setHitPattern
void setHitPattern(int)
Definition: L1MuKBMTrack.cc:101
BXVector
Definition: BXVector.h:15
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
L1MuKBMTrack::setFineEta
void setFineEta(int)
Definition: L1MuKBMTrack.cc:118
L1MuKBMTrack::bx_
int bx_
Definition: L1MuKBMTrack.h:191
LeafCandidate.h
L1MuKBMTrack::setPtUnconstrained
void setPtUnconstrained(float)
Definition: L1MuKBMTrack.cc:110
L1MuKBMTrack::hasFineEta
bool hasFineEta() const
Definition: L1MuKBMTrack.cc:70
L1MuKBMTrack::operator==
bool operator==(const L1MuKBMTrack &t2) const
Definition: L1MuKBMTrack.h:88
L1MuKBMTrack::wheel
int wheel() const
Definition: L1MuKBMTrack.cc:62
L1MuKBMTrackBxCollection
BXVector< L1MuKBMTrack > L1MuKBMTrackBxCollection
Definition: L1MuKBMTrack.h:17
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
L1MuKBMTCombinedStub.h
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
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
L1MuKBMTrack::fineEta
int fineEta() const
Definition: L1MuKBMTrack.cc:68
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
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
reco::LeafCandidate
Definition: LeafCandidate.h:16
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
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