CMS 3D CMS Logo

CachingVertex.h
Go to the documentation of this file.
1 #ifndef CachingVertex_H
2 #define CachingVertex_H
3 
7 
10 
13 
14 #include <vector>
15 #include <map>
16 
21 template <unsigned int N>
23 public:
25  typedef ROOT::Math::SMatrix<double, N, N, ROOT::Math::MatRepSym<double, N> > AlgebraicSymMatrixNN;
26  typedef ROOT::Math::SMatrix<double, N - 2, N - 2, ROOT::Math::MatRepStd<double, N - 2, N - 2> > AlgebraicMatrixMM;
27  typedef std::map<RefCountedVertexTrack, AlgebraicMatrixMM> TrackMap;
28  typedef std::map<RefCountedVertexTrack, TrackMap> TrackToTrackMap;
29 
32  // no time
34  const GlobalError &posErr,
35  const std::vector<RefCountedVertexTrack> &tks,
36  float totalChiSq);
37 
39  const GlobalWeight &posWeight,
40  const std::vector<RefCountedVertexTrack> &tks,
41  float totalChiSq);
42 
44  const GlobalWeight &posWeight,
45  const std::vector<RefCountedVertexTrack> &tks,
46  float totalChiSq);
47 
48  CachingVertex(const GlobalPoint &priorPos,
49  const GlobalError &priorErr,
51  const GlobalWeight &posWeight,
52  const std::vector<RefCountedVertexTrack> &tks,
53  float totalChiSq);
54 
55  // with time (tracks must have time as well)
57  const double time,
58  const GlobalError &posTimeErr,
59  const std::vector<RefCountedVertexTrack> &tks,
60  float totalChiSq);
61 
63  const double time,
64  const GlobalWeight &posTimeWeight,
65  const std::vector<RefCountedVertexTrack> &tks,
66  float totalChiSq);
67 
69  const GlobalWeight &posTimeWeight,
70  const std::vector<RefCountedVertexTrack> &tks,
71  float totalChiSq);
72 
73  CachingVertex(const GlobalPoint &priorPos,
74  const GlobalError &priorErr,
76  const GlobalWeight &posWeight,
77  const std::vector<RefCountedVertexTrack> &tks,
78  float totalChiSq);
79 
80  // either time or no time (depends on if the tracks/vertex states have times)
81  CachingVertex(const GlobalPoint &priorPos,
82  const GlobalError &priorErr,
83  const GlobalPoint &pos,
84  const GlobalError &posErr,
85  const std::vector<RefCountedVertexTrack> &tks,
86  float totalChiSq);
87 
88  CachingVertex(const GlobalPoint &priorPos,
89  const double priorTime,
90  const GlobalError &priorErr,
91  const GlobalPoint &pos,
92  const double time,
93  const GlobalError &posErr,
94  const std::vector<RefCountedVertexTrack> &tks,
95  float totalChiSq);
96 
97  CachingVertex(const GlobalPoint &priorPos,
98  const GlobalError &priorErr,
99  const GlobalPoint &pos,
100  const GlobalWeight &posWeight,
101  const std::vector<RefCountedVertexTrack> &tks,
102  float totalChiSq);
103 
104  CachingVertex(const GlobalPoint &priorPos,
105  const double priorTime,
106  const GlobalError &priorErr,
107  const GlobalPoint &pos,
108  const double time,
109  const GlobalWeight &posWeight,
110  const std::vector<RefCountedVertexTrack> &tks,
111  float totalChiSq);
112 
113  CachingVertex(const VertexState &aVertexState, const std::vector<RefCountedVertexTrack> &tks, float totalChiSq);
114 
116  const VertexState &aVertexState,
117  const std::vector<RefCountedVertexTrack> &tks,
118  float totalChiSq);
119 
120  CachingVertex(const VertexState &aVertexState,
121  const std::vector<RefCountedVertexTrack> &tks,
122  float totalChiSq,
123  const TrackToTrackMap &covMap);
124 
126  const VertexState &aVertexState,
127  const std::vector<RefCountedVertexTrack> &tks,
128  float totalChiSq,
129  const TrackToTrackMap &covMap);
130 
133  CachingVertex();
134 
137  VertexState const &vertexState() const { return theVertexState; }
139  GlobalPoint position() const;
140  double time() const;
141  GlobalError error() const;
142  GlobalError error4D() const;
143  GlobalWeight weight() const;
144  GlobalWeight weight4D() const;
147  std::vector<RefCountedVertexTrack> tracks() const { return theTracks; }
148  const std::vector<RefCountedVertexTrack> &tracksRef() const { return theTracks; }
150  double priorTime() const { return priorVertexState().time(); }
153  bool hasPrior() const { return withPrior; }
154  bool isValid() const { return theValid; }
155  bool is4D() const { return vertexIs4D; }
156 
159  float totalChiSquared() const { return theChiSquared; }
160  float degreesOfFreedom() const;
161 
166 
167  operator TransientVertex() const;
168 
169 private:
170  void computeNDF() const;
171 
174  mutable float theNDF;
175  mutable bool theNDFAvailable;
176  std::vector<RefCountedVertexTrack> theTracks;
180  bool withPrior;
181 
182  bool theValid;
184 };
185 
186 #endif
CachingVertex::CachingVertex
CachingVertex()
Definition: CachingVertex.cc:297
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
AlgebraicVector3
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Definition: AlgebraicROOTObjects.h:12
CachingVertex::AlgebraicSymMatrixNN
ROOT::Math::SMatrix< double, N, N, ROOT::Math::MatRepSym< double, N > > AlgebraicSymMatrixNN
Definition: CachingVertex.h:25
CachingVertex::weight
GlobalWeight weight() const
Definition: CachingVertex.cc:328
CachingVertex::theCovMapAvailable
bool theCovMapAvailable
Definition: CachingVertex.h:178
CachingVertex::withPrior
bool withPrior
Definition: CachingVertex.h:180
CachingVertex
Definition: CachingVertex.h:22
pos
Definition: PixelAliasList.h:18
CachingVertex::priorVertexState
const VertexState & priorVertexState() const
Definition: CachingVertex.h:138
CachingVertex::priorTime
double priorTime() const
Definition: CachingVertex.h:150
CachingVertex::theCovMap
TrackToTrackMap theCovMap
Definition: CachingVertex.h:177
CachingVertex::TrackMap
std::map< RefCountedVertexTrack, AlgebraicMatrixMM > TrackMap
Definition: CachingVertex.h:27
CachingVertex::vertexState
const VertexState & vertexState() const
Definition: CachingVertex.h:137
CachingVertex::hasPrior
bool hasPrior() const
Definition: CachingVertex.h:153
ReferenceCountingPointer
Definition: ReferenceCounted.h:60
CachingVertex::weightTimesPosition4D
AlgebraicVector4 weightTimesPosition4D() const
Definition: CachingVertex.cc:343
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
VertexTrack.h
CachingVertex::error
GlobalError error() const
Definition: CachingVertex.cc:318
CachingVertex::computeNDF
void computeNDF() const
Definition: CachingVertex.cc:355
CachingVertex::error4D
GlobalError error4D() const
Definition: CachingVertex.cc:323
CachingVertex::theChiSquared
float theChiSquared
Definition: CachingVertex.h:173
CachingVertex::priorPosition
GlobalPoint priorPosition() const
Definition: CachingVertex.h:149
N
#define N
Definition: blowfish.cc:9
CachingVertex::thePriorVertexState
VertexState thePriorVertexState
Definition: CachingVertex.h:179
VertexState::error
GlobalError error() const
Definition: VertexState.h:64
CachingVertex::is4D
bool is4D() const
Definition: CachingVertex.h:155
VertexState.h
Point3DBase< float, GlobalTag >
CachingVertex::weightTimesPosition
AlgebraicVector3 weightTimesPosition() const
Definition: CachingVertex.cc:338
CachingVertex::AlgebraicMatrixMM
ROOT::Math::SMatrix< double, N - 2, N - 2, ROOT::Math::MatRepStd< double, N - 2, N - 2 > > AlgebraicMatrixMM
Definition: CachingVertex.h:26
CachingVertex::theValid
bool theValid
Definition: CachingVertex.h:182
CachingVertex::totalChiSquared
float totalChiSquared() const
Definition: CachingVertex.h:159
GlobalWeight.h
CachingVertex::vertexIs4D
bool vertexIs4D
Definition: CachingVertex.h:183
CachingVertex::position
GlobalPoint position() const
Definition: CachingVertex.cc:308
TrackToTrackMap
CachingVertex::degreesOfFreedom
float degreesOfFreedom() const
Definition: CachingVertex.cc:348
GlobalError.h
GlobalErrorBase< double, ErrorMatrixTag >
CachingVertex::tracks
std::vector< RefCountedVertexTrack > tracks() const
Definition: CachingVertex.h:147
TransientVertex
Definition: TransientVertex.h:18
CachingVertex::theVertexState
VertexState theVertexState
Definition: CachingVertex.h:172
CachingVertex::time
double time() const
Definition: CachingVertex.cc:313
CachingVertex::tracksRef
const std::vector< RefCountedVertexTrack > & tracksRef() const
Definition: CachingVertex.h:148
AlgebraicVector4
ROOT::Math::SVector< double, 4 > AlgebraicVector4
Definition: AlgebraicROOTObjects.h:13
TransientVertex.h
ReferenceCounted.h
CachingVertex::theNDFAvailable
bool theNDFAvailable
Definition: CachingVertex.h:175
CachingVertex::RefCountedVertexTrack
ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
Definition: CachingVertex.h:24
VertexState
Definition: VertexState.h:13
CachingVertex::weight4D
GlobalWeight weight4D() const
Definition: CachingVertex.cc:333
CachingVertex::priorError
GlobalError priorError() const
Definition: CachingVertex.h:151
CachingVertex::isValid
bool isValid() const
Definition: CachingVertex.h:154
VertexState::position
GlobalPoint position() const
Definition: VertexState.h:62
CachingVertex::tkToTkCovariance
AlgebraicMatrixMM tkToTkCovariance(const RefCountedVertexTrack t1, const RefCountedVertexTrack t2) const
Definition: CachingVertex.cc:369
CachingVertex::priorError4D
GlobalError priorError4D() const
Definition: CachingVertex.h:152
CachingVertex::theTracks
std::vector< RefCountedVertexTrack > theTracks
Definition: CachingVertex.h:176
VertexState::time
double time() const
Definition: VertexState.h:73
CachingVertex::tkToTkCovarianceIsAvailable
bool tkToTkCovarianceIsAvailable() const
Definition: CachingVertex.h:165
CachingVertex::TrackToTrackMap
std::map< RefCountedVertexTrack, TrackMap > TrackToTrackMap
Definition: CachingVertex.h:28
GlobalPoint.h
CachingVertex::theNDF
float theNDF
Definition: CachingVertex.h:174
VertexState::error4D
GlobalError error4D() const
Definition: VertexState.h:67