Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:47

0001 #ifndef RecoMuon_GlobalTrackingTools_StateSegmentMatcher_h
0002 #define RecoMuon_GlobalTrackingTools_StateSegmentMatcher_h
0003 
0004 /**
0005  *  Class: StateSegmentMatcher, Tsos4D, Tsos2DPhi, Tsos2DZed
0006  *
0007  *  Description:
0008  *  utility classes for the dynamical truncation algorithm
0009  *
0010  *  Authors :
0011  *  D. Pagano & G. Bruno - UCL Louvain
0012  *
0013  **/
0014 
0015 #include "DataFormats/DTRecHit/interface/DTRecSegment4D.h"
0016 #include "RecoMuon/GlobalTrackingTools/interface/ChamberSegmentUtility.h"
0017 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0018 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0019 #include "DataFormats/GeometrySurface/interface/LocalError.h"
0020 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0021 
0022 class Tsos4D {
0023 public:
0024   Tsos4D(TrajectoryStateOnSurface const &);
0025 
0026   // Returns the 4d vector
0027   AlgebraicVector4 paramVector() const;
0028 
0029   // Returns the 4x4 covariance matrix
0030   AlgebraicSymMatrix44 errorMatrix() const;
0031 
0032 private:
0033   AlgebraicVector4 tsos_4d;
0034   AlgebraicSymMatrix44 tsosErr_44;
0035 };
0036 
0037 class Tsos2DPhi {
0038 public:
0039   // Constructor of the class
0040   Tsos2DPhi(TrajectoryStateOnSurface const &);
0041 
0042   // Returns the 2d vector
0043   AlgebraicVector2 paramVector() const;
0044 
0045   // Returns the 2x2 covariance matrix
0046   AlgebraicSymMatrix22 errorMatrix() const;
0047 
0048 private:
0049   AlgebraicVector2 tsos_2d_phi;
0050   AlgebraicSymMatrix22 tsosErr_22_phi;
0051 };
0052 
0053 class Tsos2DZed {
0054 public:
0055   Tsos2DZed(TrajectoryStateOnSurface const &);
0056 
0057   // Returns the 2d vector
0058   AlgebraicVector2 paramVector() const;
0059 
0060   // Returns the 2x2 covariance matrix
0061   AlgebraicSymMatrix22 errorMatrix() const;
0062 
0063 private:
0064   AlgebraicVector2 tsos_2d_zed;
0065   AlgebraicSymMatrix22 tsosErr_22_zed;
0066 };
0067 
0068 class StateSegmentMatcher {
0069 public:
0070   // Perform the matching between a track state and a CSC segment
0071   StateSegmentMatcher(TrajectoryStateOnSurface const &, CSCSegment const &, LocalError const &);
0072 
0073   // Perform the matching between a track state and a DT segment
0074   StateSegmentMatcher(TrajectoryStateOnSurface const &, DTRecSegment4D const &, LocalError const &);
0075 
0076   // Returns the estimator value
0077   double value();
0078 
0079 private:
0080   AlgebraicVector4 v1, v2;
0081   AlgebraicSymMatrix44 m1, m2, ape;
0082   AlgebraicVector2 v1_2d, v2_2d;
0083   AlgebraicSymMatrix22 m1_2d, m2_2d, ape_2d;
0084   bool match2D;
0085   double estValue;
0086 
0087   void setAPE4d(LocalError const &apeLoc) {
0088     ape[0][0] = 0;            //sigma (dx/dz)
0089     ape[1][1] = 0;            //sigma (dy/dz)
0090     ape[2][2] = apeLoc.xx();  //sigma (x)
0091     ape[3][3] = apeLoc.yy();  //sigma (y)
0092     ape[0][2] = 0;            //cov(dx/dz,x)
0093     ape[1][3] = 0;            //cov(dy/dz,y)
0094   };
0095 
0096   void setAPE2d(LocalError const &apeLoc) {
0097     ape_2d[0][0] = 0;            //sigma (dx/dz)
0098     ape_2d[1][1] = apeLoc.xx();  //sigma (x)
0099     ape_2d[0][1] = 0;            //cov(dx/dz,x)
0100   };
0101 };
0102 
0103 #endif