CMS 3D CMS Logo

VertexTrack.h
Go to the documentation of this file.
1 #ifndef VertexTrack_H
2 #define VertexTrack_H
3 
8 
9 #define SMATRIX_USE_CONSTEXPR
10 #include "Math/SMatrix.h"
11 
17 template <unsigned int N>
18 class VertexTrack final : public ReferenceCounted {
19 public:
20  typedef ROOT::Math::SVector<double, N> AlgebraicVectorN;
21  typedef ROOT::Math::SMatrix<double, N - 2, N - 2, ROOT::Math::MatRepStd<double, N - 2, N - 2> > AlgebraicMatrixMM;
22  typedef ROOT::Math::SMatrix<double, 3, N - 2, ROOT::Math::MatRepStd<double, 3, N - 2> > AlgebraicMatrix3M;
23  typedef ROOT::Math::SMatrix<double, N + 1, N + 1, ROOT::Math::MatRepSym<double, N + 1> > AlgebraicSymMatrixOO;
24 
25  //typedef ReferenceCountingPointer<VertexTrack<N> > RefCountedVertexTrack;
28 
31  VertexTrack(RefCountedLinearizedTrackState lt, VertexState v, float weight);
32 
36  VertexTrack(RefCountedLinearizedTrackState lt,
37  VertexState v,
38  float weight,
39  const RefCountedRefittedTrackState& refittedState,
40  float smoothedChi2);
41 
45  VertexTrack(RefCountedLinearizedTrackState lt,
46  VertexState v,
47  float weight,
48  const RefCountedRefittedTrackState& refittedState,
49  float smoothedChi2,
50  const AlgebraicSymMatrixOO& fullCov);
51 
54  RefCountedLinearizedTrackState linearizedTrack() const { return theLinTrack; }
56  float weight() const { return theWeight; }
57  bool refittedStateAvailable() const { return stAvailable; }
59  bool fullCovarianceAvailable() const { return covAvailable; }
60 
67  float smoothedChi2() const { return smoothedChi2_; }
68 
71  RefCountedRefittedTrackState refittedState() const {
72  if (!refittedStateAvailable()) {
73  throw VertexException("VertexTrack::refitted state not available");
74  }
75  return theRefittedState;
76  }
77 
78  // /** Track to vertex covariance
79  // */
80  // AlgebraicMatrix3M tkToVtxCovariance() const;
81 
84  AlgebraicSymMatrixOO fullCovariance() const {
86  throw VertexException("VertexTrack::track to vertex covariance not available");
87  }
88  return fullCovariance_;
89  }
90 
94  bool operator==(const VertexTrack<N>& data) const { return ((*data.linearizedTrack()) == (*linearizedTrack())); }
95 
98  AlgebraicVectorN refittedParamFromEquation() const;
99 
100 private:
101  RefCountedLinearizedTrackState theLinTrack;
103  float theWeight;
106  RefCountedRefittedTrackState theRefittedState;
107  AlgebraicSymMatrixOO fullCovariance_;
108  ROOT::Math::SMatrix<double, 6, 6, ROOT::Math::MatRepSym<double, 6> > b6;
109  ROOT::Math::SMatrix<double, 7, 7, ROOT::Math::MatRepSym<double, 7> > b7;
111 };
112 
113 template <unsigned int N>
115 public:
117  VertexTrackEqual(const RefCountedVertexTrack& t) : track_(t) {}
118  bool operator()(const RefCountedVertexTrack& t) const { return t->operator==(*track_); }
119 
120 private:
121  const RefCountedVertexTrack& track_;
122 };
123 
124 #endif
VertexState vertexState() const
Definition: VertexTrack.h:55
bool tkToVertexCovarianceAvailable() const
Definition: VertexTrack.h:58
Common base class.
AlgebraicVectorN refittedParamFromEquation() const
Definition: VertexTrack.cc:43
float smoothedChi2_
Definition: VertexTrack.h:110
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > b6
Definition: VertexTrack.h:108
ROOT::Math::SMatrix< double, N+1, N+1, ROOT::Math::MatRepSym< double, N+1 > > AlgebraicSymMatrixOO
Definition: VertexTrack.h:23
bool operator()(const RefCountedVertexTrack &t) const
Definition: VertexTrack.h:118
Definition: weight.py:1
ROOT::Math::SMatrix< double, N-2, N-2, ROOT::Math::MatRepStd< double, N-2, N-2 > > AlgebraicMatrixMM
Definition: VertexTrack.h:21
bool stAvailable
Definition: VertexTrack.h:104
bool refittedStateAvailable() const
Definition: VertexTrack.h:57
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > b7
Definition: VertexTrack.h:109
float smoothedChi2() const
Definition: VertexTrack.h:67
AlgebraicSymMatrixOO fullCovariance_
Definition: VertexTrack.h:107
VertexState theVertexState
Definition: VertexTrack.h:102
bool operator==(const VertexTrack< N > &data) const
Definition: VertexTrack.h:94
VertexTrack(RefCountedLinearizedTrackState lt, VertexState v, float weight)
Definition: VertexTrack.cc:4
ROOT::Math::SVector< double, N > AlgebraicVectorN
Definition: VertexTrack.h:20
const RefCountedVertexTrack & track_
Definition: VertexTrack.h:121
RefCountedRefittedTrackState theRefittedState
Definition: VertexTrack.h:106
AlgebraicSymMatrixOO fullCovariance() const
Definition: VertexTrack.h:84
#define N
Definition: blowfish.cc:9
RefCountedRefittedTrackState refittedState() const
Definition: VertexTrack.h:71
ReferenceCountingPointer< LinearizedTrackState< N > > RefCountedLinearizedTrackState
Definition: VertexTrack.h:26
float weight() const
Definition: VertexTrack.h:56
float theWeight
Definition: VertexTrack.h:103
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
Definition: VertexTrack.h:27
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ROOT::Math::SMatrix< double, 3, N-2, ROOT::Math::MatRepStd< double, 3, N-2 > > AlgebraicMatrix3M
Definition: VertexTrack.h:22
VertexTrackEqual(const RefCountedVertexTrack &t)
Definition: VertexTrack.h:117
bool covAvailable
Definition: VertexTrack.h:105
bool fullCovarianceAvailable() const
Definition: VertexTrack.h:59
RefCountedLinearizedTrackState linearizedTrack() const
Definition: VertexTrack.h:54
ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
Definition: VertexTrack.h:116
RefCountedLinearizedTrackState theLinTrack
Definition: VertexTrack.h:101