Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:24

0001 #ifndef PerigeeRefittedTrackState_H
0002 #define PerigeeRefittedTrackState_H
0003 
0004 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0005 #include "RecoVertex/VertexPrimitives/interface/RefittedTrackState.h"
0006 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateClosestToPoint.h"
0007 
0008 /**
0009  * Caching refitted state of the trajectory after the vertex fit is
0010  * done. For the Perigee parametrization.
0011  */
0012 
0013 class FreeTrajectoryState;
0014 class TrajectoryStateOnSurface;
0015 class Surface;
0016 class Propagator;
0017 
0018 class PerigeeRefittedTrackState : public RefittedTrackState<5> {
0019 public:
0020   typedef ReferenceCountingPointer<RefittedTrackState<5> > RefCountedRefittedTrackState;
0021 
0022   PerigeeRefittedTrackState(const TrajectoryStateClosestToPoint& tscp,
0023                             const AlgebraicVector3& aMomentumAtVertex,
0024                             const double aWeight = 1.)
0025       : theState(tscp), momentumAtVertex(aMomentumAtVertex), theWeight(aWeight) {}
0026 
0027   ~PerigeeRefittedTrackState() override {}
0028 
0029   /**
0030    * Transformation into a FreeTrajectoryState
0031    */
0032 
0033   FreeTrajectoryState freeTrajectoryState() const override { return theState.theState(); }
0034 
0035   /**
0036    * Transformation into a TSOS at a given surface
0037    */
0038   TrajectoryStateOnSurface trajectoryStateOnSurface(const Surface& surface) const override;
0039 
0040   /**
0041    * Transformation into a TSOS at a given surface, with a given propagator
0042    */
0043 
0044   TrajectoryStateOnSurface trajectoryStateOnSurface(const Surface& surface,
0045                                                     const Propagator& propagator) const override;
0046 
0047   /**
0048    * Vector containing the refitted track parameters. <br>
0049    * These are (signed transverse curvature, theta, phi,
0050    *  (signed) transverse , longitudinal impact parameter)
0051    */
0052 
0053   AlgebraicVector5 parameters() const override { return theState.perigeeParameters().vector(); }
0054 
0055   /**
0056    * The covariance matrix
0057    */
0058 
0059   AlgebraicSymMatrix55 covariance() const override { return theState.perigeeError().covarianceMatrix(); }
0060 
0061   /**
0062    * Position at which the momentum is defined.
0063    */
0064 
0065   GlobalPoint position() const override { return theState.referencePoint(); }
0066 
0067   /**
0068    * Vector containing the parameters describing the momentum as the vertex.
0069    * These are (signed transverse curvature, theta, phi)
0070    */
0071 
0072   AlgebraicVector3 momentumVector() const override;
0073 
0074   /**
0075    *   The weight of this component in a mixture
0076    */
0077   double weight() const override { return theWeight; }
0078 
0079   /**
0080    * Returns a new refitted state of the same type, but with another weight.
0081    * The current state is unchanged.
0082    */
0083   ReferenceCountingPointer<RefittedTrackState<5> > stateWithNewWeight(const double newWeight) const override;
0084 
0085   std::vector<ReferenceCountingPointer<RefittedTrackState<5> > > components() const override;
0086 
0087   reco::TransientTrack transientTrack() const override;
0088 
0089 private:
0090   TrajectoryStateClosestToPoint theState;
0091   AlgebraicVector3 momentumAtVertex;
0092   double theWeight;
0093 };
0094 #endif