File indexing completed on 2024-04-06 12:26:54
0001 #ifndef RecoMuon_GlobalTrackingTools_StateSegmentMatcher_h
0002 #define RecoMuon_GlobalTrackingTools_StateSegmentMatcher_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
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
0027 AlgebraicVector4 paramVector() const;
0028
0029
0030 AlgebraicSymMatrix44 errorMatrix() const;
0031
0032 private:
0033 AlgebraicVector4 tsos_4d;
0034 AlgebraicSymMatrix44 tsosErr_44;
0035 };
0036
0037 class Tsos2DPhi {
0038 public:
0039
0040 Tsos2DPhi(TrajectoryStateOnSurface const &);
0041
0042
0043 AlgebraicVector2 paramVector() const;
0044
0045
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
0058 AlgebraicVector2 paramVector() const;
0059
0060
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
0071 StateSegmentMatcher(TrajectoryStateOnSurface const &, CSCSegment const &, LocalError const &);
0072
0073
0074 StateSegmentMatcher(TrajectoryStateOnSurface const &, DTRecSegment4D const &, LocalError const &);
0075
0076
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;
0089 ape[1][1] = 0;
0090 ape[2][2] = apeLoc.xx();
0091 ape[3][3] = apeLoc.yy();
0092 ape[0][2] = 0;
0093 ape[1][3] = 0;
0094 };
0095
0096 void setAPE2d(LocalError const &apeLoc) {
0097 ape_2d[0][0] = 0;
0098 ape_2d[1][1] = apeLoc.xx();
0099 ape_2d[0][1] = 0;
0100 };
0101 };
0102
0103 #endif