Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AnaMvtxTestBeam2019.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file AnaMvtxTestBeam2019.h
1 
9 #ifndef __AnaMvtxTestBeam2019_H__
10 #define __AnaMvtxTestBeam2019_H__
11 
12 // --- need to check all these includes...
13 #include <mvtxprototype2/MvtxPrototype2Geom.h>
14 #include <mvtxprototype2/MvtxStandaloneTracking.h>
15 
16 #include <fun4all/SubsysReco.h>
17 
18 #include <string>
19 #include <vector>
20 #include <map>
21 
22 class PHCompositeNode;
23 
24 class TrkrHit;
27 class TrkrCluster;
28 
29 class TFile;
30 class TH1D;
31 class TH2F;
32 class TList;
33 class TTree;
34 
35 typedef std::vector<TrkrCluster*> ClusVec;
36 typedef std::vector<ClusVec> TrkVec;
37 typedef std::multimap<unsigned int, TrkrCluster*> LyrClusMap;
38 
40 
41 public:
42 
43  AnaMvtxTestBeam2019(const std::string &name = "AnaMvtxTestBeam2019",
44  const std::string &ofName = "out.root");
45 
47  {
48  if (m_mvtxtracking)
49  delete m_mvtxtracking;
50  }
51 
52  int Init(PHCompositeNode*);
55  int End(PHCompositeNode*);
56 
58  { return m_mvtxtracking; }
59 
60  void set_out_filename(const char* _fname) { m_foutname = _fname; }
61  void set_do_tracking( bool _do ) { do_tracking = _do; }
62 
63  void set_ref_align_stave(int _ref_stave) { m_ref_align_stave = _ref_stave; }
64 private:
65 
66  //-- Functions
67  int GetNodes(PHCompositeNode *);
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 
73  //-- Nodes
76 
77  //-- Output
80 
81  TH1D* h1d_nevents;
82  TH1D* h1d_hit_layer;
83  TH1D* h1d_clu_layer;
84  TH1D* h1d_clu_map;
87 
93 
94  TH1D* htrk;
95  TH1D* htrk_clus;
96  TH1D* htrk_dz[NLAYER];
97  TH1D* htrk_dx[NLAYER];
98  TH1D* htrk_chi2xy;
99  TH1D* htrk_chi2zy;
100 
101  TH1D* htrk_cut;
107 
108  //-- internal variables
110 
111  //-- Flags
113 
114  int m_ievent;
116 
118 
119 };
120 
121 #endif // __AnaMvtxTestBeam2019_H__