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