Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:51

0001 #ifndef PerigeeConversions_H
0002 #define PerigeeConversions_H
0003 
0004 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
0005 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0006 #include "TrackingTools/TrajectoryParametrization/interface/PerigeeTrajectoryParameters.h"
0007 #include "TrackingTools/TrajectoryParametrization/interface/PerigeeTrajectoryError.h"
0008 
0009 class TrajectoryStateClosestToPoint;
0010 
0011 /**
0012  * namespace provides several functions to transform perigee parameters to and from
0013  * various other parametrisations.
0014  */
0015 namespace PerigeeConversions {
0016   typedef FreeTrajectoryState FTS;
0017   /**
0018    *  calculates the perigee parameters from a given FTS
0019    * and a reference point.
0020    */
0021   PerigeeTrajectoryParameters ftsToPerigeeParameters(const FTS& originalFTS,
0022                                                      const GlobalPoint& referencePoint,
0023                                                      double& pt);
0024 
0025   PerigeeTrajectoryError ftsToPerigeeError(const FTS& originalFTS);
0026 
0027   /**
0028    *  returns the position (on the helix) at which the
0029    * parameters are defined
0030    */
0031   GlobalPoint positionFromPerigee(const PerigeeTrajectoryParameters& parameters, const GlobalPoint& referencePoint);
0032 
0033   /**
0034    *  returns the (Cartesian) momentum.
0035    * The parameters need not be the full perigee parameters, as long as the first
0036    * 3 parameters are the transverse curvature, theta and phi.
0037    */
0038   GlobalVector momentumFromPerigee(const AlgebraicVector3& momentum,
0039                                    const TrackCharge& charge,
0040                                    const GlobalPoint& referencePoint,
0041                                    const MagneticField* field);
0042 
0043   /**
0044    *  returns the (Cartesian) momentum from the PerigeeTrajectoryParameters
0045    */
0046   GlobalVector momentumFromPerigee(const PerigeeTrajectoryParameters& parameters,
0047                                    double pt,
0048                                    const GlobalPoint& referencePoint);
0049 
0050   CurvilinearTrajectoryError curvilinearError(const PerigeeTrajectoryError& perigeeError,
0051                                               const GlobalTrajectoryParameters& gtp);
0052 
0053   /**
0054    * Public constructor.
0055    * This constructor takes a momentum, with parameters
0056    * (transverse curvature, theta, phi) and a position, which is both the
0057    * reference position and the position at which the momentum is defined.
0058    * The covariance matrix is defined for these 6 parameters, in the order
0059    * (x, y, z, transverse curvature, theta, phi).
0060    */
0061   TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3& momentum,
0062                                                               const GlobalPoint& referencePoint,
0063                                                               const TrackCharge& charge,
0064                                                               const AlgebraicSymMatrix66& theCovarianceMatrix,
0065                                                               const MagneticField* field);
0066 
0067   /**
0068    * Jacobians of tranformations between the parametrixation
0069    * (x, y, z, transverse curvature, theta, phi) to Cartesian
0070    */
0071   AlgebraicMatrix66 jacobianParameters2Cartesian(const AlgebraicVector3& momentum,
0072                                                  const GlobalPoint& position,
0073                                                  const TrackCharge& charge,
0074                                                  const MagneticField* field);
0075 
0076   /**
0077    * Jacobians of tranformations between curvilinear frame at point of closest
0078    * approach in transverse plane and perigee frame. The fts must therefore be
0079    * given at exactly this point in order to yield the correct Jacobians.
0080    */
0081   AlgebraicMatrix55 jacobianCurvilinear2Perigee(const FreeTrajectoryState& fts);
0082 
0083   AlgebraicMatrix55 jacobianPerigee2Curvilinear(const GlobalTrajectoryParameters& gtp);
0084 
0085 }  // namespace PerigeeConversions
0086 
0087 #endif