CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
33  CachingVertex(const GlobalPoint &pos,
34  const GlobalError &posErr,
35  const std::vector<RefCountedVertexTrack> &tks,
36  float totalChiSq);
37 
38  CachingVertex(const GlobalPoint &pos,
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)
56  CachingVertex(const GlobalPoint &pos,
57  const double time,
58  const GlobalError &posTimeErr,
59  const std::vector<RefCountedVertexTrack> &tks,
60  float totalChiSq);
61 
62  CachingVertex(const GlobalPoint &pos,
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
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > tracks() const
void computeNDF() const
VertexState thePriorVertexState
VertexState const & vertexState() const
const std::vector< RefCountedVertexTrack > & tracksRef() const
TrackToTrackMap theCovMap
GlobalPoint position() const
Definition: VertexState.h:62
bool is4D() const
GlobalError priorError() const
ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
Definition: CachingVertex.h:24
GlobalError error4D() const
AlgebraicVector3 weightTimesPosition() const
GlobalWeight weight() const
ROOT::Math::SMatrix< double, N, N, ROOT::Math::MatRepSym< double, N > > AlgebraicSymMatrixNN
Definition: CachingVertex.h:25
float totalChiSquared() const
double time() const
Definition: VertexState.h:73
bool hasPrior() const
float degreesOfFreedom() const
std::vector< RefCountedVertexTrack > theTracks
ROOT::Math::SVector< double, 4 > AlgebraicVector4
ROOT::Math::SMatrix< double, N-2, N-2, ROOT::Math::MatRepStd< double, N-2, N-2 > > AlgebraicMatrixMM
Definition: CachingVertex.h:26
AlgebraicVector4 weightTimesPosition4D() const
GlobalError error4D() const
Definition: VertexState.h:67
VertexState const & priorVertexState() const
#define N
Definition: blowfish.cc:9
AlgebraicMatrixMM tkToTkCovariance(const RefCountedVertexTrack t1, const RefCountedVertexTrack t2) const
GlobalWeight weight4D() const
bool tkToTkCovarianceIsAvailable() const
GlobalPoint position() const
double priorTime() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
bool isValid() const
GlobalError error() const
Definition: VertexState.h:64
std::map< RefCountedVertexTrack, AlgebraicMatrixMM > TrackMap
Definition: CachingVertex.h:27
GlobalError error() const
double time() const
GlobalError priorError4D() const
VertexState theVertexState
GlobalPoint priorPosition() const
std::map< RefCountedVertexTrack, TrackMap > TrackToTrackMap
Definition: CachingVertex.h:28