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 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef MVTX_StandaloneTracking_H
4 #define MVTX_StandaloneTracking_H
5 
6 #include <vector>
7 #include <set>
8 
9 #include <TMatrixD.h>
10 #include <TVectorD.h>
11 
12 class TrkrCluster;
14 class PHCompositeNode;
15 
17 {
18 public:
19 
20  struct MvtxTrack
21  {
22  std::vector<TrkrCluster*> ClusterList;
23  std::vector<double> dx;
24  std::vector<double> dz;
25  double m_xy;
26  double b_xy;
27  double chi2_xy;
28  double m_zy;
29  double b_zy;
30  double chi2_zy;
31  };
32  typedef std::vector<MvtxTrack> MvtxTrackList;
33 
36 
39 
41  void RunTracking(PHCompositeNode* topNode, MvtxTrackList &trklst, std::vector<int> &lyrs);
42 
44  void RunGhostRejection( MvtxTrackList &trklst);
45 
47  void SetWindowX(float w) { window_x_ = w; }
48  void SetWindowZ(float w) { window_z_ = w; }
49 
51  void SetGhostRejection( bool yn ) { ghostrejection_ = yn; }
52 
54  void Verbosity(int v ) { verbosity_ = v; }
55 
56 private:
57 
59  void AssociateClusters(MvtxTrackList &trklst, std::vector<int> &lyrs);
60 
62  void TrackFitXY(MvtxTrack &trk);
63 
65  void TrackFitZY(MvtxTrack &trk);
66 
68  TVectorD SolveGLS(TMatrixD &X, TVectorD &y, TMatrixD &L);
69 
70 
71  double CalcSlope(double x0, double y0, double x1, double y1);
72  double CalcIntecept(double x0, double y0, double m);
73  double CalcProjection(double x, double m, double b);
74 
76  void PrintTrackCandidates(MvtxTrackList &trklst);
77 
80 
82  float window_x_;
83  float window_z_;
84 
86  bool ghostrejection_;
87 
88  // verbosity
89  int verbosity_;
90 
91  static const int NLYR = 4;
92 
93 };
94 
95 #endif //__MvtxStandaloneTracking_h__#