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 25 of file CachingVertex.h.

Member Typedef Documentation

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 31 of file CachingVertex.h.

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

Definition at line 30 of file CachingVertex.h.

Definition at line 29 of file CachingVertex.h.

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

Definition at line 32 of file CachingVertex.h.

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

Definition at line 33 of file CachingVertex.h.

Constructor & Destructor Documentation

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), theNDF(0), theNDFAvailable(false),
16  theTracks(tks), theCovMapAvailable(false), withPrior(false),
17  theValid(true), vertexIs4D(false)
18 
19 {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState
template<unsigned int N>
CachingVertex< N >::CachingVertex ( const GlobalPoint pos,
const GlobalWeight posWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 38 of file CachingVertex.cc.

42  : theVertexState(pos, posWeight),
43  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
44  theTracks(tks), theCovMapAvailable(false), withPrior(false),
45  theValid(true), vertexIs4D(false)
46 {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState
template<unsigned int N>
CachingVertex< N >::CachingVertex ( const AlgebraicVector3 weightTimesPosition,
const GlobalWeight posWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 64 of file CachingVertex.cc.

68  : theVertexState(weightTimesPosition, posWeight),
69  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
70  theTracks(tks), theCovMapAvailable(false), withPrior(false),
71  theValid(true), vertexIs4D(false)
72 {}
bool theCovMapAvailable
AlgebraicVector3 weightTimesPosition() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState
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 190 of file CachingVertex.cc.

196  : theVertexState(weightTimesPosition, posWeight),
197  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
198  theTracks(tks), theCovMapAvailable(false),
199  thePriorVertexState(priorPos, priorErr), withPrior(true), theValid(true)
200 {}
bool theCovMapAvailable
VertexState thePriorVertexState
AlgebraicVector3 weightTimesPosition() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState
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 23 of file CachingVertex.cc.

28  : theVertexState(pos, time, posTimeErr),
29  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
30  theTracks(tks), theCovMapAvailable(false), withPrior(false),
31  theValid(true), vertexIs4D(true)
32 
33 {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks
double time() const
VertexState theVertexState
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 50 of file CachingVertex.cc.

55  : theVertexState(pos, time, posTimeWeight),
56  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
57  theTracks(tks), theCovMapAvailable(false), withPrior(false),
58  theValid(true), vertexIs4D(true)
59 {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks
double time() const
VertexState theVertexState
template<unsigned int N>
CachingVertex< N >::CachingVertex ( const AlgebraicVector4 weightTimesPosition,
const GlobalWeight posTimeWeight,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 76 of file CachingVertex.cc.

80  : theVertexState(weightTimesPosition, posWeight),
81  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
82  theTracks(tks), theCovMapAvailable(false), withPrior(false),
83  theValid(true), vertexIs4D(false)
84 {}
bool theCovMapAvailable
AlgebraicVector3 weightTimesPosition() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState
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 204 of file CachingVertex.cc.

210  : theVertexState(weightTimesPosition, posWeight),
211  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
212  theTracks(tks), theCovMapAvailable(false),
213  thePriorVertexState(priorPos, priorErr), withPrior(true), theValid(true)
214 {}
bool theCovMapAvailable
VertexState thePriorVertexState
AlgebraicVector3 weightTimesPosition() const
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState
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 126 of file CachingVertex.cc.

132  : theVertexState(pos, posErr),
133  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
134  theTracks(tks), theCovMapAvailable(false),
135  thePriorVertexState(priorPos, priorErr), withPrior(true), theValid(true), vertexIs4D(false)
136 {}
bool theCovMapAvailable
VertexState thePriorVertexState
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState
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 140 of file CachingVertex.cc.

148  : theVertexState(pos, time,posErr),
149  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
150  theTracks(tks), theCovMapAvailable(false),
151  thePriorVertexState(priorPos, priorTime, priorErr), withPrior(true),
152  theValid(true), vertexIs4D(true)
153 {}
bool theCovMapAvailable
VertexState thePriorVertexState
std::vector< RefCountedVertexTrack > theTracks
double priorTime() const
double time() const
VertexState theVertexState
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 158 of file CachingVertex.cc.

164  : theVertexState(pos, posWeight),
165  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
166  theTracks(tks), theCovMapAvailable(false),
167  thePriorVertexState(priorPos, priorErr), withPrior(true), theValid(true), vertexIs4D(false)
168 {}
bool theCovMapAvailable
VertexState thePriorVertexState
std::vector< RefCountedVertexTrack > theTracks
VertexState theVertexState
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 172 of file CachingVertex.cc.

180  : theVertexState(pos, priorTime, posWeight),
181  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
182  theTracks(tks), theCovMapAvailable(false),
183  thePriorVertexState(priorPos, priorTime, priorErr), withPrior(true),
184  theValid(true), vertexIs4D(true)
185 {}
bool theCovMapAvailable
VertexState thePriorVertexState
std::vector< RefCountedVertexTrack > theTracks
double priorTime() const
VertexState theVertexState
template<unsigned int N>
CachingVertex< N >::CachingVertex ( const VertexState aVertexState,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 87 of file CachingVertex.cc.

90  : theVertexState(aVertexState),
91  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
92  theTracks(tks), theCovMapAvailable(false), withPrior(false),
93  theValid(true),
94  vertexIs4D( aVertexState.is4D() )
95 {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks
bool is4D() const
Definition: VertexState.h:133
VertexState theVertexState
template<unsigned int N>
CachingVertex< N >::CachingVertex ( const VertexState priorVertexState,
const VertexState aVertexState,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq 
)

Definition at line 113 of file CachingVertex.cc.

117  : theVertexState(aVertexState), theChiSquared(totalChiSq),
118  theNDF(0), theNDFAvailable(false), theTracks(tks),
119  theCovMapAvailable(false), thePriorVertexState(priorVertexState),
120  withPrior(true), theValid(true),
121  vertexIs4D( priorVertexState.is4D() && aVertexState.is4D() )
122 {}
bool theCovMapAvailable
VertexState thePriorVertexState
std::vector< RefCountedVertexTrack > theTracks
bool is4D() const
Definition: VertexState.h:133
VertexState theVertexState
template<unsigned int N>
CachingVertex< N >::CachingVertex ( const VertexState aVertexState,
const std::vector< RefCountedVertexTrack > &  tks,
float  totalChiSq,
const TrackToTrackMap covMap 
)

Definition at line 99 of file CachingVertex.cc.

References CachingVertex< N >::theCovMap, and CachingVertex< N >::theCovMapAvailable.

103  : theVertexState(aVertexState),
104  theChiSquared(totalChiSq), theNDF(0), theNDFAvailable(false),
105  theTracks(tks), theCovMap(covMap), theCovMapAvailable(true),
106  withPrior(false), theValid(true),
107  vertexIs4D( aVertexState.is4D() )
108 {
109  if (theCovMap.empty()) theCovMapAvailable = false;
110 }
bool theCovMapAvailable
TrackToTrackMap theCovMap
std::vector< RefCountedVertexTrack > theTracks
bool is4D() const
Definition: VertexState.h:133
VertexState theVertexState
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 218 of file CachingVertex.cc.

References CachingVertex< N >::theCovMap, and CachingVertex< N >::theCovMapAvailable.

223  : theVertexState(aVertexState), theChiSquared(totalChiSq),
224  theNDF(0), theNDFAvailable(false), theTracks(tks),
225  theCovMap(covMap), theCovMapAvailable(true),
226  thePriorVertexState(priorVertexState), withPrior(true), theValid(true),
227  vertexIs4D( priorVertexState.is4D() && aVertexState.is4D() )
228 {
229  if (theCovMap.empty()) theCovMapAvailable = false;
230 }
bool theCovMapAvailable
VertexState thePriorVertexState
TrackToTrackMap theCovMap
std::vector< RefCountedVertexTrack > theTracks
bool is4D() const
Definition: VertexState.h:133
VertexState theVertexState
template<unsigned int N>
CachingVertex< N >::CachingVertex ( )

Constructor for invalid CachingVertex

Definition at line 233 of file CachingVertex.cc.

234  : theChiSquared(-1), theNDF(0), theNDFAvailable(false), theTracks(),
235  theCovMapAvailable(false), withPrior(false),
236  theValid(false), vertexIs4D(false)
237 {}
bool theCovMapAvailable
std::vector< RefCountedVertexTrack > theTracks

Member Function Documentation

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

Definition at line 298 of file CachingVertex.cc.

References CachingVertex< N >::theNDF, CachingVertex< N >::theNDFAvailable, CachingVertex< N >::theTracks, CachingVertex< N >::vertexIs4D, and CachingVertex< N >::withPrior.

Referenced by CachingVertex< N >::degreesOfFreedom(), and CachingVertex< 5 >::tkToTkCovarianceIsAvailable().

299 {
300  theNDF = 0;
301  for (typename std::vector<RefCountedVertexTrack>::const_iterator itk = theTracks.begin();
302  itk != theTracks.end(); ++itk) {
303  theNDF += (**itk).weight(); // adds up weights
304  }
305  theNDF *= 2.; // times 2df for each track
306  const double adjust = ( vertexIs4D ? 4 : 3 ); // ndf adjust is 3 or 4
307  if (!withPrior) theNDF -= adjust;
308  theNDFAvailable = true;
309 }
std::vector< RefCountedVertexTrack > theTracks
template<unsigned int N>
float CachingVertex< N >::degreesOfFreedom ( ) const
template<unsigned int N>
GlobalError CachingVertex< N >::error ( ) const
template<unsigned int N>
GlobalError CachingVertex< N >::error4D ( ) const

Definition at line 258 of file CachingVertex.cc.

References VertexState::error4D(), and CachingVertex< N >::theVertexState.

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

259 {
260  return theVertexState.error4D();
261 }
GlobalError error4D() const
Definition: VertexState.h:80
VertexState theVertexState
template<unsigned int N>
bool CachingVertex< N >::hasPrior ( ) const
inline
template<unsigned int N>
bool CachingVertex< N >::is4D ( ) const
inline

Definition at line 132 of file CachingVertex.h.

132 { return vertexIs4D; }
template<unsigned int N>
bool CachingVertex< N >::isValid ( void  ) const
inline
template<unsigned int N>
CachingVertex< N >::operator TransientVertex ( ) const

Definition at line 352 of file CachingVertex.cc.

References CachingVertex< N >::degreesOfFreedom(), mps_fire::i, CachingVertex< N >::isValid(), CachingVertex< N >::priorVertexState(), TransientVertex::refittedTracks(), reco::t2, CachingVertex< N >::theCovMapAvailable, CachingVertex< N >::theTracks, CachingVertex< N >::tkToTkCovariance(), TransientVertex::tkToTkCovariance(), CachingVertex< N >::totalChiSquared(), CachingVertex< N >::vertexState(), TransientVertex::weightMap(), and CachingVertex< N >::withPrior.

353 {
354  //If the vertex is invalid, return an invalid TV !
355  if (!isValid()) return TransientVertex();
356 
357  typedef std::map<reco::TransientTrack, float> TransientTrackToFloatMap;
358 
359 // Construct Track vector
360  std::vector<reco::TransientTrack> ttVect;
361  ttVect.reserve(theTracks.size());
362  std::vector<reco::TransientTrack> refTTVect;
363  TransientTrackToFloatMap theWeightMap;
364  TTtoTTmap ttCovMap;
365  // float theMinWeight = 0.5;
366 
367  for (typename std::vector<RefCountedVertexTrack>::const_iterator i = theTracks.begin();
368  i != theTracks.end(); ++i) {
369  // discard tracks with too low weight
370  // if ((**i).weight() < theMinWeight) continue;
371 
372  reco::TransientTrack t1((**i).linearizedTrack()->track());
373  ttVect.push_back(t1);
374  //Fill in the weight map
375  theWeightMap[t1] = (**i).weight();
376 
377  //Fill in the tk-to-tk covariance map
378  if (theCovMapAvailable) {
379  for (typename std::vector<RefCountedVertexTrack>::const_iterator j = (i+1);
380  j != theTracks.end(); ++j) {
381  reco::TransientTrack t2((**j).linearizedTrack()->track());
382  ttCovMap[t1][t2] = tkToTkCovariance(*i, *j);
383  }
384  }
385  if ((**i).refittedStateAvailable()) {
386  refTTVect.push_back( (**i).refittedState()->transientTrack()) ;
387  }
388  }
389  TransientVertex tv;
390  if (withPrior) {
392  } else {
394  }
395  tv.weightMap(theWeightMap);
396  if (theCovMapAvailable) tv.tkToTkCovariance(ttCovMap);
397  if (!refTTVect.empty()) tv.refittedTracks(refTTVect);
398  return tv;
399 }
bool theCovMapAvailable
VertexState const & vertexState() const
std::map< reco::TransientTrack, TTmap > TTtoTTmap
Definition: TTtoTTmap.h:12
auto const T2 &decltype(t1.eta()) t2
Definition: deltaR.h:16
float totalChiSquared() const
float degreesOfFreedom() const
std::vector< RefCountedVertexTrack > theTracks
VertexState const & priorVertexState() const
AlgebraicMatrixMM tkToTkCovariance(const RefCountedVertexTrack t1, const RefCountedVertexTrack t2) const
bool isValid() const
std::vector< reco::TransientTrack > const & refittedTracks() const
AlgebraicMatrix33 tkToTkCovariance(const reco::TransientTrack &t1, const reco::TransientTrack &t2) const
TransientTrackToFloatMap weightMap() const
template<unsigned int N>
GlobalPoint CachingVertex< N >::position ( ) const
template<unsigned int N>
GlobalError CachingVertex< N >::priorError ( ) const
inline

Definition at line 128 of file CachingVertex.h.

Referenced by GsfVertexUpdator::add(), GsfVertexMerger::merge(), and SequentialVertexSmoother< N >::smooth().

128 {return priorVertexState().error();}
VertexState const & priorVertexState() const
GlobalError error() const
Definition: VertexState.h:74
template<unsigned int N>
GlobalError CachingVertex< N >::priorError4D ( ) const
inline

Definition at line 129 of file CachingVertex.h.

129 {return priorVertexState().error4D();}
GlobalError error4D() const
Definition: VertexState.h:80
VertexState const & priorVertexState() const
template<unsigned int N>
GlobalPoint CachingVertex< N >::priorPosition ( ) const
inline

Definition at line 126 of file CachingVertex.h.

Referenced by GsfVertexUpdator::add(), GsfVertexMerger::merge(), and SequentialVertexSmoother< N >::smooth().

126 {return priorVertexState().position();}
GlobalPoint position() const
Definition: VertexState.h:69
VertexState const & priorVertexState() const
template<unsigned int N>
double CachingVertex< N >::priorTime ( ) const
inline

Definition at line 127 of file CachingVertex.h.

127 { return priorVertexState().time(); }
double time() const
Definition: VertexState.h:95
VertexState const & priorVertexState() const
template<unsigned int N>
VertexState const& CachingVertex< N >::priorVertexState ( ) const
inline
template<unsigned int N>
double CachingVertex< N >::time ( ) const

Definition at line 246 of file CachingVertex.cc.

References CachingVertex< N >::theVertexState, and VertexState::time().

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

247 {
248  return theVertexState.time();
249 }
double time() const
Definition: VertexState.h:95
VertexState theVertexState
template<unsigned int N>
CachingVertex< N >::AlgebraicMatrixMM CachingVertex< N >::tkToTkCovariance ( const RefCountedVertexTrack  t1,
const RefCountedVertexTrack  t2 
) const

Track to track covariance

Definition at line 314 of file CachingVertex.cc.

References reco::t2, CachingVertex< N >::theCovMap, and CachingVertex< N >::tkToTkCovarianceIsAvailable().

Referenced by FinalTreeBuilder::momentumPart(), CachingVertex< N >::operator TransientVertex(), CachingVertex< 5 >::totalChiSquared(), and InvariantMassFromVertex::uncertainty().

316 {
318  throw VertexException("CachingVertex::TkTkCovariance requested before been calculated");
319  }
320  else {
323  bool transp = false;
324  if(t1 < t2) {
325  tr1 = t1;
326  tr2 = t2;
327  }
328  else {
329  tr1 = t2;
330  tr2 = t1;
331  transp = true;
332  }
333  typename TrackToTrackMap::const_iterator it = theCovMap.find(tr1);
334  if (it != theCovMap.end()) {
335  const TrackMap & tm = it->second;
336  typename TrackMap::const_iterator nit = tm.find(tr2);
337  if (nit != tm.end()) {
338  if (transp) return( ROOT::Math::Transpose(nit->second) );
339  else return( nit->second);
340  }
341  else {
342  throw VertexException("CachingVertex::requested TkTkCovariance does not exist");
343  }
344  }
345  else {
346  throw VertexException("CachingVertex::requested TkTkCovariance does not exist");
347  }
348  }
349 }
Common base class.
TrackToTrackMap theCovMap
ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
Definition: CachingVertex.h:29
auto const T2 &decltype(t1.eta()) t2
Definition: deltaR.h:16
std::map< RefCountedVertexTrack, AlgebraicMatrixMM > TrackMap
Definition: CachingVertex.h:32
bool tkToTkCovarianceIsAvailable() const
template<unsigned int N>
bool CachingVertex< N >::tkToTkCovarianceIsAvailable ( ) const
inline
template<unsigned int N>
float CachingVertex< N >::totalChiSquared ( ) const
inline
template<unsigned int N>
std::vector<RefCountedVertexTrack> CachingVertex< N >::tracks ( void  ) const
inline
template<unsigned int N>
const std::vector<RefCountedVertexTrack>& CachingVertex< N >::tracksRef ( ) const
inline

Definition at line 125 of file CachingVertex.h.

Referenced by KalmanVertexTrackCompatibilityEstimator< N >::estimate().

125 { return theTracks; }
std::vector< RefCountedVertexTrack > theTracks
template<unsigned int N>
VertexState const& CachingVertex< N >::vertexState ( ) const
inline
template<unsigned int N>
GlobalWeight CachingVertex< N >::weight ( void  ) const

Definition at line 265 of file CachingVertex.cc.

References CachingVertex< N >::theVertexState, and VertexState::weight().

Referenced by CachingVertex< 5 >::priorVertexState(), and SequentialVertexSmoother< N >::smooth().

266 {
267  return theVertexState.weight();
268 }
GlobalWeight weight() const
Definition: VertexState.h:85
VertexState theVertexState
template<unsigned int N>
GlobalWeight CachingVertex< N >::weight4D ( ) const

Definition at line 271 of file CachingVertex.cc.

References CachingVertex< N >::theVertexState, and VertexState::weight4D().

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

272 {
273  return theVertexState.weight4D();
274 }
GlobalWeight weight4D() const
Definition: VertexState.h:90
VertexState theVertexState
template<unsigned int N>
AlgebraicVector3 CachingVertex< N >::weightTimesPosition ( ) const

Definition at line 278 of file CachingVertex.cc.

References CachingVertex< N >::theVertexState, and VertexState::weightTimesPosition().

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

279 {
281 }
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:103
VertexState theVertexState
template<unsigned int N>
AlgebraicVector4 CachingVertex< N >::weightTimesPosition4D ( ) const

Definition at line 284 of file CachingVertex.cc.

References CachingVertex< N >::theVertexState, and VertexState::weightTimesPosition4D().

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

285 {
287 }
AlgebraicVector4 weightTimesPosition4D() const
Definition: VertexState.h:108
VertexState theVertexState

Member Data Documentation

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

Definition at line 152 of file CachingVertex.h.

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

template<unsigned int N>
TrackToTrackMap CachingVertex< N >::theCovMap
private
template<unsigned int N>
bool CachingVertex< N >::theCovMapAvailable
private
template<unsigned int N>
float CachingVertex< N >::theNDF
mutableprivate
template<unsigned int N>
bool CachingVertex< N >::theNDFAvailable
mutableprivate
template<unsigned int N>
VertexState CachingVertex< N >::thePriorVertexState
mutableprivate

Definition at line 158 of file CachingVertex.h.

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

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

Definition at line 161 of file CachingVertex.h.

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

template<unsigned int N>
VertexState CachingVertex< N >::theVertexState
mutableprivate
template<unsigned int N>
bool CachingVertex< N >::vertexIs4D
private

Definition at line 162 of file CachingVertex.h.

Referenced by CachingVertex< N >::computeNDF(), and CachingVertex< 5 >::is4D().

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