CMS 3D CMS Logo

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

#include <SequentialVertexSmoother.h>

Inheritance diagram for SequentialVertexSmoother< N >:
VertexSmoother< N >

Public Types

typedef ReferenceCountingPointer< LinearizedTrackState< N > > RefCountedLinearizedTrackState
 
typedef ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
 
typedef ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
 

Public Member Functions

SequentialVertexSmoother< N > * clone () const override
 
 SequentialVertexSmoother (const VertexTrackUpdator< N > &vtu, const VertexSmoothedChiSquaredEstimator< N > &vse, const TrackToTrackCovCalculator< N > &covCalc)
 
 SequentialVertexSmoother (const SequentialVertexSmoother< N > &smoother)
 
CachingVertex< Nsmooth (const CachingVertex< N > &vertex) const override
 
const TrackToTrackCovCalculator< N > * trackToTrackCovCalculator () const
 
const VertexSmoothedChiSquaredEstimator< N > * vertexSmoothedChiSquaredEstimator () const
 
const VertexTrackUpdator< N > * vertexTrackUpdator () const
 
 ~SequentialVertexSmoother () override
 
- Public Member Functions inherited from VertexSmoother< N >
 VertexSmoother ()
 
virtual ~VertexSmoother ()
 

Private Attributes

TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
 
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator
 
VertexTrackUpdator< N > * theVertexTrackUpdator
 

Detailed Description

template<unsigned int N>
class SequentialVertexSmoother< N >

The class which handles the track-refit, smoothed chi**2 and track-to-track covariance matrix calculations.

Definition at line 15 of file SequentialVertexSmoother.h.

Member Typedef Documentation

◆ RefCountedLinearizedTrackState

Definition at line 19 of file SequentialVertexSmoother.h.

◆ RefCountedRefittedTrackState

Definition at line 17 of file SequentialVertexSmoother.h.

◆ RefCountedVertexTrack

Definition at line 18 of file SequentialVertexSmoother.h.

Constructor & Destructor Documentation

◆ SequentialVertexSmoother() [1/2]

template<unsigned int N>
SequentialVertexSmoother< N >::SequentialVertexSmoother ( const VertexTrackUpdator< N > &  vtu,
const VertexSmoothedChiSquaredEstimator< N > &  vse,
const TrackToTrackCovCalculator< N > &  covCalc 
)

The constructor, where the different components to be used are specified.

Parameters
vtuThe algorithm to refit the tracks with the vertex constraint (or smoothing)
vseThe algorithm to calculate the smoothed chi**2
Returns
covCalc The algorithm the track-to-track covariance matrix. If this option is not required, this pointer should be 0.

Definition at line 4 of file SequentialVertexSmoother.cc.

Referenced by SequentialVertexSmoother< 5 >::clone().

virtual VertexTrackUpdator * clone() const =0
TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
VertexTrackUpdator< N > * theVertexTrackUpdator
virtual TrackToTrackCovCalculator * clone() const =0
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator
virtual VertexSmoothedChiSquaredEstimator< N > * clone() const =0

◆ ~SequentialVertexSmoother()

template<unsigned int N>
SequentialVertexSmoother< N >::~SequentialVertexSmoother ( )
override

Definition at line 12 of file SequentialVertexSmoother.cc.

12  {
13  delete theVertexTrackUpdator;
16 }
TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
VertexTrackUpdator< N > * theVertexTrackUpdator
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator

◆ SequentialVertexSmoother() [2/2]

template<unsigned int N>
SequentialVertexSmoother< N >::SequentialVertexSmoother ( const SequentialVertexSmoother< N > &  smoother)

Special copy constructor cloning the private data

Definition at line 19 of file SequentialVertexSmoother.cc.

19  {
20  theVertexTrackUpdator = smoother.vertexTrackUpdator()->clone();
23 }
const VertexSmoothedChiSquaredEstimator< N > * vertexSmoothedChiSquaredEstimator() const
const VertexTrackUpdator< N > * vertexTrackUpdator() const
TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
VertexTrackUpdator< N > * theVertexTrackUpdator
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator
const TrackToTrackCovCalculator< N > * trackToTrackCovCalculator() const

Member Function Documentation

◆ clone()

template<unsigned int N>
SequentialVertexSmoother<N>* SequentialVertexSmoother< N >::clone ( void  ) const
inlineoverridevirtual

Clone method

Implements VertexSmoother< N >.

Definition at line 63 of file SequentialVertexSmoother.h.

63 { return new SequentialVertexSmoother(*this); }
SequentialVertexSmoother(const VertexTrackUpdator< N > &vtu, const VertexSmoothedChiSquaredEstimator< N > &vse, const TrackToTrackCovCalculator< N > &covCalc)

◆ smooth()

template<unsigned int N>
CachingVertex< N > SequentialVertexSmoother< N >::smooth ( const CachingVertex< N > &  vertex) const
overridevirtual

Methode which will refit the tracks with the vertex constraint, calculate the smoothed vertex chi**2, and, if required, the track-to-track covariance matrix.

Parameters
initVertexis the initial guess of the vertex (a-priori information), used at the start of the fit.
newVertexis the final estimate of the vertex, as given by the last update.
Returns
the final vertex estimate, with all the supplementary information

Implements VertexSmoother< N >.

Definition at line 26 of file SequentialVertexSmoother.cc.

26  {
27  // Track refit
28 
29  std::vector<RefCountedVertexTrack> newTracks;
30  if (theVertexTrackUpdator != nullptr) {
31  const std::vector<RefCountedVertexTrack>& vOut = vertex.tracks();
32  for (typename std::vector<RefCountedVertexTrack>::const_iterator i = vOut.begin(); i != vOut.end(); i++) {
34  newTracks.push_back(nTrack);
35  }
36  } else {
37  newTracks = vertex.tracks();
38  }
39 
40  // intermediate vertex for chi2 calculation and TktoTkcovariance map
41  CachingVertex<N> interVertex(vertex.position(), vertex.weight(), newTracks, 0.);
42  if (vertex.hasPrior()) {
43  interVertex = CachingVertex<N>(
44  vertex.priorPosition(), vertex.priorError(), vertex.position(), vertex.weight(), newTracks, 0.);
45  }
46 
47  // Smoothed chi2
48 
49  float smChi2 = vertex.totalChiSquared();
50  if (theVertexSmoothedChiSquaredEstimator != nullptr) {
51  std::pair<bool, double> result = theVertexSmoothedChiSquaredEstimator->estimate(interVertex);
52  smChi2 = result.second;
53  }
54 
55  if (theTrackToTrackCovCalculator == nullptr) {
56  if (vertex.hasPrior()) {
57  return CachingVertex<N>(vertex.priorVertexState(), vertex.vertexState(), newTracks, smChi2);
58  } else {
59  return CachingVertex<N>(vertex.vertexState(), newTracks, smChi2);
60  }
61  }
62 
63  //TktoTkcovariance map
64  typename CachingVertex<N>::TrackToTrackMap tkMap = (*theTrackToTrackCovCalculator)(interVertex);
65 
66  // CachingVertex<N> finalVertex(vertex.position(), vertex.error(),
67  // newTracks, smChi2, tkMap);
68  if (vertex.hasPrior()) {
69  CachingVertex<N> finalVertex(vertex.priorVertexState(), vertex.vertexState(), newTracks, smChi2, tkMap);
70  return finalVertex;
71  }
72 
73  CachingVertex<N> finalVertex(vertex.vertexState(), newTracks, smChi2, tkMap);
74  return finalVertex;
75 }
ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
VertexTrackUpdator< N > * theVertexTrackUpdator
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator
std::map< RefCountedVertexTrack, TrackMap > TrackToTrackMap
Definition: CachingVertex.h:28

◆ trackToTrackCovCalculator()

template<unsigned int N>
const TrackToTrackCovCalculator<N>* SequentialVertexSmoother< N >::trackToTrackCovCalculator ( ) const
inline

Definition at line 58 of file SequentialVertexSmoother.h.

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

TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator

◆ vertexSmoothedChiSquaredEstimator()

template<unsigned int N>
const VertexSmoothedChiSquaredEstimator<N>* SequentialVertexSmoother< N >::vertexSmoothedChiSquaredEstimator ( ) const
inline

Definition at line 55 of file SequentialVertexSmoother.h.

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

55  {
57  }
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator

◆ vertexTrackUpdator()

template<unsigned int N>
const VertexTrackUpdator<N>* SequentialVertexSmoother< N >::vertexTrackUpdator ( ) const
inline

Access methods

Definition at line 54 of file SequentialVertexSmoother.h.

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

54 { return theVertexTrackUpdator; }
VertexTrackUpdator< N > * theVertexTrackUpdator

Member Data Documentation

◆ theTrackToTrackCovCalculator

template<unsigned int N>
TrackToTrackCovCalculator<N>* SequentialVertexSmoother< N >::theTrackToTrackCovCalculator
private

◆ theVertexSmoothedChiSquaredEstimator

template<unsigned int N>
VertexSmoothedChiSquaredEstimator<N>* SequentialVertexSmoother< N >::theVertexSmoothedChiSquaredEstimator
private

◆ theVertexTrackUpdator

template<unsigned int N>
VertexTrackUpdator<N>* SequentialVertexSmoother< N >::theVertexTrackUpdator
private