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 SequentialVertexSmoother< N > &smoother)
 
 SequentialVertexSmoother (const VertexTrackUpdator< N > &vtu, const VertexSmoothedChiSquaredEstimator< N > &vse, const TrackToTrackCovCalculator< N > &covCalc)
 
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().

◆ ~SequentialVertexSmoother()

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

Definition at line 12 of file SequentialVertexSmoother.cc.

◆ 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.

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); }

◆ 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 }

◆ trackToTrackCovCalculator()

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

◆ vertexSmoothedChiSquaredEstimator()

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

◆ vertexTrackUpdator()

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

Access methods

Definition at line 54 of file SequentialVertexSmoother.h.

54 { return theVertexTrackUpdator; }

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

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
mps_fire.i
i
Definition: mps_fire.py:355
TrackToTrackCovCalculator::clone
virtual TrackToTrackCovCalculator * clone() const =0
SequentialVertexSmoother::theTrackToTrackCovCalculator
TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
Definition: SequentialVertexSmoother.h:68
CachingVertex
Definition: CachingVertex.h:22
SequentialVertexSmoother::theVertexSmoothedChiSquaredEstimator
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator
Definition: SequentialVertexSmoother.h:67
VertexSmoothedChiSquaredEstimator::clone
virtual VertexSmoothedChiSquaredEstimator< N > * clone() const =0
SequentialVertexSmoother::trackToTrackCovCalculator
const TrackToTrackCovCalculator< N > * trackToTrackCovCalculator() const
Definition: SequentialVertexSmoother.h:58
SequentialVertexSmoother::RefCountedVertexTrack
ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
Definition: SequentialVertexSmoother.h:18
SequentialVertexSmoother::vertexSmoothedChiSquaredEstimator
const VertexSmoothedChiSquaredEstimator< N > * vertexSmoothedChiSquaredEstimator() const
Definition: SequentialVertexSmoother.h:55
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
SequentialVertexSmoother::SequentialVertexSmoother
SequentialVertexSmoother(const VertexTrackUpdator< N > &vtu, const VertexSmoothedChiSquaredEstimator< N > &vse, const TrackToTrackCovCalculator< N > &covCalc)
Definition: SequentialVertexSmoother.cc:4
mps_fire.result
result
Definition: mps_fire.py:303
CachingVertex::TrackToTrackMap
std::map< RefCountedVertexTrack, TrackMap > TrackToTrackMap
Definition: CachingVertex.h:28
SequentialVertexSmoother::vertexTrackUpdator
const VertexTrackUpdator< N > * vertexTrackUpdator() const
Definition: SequentialVertexSmoother.h:54
SequentialVertexSmoother::theVertexTrackUpdator
VertexTrackUpdator< N > * theVertexTrackUpdator
Definition: SequentialVertexSmoother.h:66
VertexTrackUpdator::clone
virtual VertexTrackUpdator * clone() const =0