CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
17 
18 
24 template <unsigned int N>
26 
27 public:
28 
30  typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepSym<double,N> > AlgebraicSymMatrixNN;
31  typedef ROOT::Math::SMatrix<double,N-2,N-2,ROOT::Math::MatRepStd<double,N-2,N-2> > AlgebraicMatrixMM;
32  typedef std::map<RefCountedVertexTrack, AlgebraicMatrixMM > TrackMap;
33  typedef std::map<RefCountedVertexTrack, TrackMap > TrackToTrackMap;
34 
37  CachingVertex(const GlobalPoint & pos, const GlobalError & posErr,
38  const std::vector<RefCountedVertexTrack> & tks, float totalChiSq);
39 
40  CachingVertex(const GlobalPoint & pos, const GlobalWeight & posWeight,
41  const std::vector<RefCountedVertexTrack> & tks, float totalChiSq);
42 
44  const GlobalWeight & posWeight,
45  const std::vector<RefCountedVertexTrack> & tks,
46  float totalChiSq);
47 
48  CachingVertex(const GlobalPoint & priorPos, const GlobalError & priorErr,
49  const GlobalPoint & pos, const GlobalError & posErr,
50  const std::vector<RefCountedVertexTrack> & tks, float totalChiSq);
51 
52  CachingVertex(const GlobalPoint & priorPos, const GlobalError & priorErr,
53  const GlobalPoint & pos, const GlobalWeight & posWeight,
54  const std::vector<RefCountedVertexTrack> & tks, float totalChiSq);
55 
56  CachingVertex(const GlobalPoint & priorPos, const GlobalError & priorErr,
58  const GlobalWeight & posWeight,
59  const std::vector<RefCountedVertexTrack> & tks,
60  float totalChiSq);
61 
62 
63  CachingVertex(const VertexState & aVertexState,
64  const std::vector<RefCountedVertexTrack> & tks, float totalChiSq);
65 
66  CachingVertex(const VertexState & priorVertexState,
67  const VertexState & aVertexState,
68  const std::vector<RefCountedVertexTrack> & tks, float totalChiSq);
69 
70  CachingVertex(const VertexState & aVertexState,
71  const std::vector<RefCountedVertexTrack> & tks,
72  float totalChiSq, const TrackToTrackMap & covMap);
73 
74  CachingVertex(const VertexState & priorVertexState,
75  const VertexState & aVertexState,
76  const std::vector<RefCountedVertexTrack> & tks,
77  float totalChiSq, const TrackToTrackMap & covMap);
78 
81  CachingVertex();
82 
85  VertexState const & vertexState() const {return theVertexState;}
86  VertexState const & priorVertexState() const {return thePriorVertexState;}
87  GlobalPoint position() const;
88  GlobalError error() const;
89  GlobalWeight weight() const;
91  std::vector<RefCountedVertexTrack> const & tracks() const { return theTracks; }
92  std::vector<RefCountedVertexTrack> const & tracksRef() const { return theTracks; }
93  GlobalPoint priorPosition() const {return priorVertexState().position();}
94  GlobalError priorError() const {return priorVertexState().error();}
95  bool hasPrior() const {return withPrior;}
96  bool isValid() const {return theValid;}
97 
100  float totalChiSquared() const { return theChiSquared; }
101  float degreesOfFreedom() const;
102 
106  const RefCountedVertexTrack t2) const;
108 
109  operator TransientVertex() const;
110 
111 private:
112 
113  void computeNDF() const;
114 
115  mutable VertexState theVertexState;
117  mutable float theNDF;
118  mutable bool theNDFAvailable;
119  std::vector<RefCountedVertexTrack> theTracks;
122  mutable VertexState thePriorVertexState;
123  bool withPrior;
124 
125  bool theValid;
126 };
127 
128 
129 #endif
bool theCovMapAvailable
void computeNDF() const
VertexState thePriorVertexState
VertexState const & vertexState() const
Definition: CachingVertex.h:85
TrackToTrackMap theCovMap
GlobalError priorError() const
Definition: CachingVertex.h:94
ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
Definition: CachingVertex.h:29
std::vector< RefCountedVertexTrack > const & tracks() const
Definition: CachingVertex.h:91
auto const T2 &decltype(t1.eta()) t2
Definition: deltaR.h:18
AlgebraicVector3 weightTimesPosition() const
GlobalWeight weight() const
float totalChiSquared() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
std::map< RefCountedVertexTrack, AlgebraicMatrixMM > TrackMap
Definition: CachingVertex.h:32
bool hasPrior() const
Definition: CachingVertex.h:95
float degreesOfFreedom() const
std::vector< RefCountedVertexTrack > theTracks
VertexState const & priorVertexState() const
Definition: CachingVertex.h:86
#define N
Definition: blowfish.cc:9
ROOT::Math::SMatrix< double, N, N, ROOT::Math::MatRepSym< double, N > > AlgebraicSymMatrixNN
Definition: CachingVertex.h:30
AlgebraicMatrixMM tkToTkCovariance(const RefCountedVertexTrack t1, const RefCountedVertexTrack t2) const
std::vector< RefCountedVertexTrack > const & tracksRef() const
Definition: CachingVertex.h:92
bool tkToTkCovarianceIsAvailable() const
GlobalPoint position() const
ROOT::Math::SMatrix< double, N-2, N-2, ROOT::Math::MatRepStd< double, N-2, N-2 > > AlgebraicMatrixMM
Definition: CachingVertex.h:31
bool isValid() const
Definition: CachingVertex.h:96
std::map< RefCountedVertexTrack, TrackMap > TrackToTrackMap
Definition: CachingVertex.h:33
GlobalError error() const
VertexState theVertexState
GlobalPoint priorPosition() const
Definition: CachingVertex.h:93