Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef PerigeeKinematicState_H
0002 #define PerigeeKinematicState_H
0003 
0004 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicState.h"
0005 #include "RecoVertex/KinematicFitPrimitives/interface/ExtendedPerigeeTrajectoryParameters.h"
0006 #include "RecoVertex/KinematicFitPrimitives/interface/ExtendedPerigeeTrajectoryError.h"
0007 
0008 /**
0009  * Class caching the "extended"
0010  * perigee parametrization for
0011  * vertex fitting inside the 
0012  * KinematicFit library.
0013  * Extended parameters are:
0014  * (epsilon, rho, phi, theta_p, z_p, m)
0015  * (see TrajectoryStateClosestToPoint
0016  * class for reference)
0017  *
0018  * Kirill Prokofiev, august 2003
0019  */
0020 
0021 class PerigeeKinematicState {
0022 public:
0023   PerigeeKinematicState() {
0024     vl = false;
0025     errorIsAvailable = false;
0026   }
0027 
0028   virtual ~PerigeeKinematicState() {}
0029   /**
0030  * Access methods
0031  */
0032   bool hasError() const {
0033     if (!(isValid()))
0034       throw VertexException("PerigeeKinematicState::error is requested for the invalid state");
0035     return errorIsAvailable;
0036   }
0037 
0038   bool isValid() const { return vl; }
0039 
0040   const KinematicState& theState() const {
0041     if (!isValid())
0042       throw VertexException("PerigeeKinematicState::initial state is requested for the invalid state");
0043     return inState;
0044   }
0045 
0046   /**
0047  * Returns the reference point
0048  */
0049   const GlobalPoint referencePoint() const {
0050     if (!isValid())
0051       throw VertexException("PerigeeKinematicState::point is requested for the invalid state");
0052     return point;
0053   }
0054 
0055   /**
0056  * Returns the error matrix of extended
0057  * perigee parametrization
0058  */
0059   const ExtendedPerigeeTrajectoryError& perigeeError() const {
0060     if (!(isValid()))
0061       throw VertexException("PerigeeKinematicState::requesting perigee error for invalid state");
0062     if (!(hasError()))
0063       throw VertexException("PerigeeKinematicState::requesting perigee error when none available");
0064     return cov;
0065   }
0066 
0067   /**
0068  * Returns the extended perigee parameters
0069  */
0070   const ExtendedPerigeeTrajectoryParameters& perigeeParameters() const {
0071     if (!(isValid()))
0072       throw VertexException("PerigeeKinematicState::requesting perigee parameters for invalid state");
0073     return par;
0074   }
0075 
0076 private:
0077   friend class TransientTrackKinematicStateBuilder;
0078 
0079   PerigeeKinematicState(const KinematicState& state, const GlobalPoint& pt);
0080   /*
0081  AlgebraicMatrix jacobianKinematicToExPerigee(const KinematicState& state, 
0082                                               const GlobalPoint& pt)const;
0083  AlgebraicMatrix jacobianExPerigeeToKinematic(const ExtendedPerigeeTrajectoryParameters& state,
0084                                               const GlobalPoint& point)const;
0085 */
0086   AlgebraicMatrix jacobianCurvilinear2Perigee(const FreeTrajectoryState& fts) const;
0087 
0088 private:
0089   GlobalPoint point;
0090   ExtendedPerigeeTrajectoryParameters par;
0091   ExtendedPerigeeTrajectoryError cov;
0092   KinematicState inState;
0093   bool errorIsAvailable;
0094   bool vl;
0095 };
0096 #endif