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 | Protected Member Functions | Private Member Functions | Private Attributes
SequentialVertexFitter< N > Class Template Reference

#include <SequentialVertexFitter.h>

Inheritance diagram for SequentialVertexFitter< N >:
VertexFitter< N >

Public Types

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

Public Member Functions

SequentialVertexFitterclone () const
 
const LinearizationPointFinderlinearizationPointFinder () const
 
const AbstractLTSFactory< N > * linearizedTrackStateFactory () const
 
const float maxShift () const
 
const int maxStep () const
 
const edm::ParameterSet parameterSet () const
 
 SequentialVertexFitter (const LinearizationPointFinder &linP, const VertexUpdator< N > &updator, const VertexSmoother< N > &smoother, const AbstractLTSFactory< N > &ltsf)
 
 SequentialVertexFitter (const edm::ParameterSet &pSet, const LinearizationPointFinder &linP, const VertexUpdator< N > &updator, const VertexSmoother< N > &smoother, const AbstractLTSFactory< N > &ltsf)
 
 SequentialVertexFitter (const SequentialVertexFitter &original)
 
void setMaximumDistance (float maxShift)
 
void setMaximumNumberOfIterations (int maxIterations)
 
virtual CachingVertex< Nvertex (const std::vector< reco::TransientTrack > &tracks) const
 
virtual CachingVertex< Nvertex (const std::vector< RefCountedVertexTrack > &tracks) const
 
virtual CachingVertex< Nvertex (const std::vector< RefCountedVertexTrack > &tracks, const reco::BeamSpot &spot) const
 
virtual CachingVertex< Nvertex (const std::vector< reco::TransientTrack > &tracks, const GlobalPoint &linPoint) const
 
virtual CachingVertex< Nvertex (const std::vector< reco::TransientTrack > &tracks, const reco::BeamSpot &beamSpot) const
 
virtual CachingVertex< Nvertex (const std::vector< reco::TransientTrack > &tracks, const GlobalPoint &priorPos, const GlobalError &priorError) const
 
virtual CachingVertex< Nvertex (const std::vector< RefCountedVertexTrack > &tracks, const GlobalPoint &priorPos, const GlobalError &priorError) const
 
const VertexSmoother< N > * vertexSmoother () const
 
const VertexUpdator< N > * vertexUpdator () const
 
virtual ~SequentialVertexFitter ()
 
- Public Member Functions inherited from VertexFitter< N >
virtual CachingVertex< Nvertex (const std::vector< typename CachingVertex< N >::RefCountedVertexTrack > &tracks) const =0
 
virtual CachingVertex< Nvertex (const std::vector< typename CachingVertex< N >::RefCountedVertexTrack > &tracks, const reco::BeamSpot &spot) const =0
 
virtual CachingVertex< Nvertex (const std::vector< typename CachingVertex< N >::RefCountedVertexTrack > &tracks, const GlobalPoint &priorPos, const GlobalError &priorError) const =0
 
 VertexFitter ()
 
virtual ~VertexFitter ()
 

Protected Member Functions

 SequentialVertexFitter ()
 

Private Member Functions

CachingVertex< Nfit (const std::vector< RefCountedVertexTrack > &tracks, const VertexState priorVertex, bool withPrior) const
 
bool hasNan (const GlobalPoint &point) const
 
std::vector
< RefCountedVertexTrack
linearizeTracks (const std::vector< reco::TransientTrack > &tracks, const VertexState state) const
 
void readParameters ()
 
std::vector
< RefCountedVertexTrack
reLinearizeTracks (const std::vector< RefCountedVertexTrack > &tracks, const VertexState state) const
 
void setDefaultParameters ()
 

Private Attributes

LinearizationPointFindertheLinP
 
const AbstractLTSFactory< N > * theLTrackFactory
 
float theMaxShift
 
int theMaxStep
 
edm::ParameterSet thePSet
 
VertexSmoother< N > * theSmoother
 
VertexUpdator< N > * theUpdator
 
VertexTrackFactory< NtheVTrackFactory
 

Detailed Description

template<unsigned int N>
class SequentialVertexFitter< N >

Sequential vertex fitter, where the vertex is updated one track at the time. The fitter will iterate over the set of tracks until the transverse distance between vertices computed in the previous and the current iterations is less than the specified convergence criteria, or until the maximum number of iterations is reached. The transverse distance determines the linearization error. The default convergence criterion is 1 mm. The default maximum number of steps is 10. These parameters can be configured in .orcarc ( SequentialVertexFitter:maximumDistance and SequentialVertexFitter:maximumNumberOfIterations). After the vertex fit, the tracks can be refit with the additional constraint of the vertex position.

Definition at line 35 of file SequentialVertexFitter.h.

Member Typedef Documentation

Definition at line 41 of file SequentialVertexFitter.h.

Definition at line 39 of file SequentialVertexFitter.h.

Definition at line 40 of file SequentialVertexFitter.h.

Constructor & Destructor Documentation

template<unsigned int N>
SequentialVertexFitter< N >::SequentialVertexFitter ( const LinearizationPointFinder linP,
const VertexUpdator< N > &  updator,
const VertexSmoother< N > &  smoother,
const AbstractLTSFactory< N > &  ltsf 
)

Reimplemented constructors to use any kind of linearisation point finder, vertex updator and smoother. If no smoother is to be used, do not specify an instance for it.

Definition at line 23 of file SequentialVertexFitter.cc.

template<unsigned int N>
SequentialVertexFitter< N >::SequentialVertexFitter ( const edm::ParameterSet pSet,
const LinearizationPointFinder linP,
const VertexUpdator< N > &  updator,
const VertexSmoother< N > &  smoother,
const AbstractLTSFactory< N > &  ltsf 
)

Same as above, using a ParameterSet to set the convergence criteria

Definition at line 34 of file SequentialVertexFitter.cc.

template<unsigned int N>
SequentialVertexFitter< N >::SequentialVertexFitter ( const SequentialVertexFitter< N > &  original)

Copy constructor

Definition at line 46 of file SequentialVertexFitter.cc.

template<unsigned int N>
SequentialVertexFitter< N >::~SequentialVertexFitter ( )
virtual

Definition at line 60 of file SequentialVertexFitter.cc.

template<unsigned int N>
SequentialVertexFitter< N >::SequentialVertexFitter ( )
inlineprotected

Default constructor. Is here, as we do not want anybody to use it.

Definition at line 193 of file SequentialVertexFitter.h.

Member Function Documentation

template<unsigned int N>
SequentialVertexFitter* SequentialVertexFitter< N >::clone ( ) const
inlinevirtual

Fit vertex out of a VertexSeed

Implements VertexFitter< N >.

Definition at line 180 of file SequentialVertexFitter.h.

Referenced by GsfVertexFitter::GsfVertexFitter().

template<unsigned int N>
CachingVertex< N > SequentialVertexFitter< N >::fit ( const std::vector< RefCountedVertexTrack > &  tracks,
const VertexState  priorVertex,
bool  withPrior 
) const
private

The methode where the vrte fit is actually done. The seed is used as the prior estimate in the vertex fit (in case its error is large, it will have little influence on the fit. The tracks will be relinearized in case further loops are needed. tracks The tracks to use in the fit. priorVertex The prior estimate of the vertex

Returns
The fitted vertex

Definition at line 258 of file SequentialVertexFitter.cc.

template<unsigned int N>
bool SequentialVertexFitter< N >::hasNan ( const GlobalPoint point) const
inlineprivate

Checks whether any of the three coordinates is a Nan

Definition at line 244 of file SequentialVertexFitter.h.

template<unsigned int N>
const LinearizationPointFinder* SequentialVertexFitter< N >::linearizationPointFinder ( ) const
inline

Method returning the fitted vertex, from a VertexSeed. For the first loop, the position of the VertexSeed will be used as linearization point. If subsequent loops are needed, the new VertexTracks will be created with the last estimate of the vertex as linearization point. In case a non-sero error is given, the position and error of the VertexSeed will be used as prior estimate in the vertex fit.

Parameters
seedThe VertexSeed to fit.
Returns
The fitted vertex Access methods

Definition at line 162 of file SequentialVertexFitter.h.

template<unsigned int N>
const AbstractLTSFactory<N>* SequentialVertexFitter< N >::linearizedTrackStateFactory ( ) const
inline

Definition at line 184 of file SequentialVertexFitter.h.

template<unsigned int N>
vector< typename SequentialVertexFitter< N >::RefCountedVertexTrack > SequentialVertexFitter< N >::linearizeTracks ( const std::vector< reco::TransientTrack > &  tracks,
const VertexState  state 
) const
private

Construct a container of VertexTrack from a set of RecTracks.

Parameters
tracksThe container of RecTracks.
seedThe seed to use for the VertexTracks. This position will also be used as the new linearization point.
Returns
The container of VertexTracks which are to be used in the next fit.

Definition at line 207 of file SequentialVertexFitter.cc.

template<unsigned int N>
const float SequentialVertexFitter< N >::maxShift ( ) const
inline

Definition at line 171 of file SequentialVertexFitter.h.

template<unsigned int N>
const int SequentialVertexFitter< N >::maxStep ( ) const
inline

Definition at line 174 of file SequentialVertexFitter.h.

template<unsigned int N>
const edm::ParameterSet SequentialVertexFitter< N >::parameterSet ( ) const
inline

Definition at line 177 of file SequentialVertexFitter.h.

template<unsigned int N>
void SequentialVertexFitter< N >::readParameters ( )
private

Reads the configurable parameters.

Definition at line 70 of file SequentialVertexFitter.cc.

template<unsigned int N>
vector< typename SequentialVertexFitter< N >::RefCountedVertexTrack > SequentialVertexFitter< N >::reLinearizeTracks ( const std::vector< RefCountedVertexTrack > &  tracks,
const VertexState  state 
) const
private

Construct new a container of VertexTrack with a new linearization point and vertex seed, from an existing set of VertexTrack, from which only the recTracks will be used.

Parameters
tracksThe original container of VertexTracks, from which the RecTracks will be extracted.
seedThe seed to use for the VertexTracks. This position will also be used as the new linearization point.
Returns
The container of VertexTracks which are to be used in the next fit.

Definition at line 231 of file SequentialVertexFitter.cc.

template<unsigned int N>
void SequentialVertexFitter< N >::setDefaultParameters ( )
private

Definition at line 77 of file SequentialVertexFitter.cc.

template<unsigned int N>
void SequentialVertexFitter< N >::setMaximumDistance ( float  maxShift)
inline

Method to set the convergence criterion (the maximum distance between the vertex computed in the previous and the current iterations to consider the fit to have converged)

Definition at line 79 of file SequentialVertexFitter.h.

template<unsigned int N>
void SequentialVertexFitter< N >::setMaximumNumberOfIterations ( int  maxIterations)
inline

Method to set the maximum number of iterations to perform

Definition at line 86 of file SequentialVertexFitter.h.

template<unsigned int N>
CachingVertex< N > SequentialVertexFitter< N >::vertex ( const std::vector< reco::TransientTrack > &  tracks) const
virtual

Method returning the fitted vertex, from a container of reco::TransientTracks. The linearization point will be searched with the given LP finder. No prior vertex position will be used in the vertex fit.

Parameters
tracksThe container of RecTracks to fit.
Returns
The fitted vertex

Implements VertexFitter< N >.

Definition at line 86 of file SequentialVertexFitter.cc.

Referenced by Tau.Tau::dxy(), GsfVertexFitter::vertex(), and KalmanVertexFitter::vertex().

template<unsigned int N>
CachingVertex< N > SequentialVertexFitter< N >::vertex ( const std::vector< RefCountedVertexTrack > &  tracks) const
virtual

Method returning the fitted vertex, from a container of VertexTracks. For the first loop, the LinearizedTrackState contained in the VertexTracks will be used. If subsequent loops are needed, the new VertexTracks will be created with the last estimate of the vertex as linearization point. No prior vertex position will be used in the vertex fit.

Parameters
tracksThe container of VertexTracks to fit.
Returns
The fitted vertex

Definition at line 112 of file SequentialVertexFitter.cc.

Referenced by Tau.Tau::dxy().

template<unsigned int N>
CachingVertex< N > SequentialVertexFitter< N >::vertex ( const std::vector< RefCountedVertexTrack > &  tracks,
const reco::BeamSpot spot 
) const
virtual

Same as above, only now also with BeamSpot!

Definition at line 102 of file SequentialVertexFitter.cc.

Referenced by Tau.Tau::dxy().

template<unsigned int N>
CachingVertex< N > SequentialVertexFitter< N >::vertex ( const std::vector< reco::TransientTrack > &  tracks,
const GlobalPoint linPoint 
) const
virtual

Fit vertex out of a set of RecTracks. Uses the specified linearization point.

Implements VertexFitter< N >.

Definition at line 129 of file SequentialVertexFitter.cc.

Referenced by Tau.Tau::dxy().

template<unsigned int N>
CachingVertex< N > SequentialVertexFitter< N >::vertex ( const std::vector< reco::TransientTrack > &  tracks,
const reco::BeamSpot beamSpot 
) const
virtual

Fit vertex out of a set of TransientTracks. The specified BeamSpot will be used as priot, but NOT for the linearization. The specified LinearizationPointFinder will be used to find the linearization point.

Implements VertexFitter< N >.

Definition at line 148 of file SequentialVertexFitter.cc.

Referenced by Tau.Tau::dxy().

template<unsigned int N>
CachingVertex< N > SequentialVertexFitter< N >::vertex ( const std::vector< reco::TransientTrack > &  tracks,
const GlobalPoint priorPos,
const GlobalError priorError 
) const
virtual

Fit vertex out of a set of RecTracks. Uses the position as both the linearization point AND as prior estimate of the vertex position. The error is used for the weight of the prior estimate.

Implements VertexFitter< N >.

Definition at line 178 of file SequentialVertexFitter.cc.

Referenced by Tau.Tau::dxy().

template<unsigned int N>
CachingVertex< N > SequentialVertexFitter< N >::vertex ( const std::vector< RefCountedVertexTrack > &  tracks,
const GlobalPoint priorPos,
const GlobalError priorError 
) const
virtual

Fit vertex out of a set of VertexTracks Uses the position and error for the prior estimate of the vertex. This position is not used to relinearize the tracks.

Definition at line 193 of file SequentialVertexFitter.cc.

Referenced by Tau.Tau::dxy().

template<unsigned int N>
const VertexSmoother<N>* SequentialVertexFitter< N >::vertexSmoother ( ) const
inline

Definition at line 168 of file SequentialVertexFitter.h.

template<unsigned int N>
const VertexUpdator<N>* SequentialVertexFitter< N >::vertexUpdator ( ) const
inline

Definition at line 165 of file SequentialVertexFitter.h.

Member Data Documentation

template<unsigned int N>
LinearizationPointFinder* SequentialVertexFitter< N >::theLinP
private

Definition at line 254 of file SequentialVertexFitter.h.

template<unsigned int N>
const AbstractLTSFactory<N>* SequentialVertexFitter< N >::theLTrackFactory
private

Definition at line 257 of file SequentialVertexFitter.h.

template<unsigned int N>
float SequentialVertexFitter< N >::theMaxShift
private

Definition at line 250 of file SequentialVertexFitter.h.

template<unsigned int N>
int SequentialVertexFitter< N >::theMaxStep
private

Definition at line 251 of file SequentialVertexFitter.h.

template<unsigned int N>
edm::ParameterSet SequentialVertexFitter< N >::thePSet
private

Definition at line 253 of file SequentialVertexFitter.h.

template<unsigned int N>
VertexSmoother<N>* SequentialVertexFitter< N >::theSmoother
private

Definition at line 256 of file SequentialVertexFitter.h.

template<unsigned int N>
VertexUpdator<N>* SequentialVertexFitter< N >::theUpdator
private

Definition at line 255 of file SequentialVertexFitter.h.

template<unsigned int N>
VertexTrackFactory<N> SequentialVertexFitter< N >::theVTrackFactory
private

Definition at line 259 of file SequentialVertexFitter.h.