CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CachingVertex< N > Class Template Reference

#include <CachingVertex.h>

Public Types

typedef ROOT::Math::SMatrix< double, N - 2, N - 2, ROOT::Math::MatRepStd< double, N - 2, N - 2 > > AlgebraicMatrixMM
 
typedef ROOT::Math::SMatrix< double, N, N, ROOT::Math::MatRepSym< double, N > > AlgebraicSymMatrixNN
 
typedef ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
 
typedef std::map< RefCountedVertexTrack, AlgebraicMatrixMMTrackMap
 
typedef std::map< RefCountedVertexTrack, TrackMapTrackToTrackMap
 

Public Member Functions

 CachingVertex (const GlobalPoint &pos, const GlobalError &posErr, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const GlobalPoint &pos, const GlobalWeight &posWeight, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const AlgebraicVector3 &weightTimesPosition, const GlobalWeight &posWeight, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const GlobalPoint &priorPos, const GlobalError &priorErr, const AlgebraicVector3 &weightTimesPosition, const GlobalWeight &posWeight, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const GlobalPoint &pos, const double time, const GlobalError &posTimeErr, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const GlobalPoint &pos, const double time, const GlobalWeight &posTimeWeight, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const AlgebraicVector4 &weightTimesPosition, const GlobalWeight &posTimeWeight, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const GlobalPoint &priorPos, const GlobalError &priorErr, const AlgebraicVector4 &weightTimesPosition, const GlobalWeight &posWeight, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const GlobalPoint &priorPos, const GlobalError &priorErr, const GlobalPoint &pos, const GlobalError &posErr, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const GlobalPoint &priorPos, const double priorTime, const GlobalError &priorErr, const GlobalPoint &pos, const double time, const GlobalError &posErr, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const GlobalPoint &priorPos, const GlobalError &priorErr, const GlobalPoint &pos, const GlobalWeight &posWeight, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const GlobalPoint &priorPos, const double priorTime, const GlobalError &priorErr, const GlobalPoint &pos, const double time, const GlobalWeight &posWeight, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const VertexState &aVertexState, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const VertexState &priorVertexState, const VertexState &aVertexState, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq)
 
 CachingVertex (const VertexState &aVertexState, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq, const TrackToTrackMap &covMap)
 
 CachingVertex (const VertexState &priorVertexState, const VertexState &aVertexState, const std::vector< RefCountedVertexTrack > &tks, float totalChiSq, const TrackToTrackMap &covMap)
 
 CachingVertex ()
 
float degreesOfFreedom () const
 
GlobalError error () const
 
GlobalError error4D () const
 
bool hasPrior () const
 
bool is4D () const
 
bool isValid () const
 
 operator TransientVertex () const
 
GlobalPoint position () const
 
GlobalError priorError () const
 
GlobalError priorError4D () const
 
GlobalPoint priorPosition () const
 
double priorTime () const
 
VertexState const & priorVertexState () const
 
double time () const
 
AlgebraicMatrixMM tkToTkCovariance (const RefCountedVertexTrack t1, const RefCountedVertexTrack t2) const
 
bool tkToTkCovarianceIsAvailable () const
 
float totalChiSquared () const
 
std::vector< RefCountedVertexTracktracks () const
 
const std::vector< RefCountedVertexTrack > & tracksRef () const
 
VertexState const & vertexState () const
 
GlobalWeight weight () const
 
GlobalWeight weight4D () const
 
AlgebraicVector3 weightTimesPosition () const
 
AlgebraicVector4 weightTimesPosition4D () const
 

Private Member Functions

void computeNDF () const
 

Private Attributes

float theChiSquared
 
TrackToTrackMap theCovMap
 
bool theCovMapAvailable
 
float theNDF
 
bool theNDFAvailable
 
VertexState thePriorVertexState
 
std::vector< RefCountedVertexTracktheTracks
 
bool theValid
 
VertexState theVertexState
 
bool vertexIs4D
 
bool withPrior
 

Detailed Description

template<unsigned int N>
class CachingVertex< N >

Class for vertices fitted with Kalman and linear fit algorithms. Provides access to temporary data to speed up the vertex update.

Definition at line 22 of file CachingVertex.h.

Member Typedef Documentation

◆ AlgebraicMatrixMM

template<unsigned int N>
typedef ROOT::Math::SMatrix<double, N - 2, N - 2, ROOT::Math::MatRepStd<double, N - 2, N - 2> > CachingVertex< N >::AlgebraicMatrixMM

Definition at line 26 of file CachingVertex.h.

◆ AlgebraicSymMatrixNN

template<unsigned int N>
typedef ROOT::Math::SMatrix<double, N, N, ROOT::Math::MatRepSym<double, N> > CachingVertex< N >::AlgebraicSymMatrixNN

Definition at line 25 of file CachingVertex.h.

◆ RefCountedVertexTrack

Definition at line 24 of file CachingVertex.h.

◆ TrackMap

template<unsigned int N>
typedef std::map<RefCountedVertexTrack, AlgebraicMatrixMM> CachingVertex< N >::TrackMap

Definition at line 27 of file CachingVertex.h.

◆ TrackToTrackMap

template<unsigned int N>
typedef std::map<RefCountedVertexTrack, TrackMap> CachingVertex< N >::TrackToTrackMap

Definition at line 28 of file CachingVertex.h.

Constructor & Destructor Documentation

◆ CachingVertex() [1/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint pos,
const GlobalError posErr,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Constructors

Definition at line 10 of file CachingVertex.cc.

14  : theVertexState(pos, posErr),
15  theChiSquared(totalChiSq),
16  theNDF(0),
17  theNDFAvailable(false),
18  theTracks(tks),
19  theCovMapAvailable(false),
20  withPrior(false),
21  theValid(true),
22  vertexIs4D(false)
23 
24 {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [2/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint pos,
const GlobalWeight posWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 47 of file CachingVertex.cc.

51  : theVertexState(pos, posWeight),
52  theChiSquared(totalChiSq),
53  theNDF(0),
54  theNDFAvailable(false),
55  theTracks(tks),
56  theCovMapAvailable(false),
57  withPrior(false),
58  theValid(true),
59  vertexIs4D(false) {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [3/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const AlgebraicVector3 weightTimesPosition,
const GlobalWeight posWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 80 of file CachingVertex.cc.

84  : theVertexState(weightTimesPosition, posWeight),
85  theChiSquared(totalChiSq),
86  theNDF(0),
87  theNDFAvailable(false),
88  theTracks(tks),
89  theCovMapAvailable(false),
90  withPrior(false),
91  theValid(true),
92  vertexIs4D(false) {}
bool theCovMapAvailable
AlgebraicVector3 weightTimesPosition() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [4/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint priorPos,
const GlobalError priorErr,
const AlgebraicVector3 weightTimesPosition,
const GlobalWeight posWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 241 of file CachingVertex.cc.

247  : theVertexState(weightTimesPosition, posWeight),
248  theChiSquared(totalChiSq),
249  theNDF(0),
250  theNDFAvailable(false),
251  theTracks(tks),
252  theCovMapAvailable(false),
253  thePriorVertexState(priorPos, priorErr),
254  withPrior(true),
255  theValid(true) {}
bool theCovMapAvailable
VertexState thePriorVertexState
AlgebraicVector3 weightTimesPosition() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [5/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint pos,
const double  time,
const GlobalError posTimeErr,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 28 of file CachingVertex.cc.

33  : theVertexState(pos, time, posTimeErr),
34  theChiSquared(totalChiSq),
35  theNDF(0),
36  theNDFAvailable(false),
37  theTracks(tks),
38  theCovMapAvailable(false),
39  withPrior(false),
40  theValid(true),
41  vertexIs4D(true)
42 
43 {}
bool theCovMapAvailable
double time() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [6/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint pos,
const double  time,
const GlobalWeight posTimeWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 63 of file CachingVertex.cc.

68  : theVertexState(pos, time, posTimeWeight),
69  theChiSquared(totalChiSq),
70  theNDF(0),
71  theNDFAvailable(false),
72  theTracks(tks),
73  theCovMapAvailable(false),
74  withPrior(false),
75  theValid(true),
76  vertexIs4D(true) {}
bool theCovMapAvailable
double time() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [7/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const AlgebraicVector4 weightTimesPosition,
const GlobalWeight posTimeWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 96 of file CachingVertex.cc.

100  : theVertexState(weightTimesPosition, posWeight),
101  theChiSquared(totalChiSq),
102  theNDF(0),
103  theNDFAvailable(false),
104  theTracks(tks),
105  theCovMapAvailable(false),
106  withPrior(false),
107  theValid(true),
108  vertexIs4D(false) {}
bool theCovMapAvailable
AlgebraicVector3 weightTimesPosition() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [8/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint priorPos,
const GlobalError priorErr,
const AlgebraicVector4 weightTimesPosition,
const GlobalWeight posWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 259 of file CachingVertex.cc.

265  : theVertexState(weightTimesPosition, posWeight),
266  theChiSquared(totalChiSq),
267  theNDF(0),
268  theNDFAvailable(false),
269  theTracks(tks),
270  theCovMapAvailable(false),
271  thePriorVertexState(priorPos, priorErr),
272  withPrior(true),
273  theValid(true) {}
bool theCovMapAvailable
VertexState thePriorVertexState
AlgebraicVector3 weightTimesPosition() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [9/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint priorPos,
const GlobalError priorErr,
const GlobalPoint pos,
const GlobalError posErr,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 161 of file CachingVertex.cc.

167  : theVertexState(pos, posErr),
168  theChiSquared(totalChiSq),
169  theNDF(0),
170  theNDFAvailable(false),
171  theTracks(tks),
172  theCovMapAvailable(false),
173  thePriorVertexState(priorPos, priorErr),
174  withPrior(true),
175  theValid(true),
176  vertexIs4D(false) {}
bool theCovMapAvailable
VertexState thePriorVertexState
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [10/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint priorPos,
const double  priorTime,
const GlobalError priorErr,
const GlobalPoint pos,
const double  time,
const GlobalError posErr,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 180 of file CachingVertex.cc.

188  : theVertexState(pos, time, posErr),
189  theChiSquared(totalChiSq),
190  theNDF(0),
191  theNDFAvailable(false),
192  theTracks(tks),
193  theCovMapAvailable(false),
194  thePriorVertexState(priorPos, priorTime, priorErr),
195  withPrior(true),
196  theValid(true),
197  vertexIs4D(true) {}
bool theCovMapAvailable
VertexState thePriorVertexState
double time() const
double priorTime() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [11/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint priorPos,
const GlobalError priorErr,
const GlobalPoint pos,
const GlobalWeight posWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 201 of file CachingVertex.cc.

207  : theVertexState(pos, posWeight),
208  theChiSquared(totalChiSq),
209  theNDF(0),
210  theNDFAvailable(false),
211  theTracks(tks),
212  theCovMapAvailable(false),
213  thePriorVertexState(priorPos, priorErr),
214  withPrior(true),
215  theValid(true),
216  vertexIs4D(false) {}
bool theCovMapAvailable
VertexState thePriorVertexState
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [12/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint priorPos,
const double  priorTime,
const GlobalError priorErr,
const GlobalPoint pos,
const double  time,
const GlobalWeight posWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 220 of file CachingVertex.cc.

228  : theVertexState(pos, priorTime, posWeight),
229  theChiSquared(totalChiSq),
230  theNDF(0),
231  theNDFAvailable(false),
232  theTracks(tks),
233  theCovMapAvailable(false),
234  thePriorVertexState(priorPos, priorTime, priorErr),
235  withPrior(true),
236  theValid(true),
237  vertexIs4D(true) {}
bool theCovMapAvailable
VertexState thePriorVertexState
double priorTime() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState

◆ CachingVertex() [13/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const VertexState aVertexState,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 111 of file CachingVertex.cc.

114  : theVertexState(aVertexState),
115  theChiSquared(totalChiSq),
116  theNDF(0),
117  theNDFAvailable(false),
118  theTracks(tks),
119  theCovMapAvailable(false),
120  withPrior(false),
121  theValid(true),
122  vertexIs4D(aVertexState.is4D()) {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks
bool is4D() const
Definition: VertexState.h:95
VertexState theVertexState

◆ CachingVertex() [14/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const VertexState priorVertexState,
const VertexState aVertexState,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 144 of file CachingVertex.cc.

148  : theVertexState(aVertexState),
149  theChiSquared(totalChiSq),
150  theNDF(0),
151  theNDFAvailable(false),
152  theTracks(tks),
153  theCovMapAvailable(false),
155  withPrior(true),
156  theValid(true),
157  vertexIs4D(priorVertexState.is4D() && aVertexState.is4D()) {}
bool theCovMapAvailable
VertexState thePriorVertexState
VertexState const & priorVertexState() const
std::vector< RefCountedVertexTrack > theTracks
bool is4D() const
Definition: VertexState.h:95
VertexState theVertexState

◆ CachingVertex() [15/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const VertexState aVertexState,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq,
const TrackToTrackMap covMap 
)

Definition at line 125 of file CachingVertex.cc.

129  : theVertexState(aVertexState),
130  theChiSquared(totalChiSq),
131  theNDF(0),
132  theNDFAvailable(false),
133  theTracks(tks),
134  theCovMap(covMap),
135  theCovMapAvailable(true),
136  withPrior(false),
137  theValid(true),
138  vertexIs4D(aVertexState.is4D()) {
139  if (theCovMap.empty())
140  theCovMapAvailable = false;
141 }
bool theCovMapAvailable
TrackToTrackMap theCovMap
std::vector< RefCountedVertexTrack > theTracks
bool is4D() const
Definition: VertexState.h:95
VertexState theVertexState

◆ CachingVertex() [16/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( const VertexState priorVertexState,
const VertexState aVertexState,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq,
const TrackToTrackMap covMap 
)

Definition at line 276 of file CachingVertex.cc.

281  : theVertexState(aVertexState),
282  theChiSquared(totalChiSq),
283  theNDF(0),
284  theNDFAvailable(false),
285  theTracks(tks),
286  theCovMap(covMap),
287  theCovMapAvailable(true),
289  withPrior(true),
290  theValid(true),
291  vertexIs4D(priorVertexState.is4D() && aVertexState.is4D()) {
292  if (theCovMap.empty())
293  theCovMapAvailable = false;
294 }
bool theCovMapAvailable
VertexState thePriorVertexState
TrackToTrackMap theCovMap
VertexState const & priorVertexState() const
std::vector< RefCountedVertexTrack > theTracks
bool is4D() const
Definition: VertexState.h:95
VertexState theVertexState

◆ CachingVertex() [17/17]

template<unsigned int N>
CachingVertex< N >::CachingVertex ( )

Constructor for invalid CachingVertex

Definition at line 297 of file CachingVertex.cc.

298  : theChiSquared(-1),
299  theNDF(0),
300  theNDFAvailable(false),
301  theTracks(),
302  theCovMapAvailable(false),
303  withPrior(false),
304  theValid(false),
305  vertexIs4D(false) {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks

Member Function Documentation

◆ computeNDF()

template<unsigned int N>
void CachingVertex< N >::computeNDF ( ) const
private

Definition at line 355 of file CachingVertex.cc.

355  {
356  theNDF = 0;
357  for (typename std::vector<RefCountedVertexTrack>::const_iterator itk = theTracks.begin(); itk != theTracks.end();
358  ++itk) {
359  theNDF += (**itk).weight(); // adds up weights
360  }
361  theNDF *= 2.; // times 2df for each track
362  const double adjust = (vertexIs4D ? 4 : 3); // ndf adjust is 3 or 4
363  if (!withPrior)
364  theNDF -= adjust;
365  theNDFAvailable = true;
366 }
std::vector< RefCountedVertexTrack > theTracks

◆ degreesOfFreedom()

template<unsigned int N>
float CachingVertex< N >::degreesOfFreedom ( ) const

Definition at line 348 of file CachingVertex.cc.

Referenced by DisappearingMuonsSkimming::filter().

348  {
349  if (!theNDFAvailable)
350  computeNDF();
351  return theNDF;
352 }
void computeNDF() const

◆ error()

template<unsigned int N>
GlobalError CachingVertex< N >::error ( ) const

Definition at line 318 of file CachingVertex.cc.

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag(), and reco::GhostTrackVertexFinder::vertexCompat().

318  {
319  return theVertexState.error();
320 }
GlobalError error() const
Definition: VertexState.h:64
VertexState theVertexState

◆ error4D()

template<unsigned int N>
GlobalError CachingVertex< N >::error4D ( ) const

Definition at line 323 of file CachingVertex.cc.

323  {
324  return theVertexState.error4D();
325 }
GlobalError error4D() const
Definition: VertexState.h:67
VertexState theVertexState

◆ hasPrior()

template<unsigned int N>
bool CachingVertex< N >::hasPrior ( ) const
inline

◆ is4D()

template<unsigned int N>
bool CachingVertex< N >::is4D ( ) const
inline

Definition at line 155 of file CachingVertex.h.

155 { return vertexIs4D; }

◆ isValid()

template<unsigned int N>
bool CachingVertex< N >::isValid ( void  ) const
inline

◆ operator TransientVertex()

template<unsigned int N>
CachingVertex< N >::operator TransientVertex ( ) const

Definition at line 404 of file CachingVertex.cc.

404  {
405  //If the vertex is invalid, return an invalid TV !
406  if (!isValid())
407  return TransientVertex();
408 
409  typedef std::map<reco::TransientTrack, float> TransientTrackToFloatMap;
410 
411  // Construct Track vector
412  std::vector<reco::TransientTrack> ttVect;
413  ttVect.reserve(theTracks.size());
414  std::vector<reco::TransientTrack> refTTVect;
415  TransientTrackToFloatMap theWeightMap;
416  TTtoTTmap ttCovMap;
417  // float theMinWeight = 0.5;
418 
419  for (typename std::vector<RefCountedVertexTrack>::const_iterator i = theTracks.begin(); i != theTracks.end(); ++i) {
420  // discard tracks with too low weight
421  // if ((**i).weight() < theMinWeight) continue;
422 
423  reco::TransientTrack t1((**i).linearizedTrack()->track());
424  ttVect.push_back(t1);
425  //Fill in the weight map
426  theWeightMap[t1] = (**i).weight();
427 
428  //Fill in the tk-to-tk covariance map
429  if (theCovMapAvailable) {
430  for (typename std::vector<RefCountedVertexTrack>::const_iterator j = (i + 1); j != theTracks.end(); ++j) {
431  reco::TransientTrack t2((**j).linearizedTrack()->track());
432  ttCovMap[t1][t2] = tkToTkCovariance(*i, *j);
433  }
434  }
435  if ((**i).refittedStateAvailable()) {
436  refTTVect.push_back((**i).refittedState()->transientTrack());
437  }
438  }
439  TransientVertex tv;
440  if (withPrior) {
442  } else {
444  }
445  tv.weightMap(theWeightMap);
446  if (theCovMapAvailable)
447  tv.tkToTkCovariance(ttCovMap);
448  if (!refTTVect.empty())
449  tv.refittedTracks(refTTVect);
450  return tv;
451 }
bool theCovMapAvailable
VertexState const & vertexState() const
std::map< reco::TransientTrack, TTmap > TTtoTTmap
Definition: TTtoTTmap.h:12
TransientTrackToFloatMap weightMap() const
float totalChiSquared() const
VertexState const & priorVertexState() const
std::vector< RefCountedVertexTrack > theTracks
AlgebraicMatrix33 tkToTkCovariance(const reco::TransientTrack &t1, const reco::TransientTrack &t2) const
bool isValid() const
AlgebraicMatrixMM tkToTkCovariance(const RefCountedVertexTrack t1, const RefCountedVertexTrack t2) const
float degreesOfFreedom() const
std::vector< reco::TransientTrack > const & refittedTracks() const

◆ position()

template<unsigned int N>
GlobalPoint CachingVertex< N >::position ( ) const

◆ priorError()

template<unsigned int N>
GlobalError CachingVertex< N >::priorError ( ) const
inline

Definition at line 151 of file CachingVertex.h.

Referenced by GsfVertexUpdator::add(), and GsfVertexMerger::merge().

151 { return priorVertexState().error(); }
VertexState const & priorVertexState() const
GlobalError error() const
Definition: VertexState.h:64

◆ priorError4D()

template<unsigned int N>
GlobalError CachingVertex< N >::priorError4D ( ) const
inline

Definition at line 152 of file CachingVertex.h.

152 { return priorVertexState().error4D(); }
VertexState const & priorVertexState() const
GlobalError error4D() const
Definition: VertexState.h:67

◆ priorPosition()

template<unsigned int N>
GlobalPoint CachingVertex< N >::priorPosition ( ) const
inline

Definition at line 149 of file CachingVertex.h.

Referenced by GsfVertexUpdator::add(), and GsfVertexMerger::merge().

149 { return priorVertexState().position(); }
VertexState const & priorVertexState() const
GlobalPoint position() const
Definition: VertexState.h:62

◆ priorTime()

template<unsigned int N>
double CachingVertex< N >::priorTime ( ) const
inline

Definition at line 150 of file CachingVertex.h.

150 { return priorVertexState().time(); }
VertexState const & priorVertexState() const
double time() const
Definition: VertexState.h:73

◆ priorVertexState()

template<unsigned int N>
VertexState const& CachingVertex< N >::priorVertexState ( ) const
inline

◆ time()

template<unsigned int N>
double CachingVertex< N >::time ( ) const

Definition at line 313 of file CachingVertex.cc.

313  {
314  return theVertexState.time();
315 }
double time() const
Definition: VertexState.h:73
VertexState theVertexState

◆ tkToTkCovariance()

template<unsigned int N>
CachingVertex< N >::AlgebraicMatrixMM CachingVertex< N >::tkToTkCovariance ( const RefCountedVertexTrack  t1,
const RefCountedVertexTrack  t2 
) const

Track to track covariance

Definition at line 369 of file CachingVertex.cc.

370  {
372  throw VertexException("CachingVertex::TkTkCovariance requested before been calculated");
373  } else {
376  bool transp = false;
377  if (t1 < t2) {
378  tr1 = t1;
379  tr2 = t2;
380  } else {
381  tr1 = t2;
382  tr2 = t1;
383  transp = true;
384  }
385  typename TrackToTrackMap::const_iterator it = theCovMap.find(tr1);
386  if (it != theCovMap.end()) {
387  const TrackMap& tm = it->second;
388  typename TrackMap::const_iterator nit = tm.find(tr2);
389  if (nit != tm.end()) {
390  if (transp)
391  return (ROOT::Math::Transpose(nit->second));
392  else
393  return (nit->second);
394  } else {
395  throw VertexException("CachingVertex::requested TkTkCovariance does not exist");
396  }
397  } else {
398  throw VertexException("CachingVertex::requested TkTkCovariance does not exist");
399  }
400  }
401 }
Common base class.
TrackToTrackMap theCovMap
ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
Definition: CachingVertex.h:24
bool tkToTkCovarianceIsAvailable() const
std::map< RefCountedVertexTrack, AlgebraicMatrixMM > TrackMap
Definition: CachingVertex.h:27

◆ tkToTkCovarianceIsAvailable()

template<unsigned int N>
bool CachingVertex< N >::tkToTkCovarianceIsAvailable ( ) const
inline

Definition at line 165 of file CachingVertex.h.

165 { return theCovMapAvailable; }
bool theCovMapAvailable

◆ totalChiSquared()

template<unsigned int N>
float CachingVertex< N >::totalChiSquared ( ) const
inline

◆ tracks()

template<unsigned int N>
std::vector<RefCountedVertexTrack> CachingVertex< N >::tracks ( void  ) const
inline

Definition at line 147 of file CachingVertex.h.

Referenced by GsfVertexUpdator::add(), GsfVertexMerger::merge(), reco::GhostTrackVertexFinder::mergeVertices(), and KalmanVertexUpdator< 5 >::update().

147 { return theTracks; }
std::vector< RefCountedVertexTrack > theTracks

◆ tracksRef()

template<unsigned int N>
const std::vector<RefCountedVertexTrack>& CachingVertex< N >::tracksRef ( ) const
inline

Definition at line 148 of file CachingVertex.h.

148 { return theTracks; }
std::vector< RefCountedVertexTrack > theTracks

◆ vertexState()

template<unsigned int N>
VertexState const& CachingVertex< N >::vertexState ( ) const
inline

◆ weight()

template<unsigned int N>
GlobalWeight CachingVertex< N >::weight ( ) const

Definition at line 328 of file CachingVertex.cc.

328  {
329  return theVertexState.weight();
330 }
GlobalWeight weight() const
Definition: VertexState.h:69
VertexState theVertexState

◆ weight4D()

template<unsigned int N>
GlobalWeight CachingVertex< N >::weight4D ( ) const

Definition at line 333 of file CachingVertex.cc.

333  {
334  return theVertexState.weight4D();
335 }
GlobalWeight weight4D() const
Definition: VertexState.h:71
VertexState theVertexState

◆ weightTimesPosition()

template<unsigned int N>
AlgebraicVector3 CachingVertex< N >::weightTimesPosition ( ) const

Definition at line 338 of file CachingVertex.cc.

338  {
340 }
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:77
VertexState theVertexState

◆ weightTimesPosition4D()

template<unsigned int N>
AlgebraicVector4 CachingVertex< N >::weightTimesPosition4D ( ) const

Definition at line 343 of file CachingVertex.cc.

343  {
345 }
AlgebraicVector4 weightTimesPosition4D() const
Definition: VertexState.h:79
VertexState theVertexState

Member Data Documentation

◆ theChiSquared

template<unsigned int N>
float CachingVertex< N >::theChiSquared
private

Definition at line 173 of file CachingVertex.h.

Referenced by CachingVertex< 5 >::totalChiSquared().

◆ theCovMap

template<unsigned int N>
TrackToTrackMap CachingVertex< N >::theCovMap
private

Definition at line 177 of file CachingVertex.h.

Referenced by CachingVertex< 5 >::CachingVertex().

◆ theCovMapAvailable

template<unsigned int N>
bool CachingVertex< N >::theCovMapAvailable
private

◆ theNDF

template<unsigned int N>
float CachingVertex< N >::theNDF
mutableprivate

Definition at line 174 of file CachingVertex.h.

◆ theNDFAvailable

template<unsigned int N>
bool CachingVertex< N >::theNDFAvailable
mutableprivate

Definition at line 175 of file CachingVertex.h.

◆ thePriorVertexState

template<unsigned int N>
VertexState CachingVertex< N >::thePriorVertexState
mutableprivate

Definition at line 179 of file CachingVertex.h.

Referenced by CachingVertex< 5 >::priorVertexState().

◆ theTracks

template<unsigned int N>
std::vector<RefCountedVertexTrack> CachingVertex< N >::theTracks
private

Definition at line 176 of file CachingVertex.h.

Referenced by CachingVertex< 5 >::tracks(), and CachingVertex< 5 >::tracksRef().

◆ theValid

template<unsigned int N>
bool CachingVertex< N >::theValid
private

Definition at line 182 of file CachingVertex.h.

Referenced by CachingVertex< 5 >::isValid().

◆ theVertexState

template<unsigned int N>
VertexState CachingVertex< N >::theVertexState
mutableprivate

Definition at line 172 of file CachingVertex.h.

Referenced by CachingVertex< 5 >::vertexState().

◆ vertexIs4D

template<unsigned int N>
bool CachingVertex< N >::vertexIs4D
private

Definition at line 183 of file CachingVertex.h.

Referenced by CachingVertex< 5 >::is4D().

◆ withPrior

template<unsigned int N>
bool CachingVertex< N >::withPrior
private

Definition at line 180 of file CachingVertex.h.

Referenced by CachingVertex< 5 >::hasPrior().