Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MvtxStandaloneTracking.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MvtxStandaloneTracking.h
1 #ifndef __MvtxStandaloneTracking_h__
2 #define __MvtxStandaloneTracking_h__
3 
4 #include <vector>
5 #include <set>
6 
7 #include <TMatrixD.h>
8 #include <TVectorD.h>
9 
10 class TrkrCluster;
12 class PHCompositeNode;
13 
15 {
16 public:
17 
18  struct MvtxTrack
19  {
20  std::vector<TrkrCluster*> ClusterList;
21  std::vector<double> dx;
22  std::vector<double> dz;
23  double m_xy;
24  double b_xy;
25  double chi2_xy;
26  double m_zy;
27  double b_zy;
28  double chi2_zy;
29  };
30  typedef std::vector<MvtxTrack> MvtxTrackList;
31 
34 
37 
39  void RunTracking(PHCompositeNode* topNode, MvtxTrackList &trklst, std::vector<int> &lyrs);
40 
42  void RunGhostRejection( MvtxTrackList &trklst);
43 
45  void SetWindowX(float w) { window_x_ = w; }
46  void SetWindowZ(float w) { window_z_ = w; }
47 
49  void SetGhostRejection( bool yn ) {}
50 
52  void Verbosity(int v ) { verbosity_ = v; }
53 
54 private:
55 
57  void AssociateClusters(MvtxTrackList &trklst, std::vector<int> &lyrs);
58 
60  void TrackFitXY(MvtxTrack &trk);
61 
63  void TrackFitZY(MvtxTrack &trk);
64 
66  TVectorD SolveGLS(TMatrixD &X, TVectorD &y, TMatrixD &L);
67 
68 
69  double CalcSlope(double x0, double y0, double x1, double y1);
70  double CalcIntecept(double x0, double y0, double m);
71  double CalcProjection(double x, double m, double b);
72 
74  void PrintTrackCandidates(MvtxTrackList &trklst);
75 
78 
80  float window_x_;
81  float window_z_;
82 
85 
86  // verbosity
88 
89  static const int NLYR = 4;
90 
91 };
92 
93 #endif //__MvtxStandaloneTracking_h__#