CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual
SequentialVertexSmoother< N > * 
clone () const
 
 SequentialVertexSmoother (const VertexTrackUpdator< N > &vtu, const VertexSmoothedChiSquaredEstimator< N > &vse, const TrackToTrackCovCalculator< N > &covCalc)
 
 SequentialVertexSmoother (const SequentialVertexSmoother< N > &smoother)
 
virtual CachingVertex< Nsmooth (const CachingVertex< N > &vertex) const
 
const
TrackToTrackCovCalculator< N > * 
trackToTrackCovCalculator () const
 
const
VertexSmoothedChiSquaredEstimator
< N > * 
vertexSmoothedChiSquaredEstimator () const
 
const VertexTrackUpdator< N > * vertexTrackUpdator () const
 
virtual ~SequentialVertexSmoother ()
 
- 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 16 of file SequentialVertexSmoother.h.

Member Typedef Documentation

Definition at line 22 of file SequentialVertexSmoother.h.

Definition at line 20 of file SequentialVertexSmoother.h.

Definition at line 21 of file SequentialVertexSmoother.h.

Constructor & Destructor Documentation

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 5 of file SequentialVertexSmoother.cc.

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

8  :
12 {}
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
template<unsigned int N>
SequentialVertexSmoother< N >::~SequentialVertexSmoother ( )
virtual

Definition at line 16 of file SequentialVertexSmoother.cc.

17 {
18  delete theVertexTrackUpdator;
21 }
TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
VertexTrackUpdator< N > * theVertexTrackUpdator
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator
template<unsigned int N>
SequentialVertexSmoother< N >::SequentialVertexSmoother ( const SequentialVertexSmoother< N > &  smoother)

Special copy constructor cloning the private data

Definition at line 25 of file SequentialVertexSmoother.cc.

References SequentialVertexSmoother< N >::trackToTrackCovCalculator(), SequentialVertexSmoother< N >::vertexSmoothedChiSquaredEstimator(), and SequentialVertexSmoother< N >::vertexTrackUpdator().

27 {
28  theVertexTrackUpdator = smoother.vertexTrackUpdator()->clone();
30  = smoother.vertexSmoothedChiSquaredEstimator()->clone();
32 }
const VertexTrackUpdator< N > * vertexTrackUpdator() const
TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
const VertexSmoothedChiSquaredEstimator< N > * vertexSmoothedChiSquaredEstimator() const
VertexTrackUpdator< N > * theVertexTrackUpdator
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator
const TrackToTrackCovCalculator< N > * trackToTrackCovCalculator() const

Member Function Documentation

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

Clone method

Implements VertexSmoother< N >.

Definition at line 67 of file SequentialVertexSmoother.h.

68  {
69  return new SequentialVertexSmoother(* this);
70  }
SequentialVertexSmoother(const VertexTrackUpdator< N > &vtu, const VertexSmoothedChiSquaredEstimator< N > &vse, const TrackToTrackCovCalculator< N > &covCalc)
template<unsigned int N>
CachingVertex< N > SequentialVertexSmoother< N >::smooth ( const CachingVertex< N > &  vertex) const
virtual

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 37 of file SequentialVertexSmoother.cc.

References CachingVertex< N >::hasPrior(), i, CachingVertex< N >::position(), CachingVertex< N >::priorError(), CachingVertex< N >::priorPosition(), CachingVertex< N >::priorVertexState(), query::result, CachingVertex< N >::totalChiSquared(), CachingVertex< N >::tracks(), CachingVertex< N >::vertexState(), and CachingVertex< N >::weight().

38 {
39 
40  // Track refit
41 
42  std::vector<RefCountedVertexTrack> newTracks;
43  if (theVertexTrackUpdator != 0) {
44  const std::vector<RefCountedVertexTrack>& vOut=vertex.tracks();
45  for(typename std::vector<RefCountedVertexTrack>::const_iterator i = vOut.begin();
46  i != vOut.end();i++)
47  {
48  RefCountedVertexTrack nTrack = theVertexTrackUpdator->update(vertex, *i);
49  newTracks.push_back(nTrack);
50  }
51  } else {
52  newTracks = vertex.tracks();
53  }
54 
55  // intermediate vertex for chi2 calculation and TktoTkcovariance map
56  CachingVertex<N> interVertex(vertex.position(), vertex.weight(),
57  newTracks, 0.);
58  if ( vertex.hasPrior() )
59  {
60  interVertex = CachingVertex<N> ( vertex.priorPosition(), vertex.priorError(),
61  vertex.position(), vertex.weight(), newTracks, 0.);
62  }
63 
64  // Smoothed chi2
65 
66  float smChi2 = vertex.totalChiSquared();
68  std::pair<bool, double> result = theVertexSmoothedChiSquaredEstimator->estimate(interVertex);
69  smChi2 = result.second;
70  }
71 
73  if (vertex.hasPrior()) {
74  return CachingVertex<N>(vertex.priorVertexState(), vertex.vertexState(),
75  newTracks, smChi2);
76  } else {
77  return CachingVertex<N>(vertex.vertexState(), newTracks, smChi2);
78  }
79  }
80 
81  //TktoTkcovariance map
82  typename CachingVertex<N>::TrackToTrackMap tkMap = (*theTrackToTrackCovCalculator)(interVertex);
83 
84 // CachingVertex<N> finalVertex(vertex.position(), vertex.error(),
85 // newTracks, smChi2, tkMap);
86  if (vertex.hasPrior()) {
87  CachingVertex<N> finalVertex(vertex.priorVertexState(), vertex.vertexState(),
88  newTracks, smChi2, tkMap);
89  return finalVertex;
90  }
91 
92  CachingVertex<N> finalVertex(vertex.vertexState(), newTracks, smChi2, tkMap);
93  return finalVertex;
94 
95 }
int i
Definition: DBlmapReader.cc:9
std::vector< RefCountedVertexTrack > tracks() const
Definition: CachingVertex.h:91
VertexState vertexState() const
Definition: CachingVertex.h:85
GlobalError priorError() const
Definition: CachingVertex.h:93
ReferenceCountingPointer< VertexTrack< N > > RefCountedVertexTrack
GlobalWeight weight() const
tuple result
Definition: query.py:137
VertexState priorVertexState() const
Definition: CachingVertex.h:86
float totalChiSquared() const
Definition: CachingVertex.h:99
bool hasPrior() const
Definition: CachingVertex.h:94
TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
VertexTrackUpdator< N > * theVertexTrackUpdator
VertexSmoothedChiSquaredEstimator< N > * theVertexSmoothedChiSquaredEstimator
GlobalPoint position() const
std::map< RefCountedVertexTrack, TrackMap > TrackToTrackMap
Definition: CachingVertex.h:33
GlobalPoint priorPosition() const
Definition: CachingVertex.h:92
template<unsigned int N>
const TrackToTrackCovCalculator<N>* SequentialVertexSmoother< N >::trackToTrackCovCalculator ( ) const
inline

Definition at line 61 of file SequentialVertexSmoother.h.

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

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

Definition at line 59 of file SequentialVertexSmoother.h.

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

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

Access methods

Definition at line 57 of file SequentialVertexSmoother.h.

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

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

Member Data Documentation

template<unsigned int N>
TrackToTrackCovCalculator<N>* SequentialVertexSmoother< N >::theTrackToTrackCovCalculator
private
template<unsigned int N>
VertexSmoothedChiSquaredEstimator<N>* SequentialVertexSmoother< N >::theVertexSmoothedChiSquaredEstimator
private
template<unsigned int N>
VertexTrackUpdator<N>* SequentialVertexSmoother< N >::theVertexTrackUpdator
private