Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RefittedTrackState_H
0002 #define RefittedTrackState_H
0003 
0004 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0005 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
0006 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0007 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0008 #include <vector>
0009 
0010 /**
0011  * Pure abstract base class, caching refitted state of the
0012  * trajectory after the vertex fit is done. Every concrete implementaton
0013  * deals with its own trajectory representation.
0014  */
0015 class FreeTrajectoryState;
0016 class TrajectoryStateOnSurface;
0017 class Surface;
0018 class Propagator;
0019 
0020 template <unsigned int N>
0021 class RefittedTrackState : public ReferenceCounted {
0022 public:
0023   //   typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepSym<double,N> > AlgebraicMatrixN3;
0024   typedef ROOT::Math::SVector<double, N> AlgebraicVectorN;
0025   typedef ROOT::Math::SVector<double, N - 2> AlgebraicVectorM;
0026   //   typedef ROOT::Math::SMatrix<double,N,3,ROOT::Math::MatRepStd<double,N,3> > AlgebraicMatrixN3;
0027   //   typedef ROOT::Math::SMatrix<double,N-2,3,ROOT::Math::MatRepStd<double,N-2,3> > AlgebraicMatrixM3;
0028   typedef ROOT::Math::SMatrix<double, N, N, ROOT::Math::MatRepSym<double, N> > AlgebraicSymMatrixNN;
0029 
0030   ~RefittedTrackState() override {}
0031 
0032   /**
0033    * Transformation into a FreeTrajectoryState
0034    */
0035   virtual FreeTrajectoryState freeTrajectoryState() const = 0;
0036 
0037   /**
0038    * Transformation into a TSOS at a given surface
0039    */
0040   virtual TrajectoryStateOnSurface trajectoryStateOnSurface(const Surface& surface) const = 0;
0041 
0042   /**
0043    * Transformation into a TSOS at a given surface, with a given propagator
0044    */
0045 
0046   virtual TrajectoryStateOnSurface trajectoryStateOnSurface(const Surface& surface,
0047                                                             const Propagator& propagator) const = 0;
0048 
0049   /**
0050    * Vector containing the refitted track parameters.
0051    */
0052   virtual AlgebraicVectorN parameters() const = 0;
0053 
0054   /**
0055    * The covariance matrix
0056    */
0057   virtual AlgebraicSymMatrixNN covariance() const = 0;
0058 
0059   /**
0060    * Position at which the momentum is defined.
0061    */
0062   virtual GlobalPoint position() const = 0;
0063 
0064   /**
0065    * Vector containing the parameters describing the momentum as the vertex
0066    */
0067 
0068   virtual AlgebraicVectorM momentumVector() const = 0;
0069 
0070   /**
0071    *   The weight of this component in a mixture
0072    */
0073 
0074   virtual double weight() const = 0;
0075 
0076   /**
0077    * Returns a new refitted state of the same type, but with another weight.
0078    * The current state is unchanged.
0079    */
0080 
0081   virtual ReferenceCountingPointer<RefittedTrackState> stateWithNewWeight(const double newWeight) const = 0;
0082 
0083   virtual std::vector<ReferenceCountingPointer<RefittedTrackState> > components() const = 0;
0084 
0085   virtual reco::TransientTrack transientTrack() const = 0;
0086 };
0087 #endif