Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef KVFHelper_H
0002 #define KVFHelper_H
0003 
0004 #include "RecoVertex/VertexPrimitives/interface/CachingVertex.h"
0005 
0006 /**
0007    * Helper class to calculate chi2 increments for the Kalman Filter
0008    */
0009 
0010 template <unsigned int N>
0011 class KVFHelper {
0012 public:
0013   typedef typename CachingVertex<N>::RefCountedVertexTrack RefCountedVertexTrack;
0014   typedef typename VertexTrack<N>::RefCountedLinearizedTrackState RefCountedLinearizedTrackState;
0015   typedef typename VertexTrack<N>::RefCountedRefittedTrackState RefCountedRefittedTrackState;
0016   typedef typename std::pair<bool, double> BDpair;
0017 
0018   /**
0019    *  Methode which calculates the chi**2-increment due to the vertices
0020    *  E.g. between the prior and the fitted vertex.
0021    *  The covariance matrix used is that of the first vertex (vertexA).
0022    *  This method will not take into account multiple states, so in case one of
0023    *  the VertexStates is a multi-state vertex, only the mean will be used.
0024    *  \param vertexA: The prior vertex state
0025    *  \param VertexB: The fitted vertex state
0026    */
0027   double vertexChi2(const VertexState& vertexA, const VertexState& VertexB) const;
0028 
0029   double vertexChi2(const CachingVertex<N>& vertexA, const CachingVertex<N>& vertexB) const;
0030 
0031   /**
0032    *  Methode which calculates the chi**2 between the prior and the fitted
0033    *   track parameters.
0034    *  \param linTrack   The track as linearized
0035    *  \param refittedTrackState The refitted track
0036    */
0037   BDpair trackParameterChi2(const RefCountedLinearizedTrackState linTrack,
0038                             const RefCountedRefittedTrackState refittedTrackState) const;
0039 
0040   /**
0041    *  Methode which calculates the chi**2 between the prior and the fitted
0042    *   track parameters. The track must have been smoothed before calling this method.
0043    *   If not, an Exception will be thrown.
0044    */
0045   BDpair trackParameterChi2(const RefCountedVertexTrack track) const;
0046 };
0047 
0048 #endif