File indexing completed on 2025-08-06 08:21:59
0001 #ifndef __MvtxStandaloneTracking_h__
0002 #define __MvtxStandaloneTracking_h__
0003
0004 #include <vector>
0005 #include <set>
0006
0007 #include <TMatrixD.h>
0008 #include <TVectorD.h>
0009
0010 class TrkrCluster;
0011 class TrkrClusterContainer;
0012 class PHCompositeNode;
0013
0014 class MvtxStandaloneTracking
0015 {
0016 public:
0017
0018 struct MvtxTrack
0019 {
0020 std::vector<TrkrCluster*> ClusterList;
0021 std::vector<double> dx;
0022 std::vector<double> dz;
0023 double m_xy;
0024 double b_xy;
0025 double chi2_xy;
0026 double m_zy;
0027 double b_zy;
0028 double chi2_zy;
0029 };
0030 typedef std::vector<MvtxTrack> MvtxTrackList;
0031
0032
0033 MvtxStandaloneTracking();
0034
0035
0036 ~MvtxStandaloneTracking();
0037
0038
0039 void RunTracking(PHCompositeNode* topNode, MvtxTrackList &trklst, std::vector<int> &lyrs);
0040
0041
0042 void RunGhostRejection( MvtxTrackList &trklst);
0043
0044
0045 void SetWindowX(float w) { window_x_ = w; }
0046 void SetWindowZ(float w) { window_z_ = w; }
0047
0048
0049 void SetGhostRejection( bool yn ) {}
0050
0051
0052 void Verbosity(int v ) { verbosity_ = v; }
0053
0054 private:
0055
0056
0057 void AssociateClusters(MvtxTrackList &trklst, std::vector<int> &lyrs);
0058
0059
0060 void TrackFitXY(MvtxTrack &trk);
0061
0062
0063 void TrackFitZY(MvtxTrack &trk);
0064
0065
0066 TVectorD SolveGLS(TMatrixD &X, TVectorD &y, TMatrixD &L);
0067
0068
0069 double CalcSlope(double x0, double y0, double x1, double y1);
0070 double CalcIntecept(double x0, double y0, double m);
0071 double CalcProjection(double x, double m, double b);
0072
0073
0074 void PrintTrackCandidates(MvtxTrackList &trklst);
0075
0076
0077 TrkrClusterContainer* clusters_;
0078
0079
0080 float window_x_;
0081 float window_z_;
0082
0083
0084 bool ghostrejection_;
0085
0086
0087 int verbosity_;
0088
0089 static const int NLYR = 4;
0090
0091 };
0092
0093 #endif