Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:19

0001 #ifndef _VertexFitter_H_
0002 #define _VertexFitter_H_
0003 
0004 #include "RecoVertex/VertexPrimitives/interface/CachingVertex.h"
0005 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0006 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0007 
0008 #include <vector>
0009 
0010 /** 
0011  * Pure abstract base class for VertexFitters. 
0012  * Fits a CachingVertex using either:
0013  *  - TransientTracks; 
0014  *  - VertexTracks. 
0015  * A linearization point can be specified, 
0016  * or a prior estimate of the vertex position and error. 
0017  */
0018 
0019 template <unsigned int N>
0020 class VertexFitter {
0021 public:
0022   VertexFitter() {}
0023 
0024   virtual ~VertexFitter() {}
0025 
0026   /** Fit vertex out of a set of TransientTracks
0027    */
0028   virtual CachingVertex<N> vertex(const std::vector<reco::TransientTrack>& tracks) const = 0;
0029 
0030   /** Fit vertex out of a set of VertexTracks. For the first iteration, the already 
0031    * linearized track will be used.
0032    */
0033   virtual CachingVertex<N> vertex(const std::vector<typename CachingVertex<N>::RefCountedVertexTrack>& tracks) const = 0;
0034 
0035   /** Same as above, only now also the
0036    * BeamSpot constraint is provided.
0037    */
0038   virtual CachingVertex<N> vertex(const std::vector<typename CachingVertex<N>::RefCountedVertexTrack>& tracks,
0039                                   const reco::BeamSpot& spot) const = 0;
0040 
0041   /** Fit vertex out of a set of TransientTracks. 
0042    *  The specified point will be used as linearization point, but will NOT be used as prior.
0043    */
0044   virtual CachingVertex<N> vertex(const std::vector<reco::TransientTrack>& tracks,
0045                                   const GlobalPoint& linPoint) const = 0;
0046 
0047   /** Fit vertex out of a set of TransientTracks. 
0048    *  Uses the specified point as both the linearization point AND as prior
0049    *  estimate of the vertex position. The error is used for the 
0050    *  weight of the prior estimate.
0051    */
0052   virtual CachingVertex<N> vertex(const std::vector<reco::TransientTrack>& tracks,
0053                                   const GlobalPoint& priorPos,
0054                                   const GlobalError& priorError) const = 0;
0055 
0056   /** Fit vertex out of a set of TransientTracks. 
0057    *  The specified BeamSpot will be used as priot, but NOT for the linearization.
0058    * The specified LinearizationPointFinder will be used to find the linearization point.
0059    */
0060   virtual CachingVertex<N> vertex(const std::vector<reco::TransientTrack>& tracks,
0061                                   const reco::BeamSpot& beamSpot) const = 0;
0062 
0063   /** Fit vertex out of a set of VertexTracks.
0064    *  Uses the specified point and error as the prior estimate of the vertex.
0065    *  This position is NOT used to relinearize the tracks.
0066    */
0067   virtual CachingVertex<N> vertex(const std::vector<typename CachingVertex<N>::RefCountedVertexTrack>& tracks,
0068                                   const GlobalPoint& priorPos,
0069                                   const GlobalError& priorError) const = 0;
0070 
0071   /** Fit vertex out of a VertexSeed
0072    */
0073   //   virtual CachingVertex<N>
0074   //   vertex(const RefCountedVertexSeed vtxSeed) const = 0;
0075 
0076   virtual VertexFitter* clone() const = 0;
0077 };
0078 
0079 #endif