File indexing completed on 2025-08-05 08:13:29
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef __AnaMvtxTestBeam2019_H__
0010 #define __AnaMvtxTestBeam2019_H__
0011
0012
0013 #include <mvtxprototype2/MvtxPrototype2Geom.h>
0014 #include <mvtxprototype2/MvtxStandaloneTracking.h>
0015
0016 #include <fun4all/SubsysReco.h>
0017
0018 #include <string>
0019 #include <vector>
0020 #include <map>
0021
0022 class PHCompositeNode;
0023
0024 class TrkrHit;
0025 class TrkrHitSetContainerv1;
0026 class TrkrClusterContainerv1;
0027 class TrkrCluster;
0028
0029 class TFile;
0030 class TH1D;
0031 class TH2F;
0032 class TList;
0033 class TTree;
0034
0035 typedef std::vector<TrkrCluster*> ClusVec;
0036 typedef std::vector<ClusVec> TrkVec;
0037 typedef std::multimap<unsigned int, TrkrCluster*> LyrClusMap;
0038
0039 class AnaMvtxTestBeam2019 : public SubsysReco {
0040
0041 public:
0042
0043 AnaMvtxTestBeam2019(const std::string &name = "AnaMvtxTestBeam2019",
0044 const std::string &ofName = "out.root");
0045
0046 virtual ~AnaMvtxTestBeam2019()
0047 {
0048 if (m_mvtxtracking)
0049 delete m_mvtxtracking;
0050 }
0051
0052 int Init(PHCompositeNode*);
0053 int InitRun(PHCompositeNode*);
0054 int process_event(PHCompositeNode*);
0055 int End(PHCompositeNode*);
0056
0057 MvtxStandaloneTracking *getStandaloneTracking()
0058 { return m_mvtxtracking; }
0059
0060 void set_out_filename(const char* _fname) { m_foutname = _fname; }
0061 void set_do_tracking( bool _do ) { do_tracking = _do; }
0062
0063 void set_ref_align_stave(int _ref_stave) { m_ref_align_stave = _ref_stave; }
0064 private:
0065
0066
0067 int GetNodes(PHCompositeNode *);
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 TrkrHitSetContainerv1 *m_hits;
0075 TrkrClusterContainerv1 *m_clusters;
0076
0077
0078 TList* m_lout_clusterQA;
0079 TList* m_lout_tracking;
0080
0081 TH1D* h1d_nevents;
0082 TH1D* h1d_hit_layer;
0083 TH1D* h1d_clu_layer;
0084 TH1D* h1d_clu_map;
0085 TH2F* h2f_hit_map[NLAYER];
0086 TH2F* h2f_clu_xz[NLAYER];
0087
0088 TH1D* h1d_clu_mean_dx[NLAYER];
0089 TH1D* h1d_clu_mean_dz[NLAYER];
0090 TH1D* h1d_clu_size[NLAYER];
0091 TH1D* h1d_clu_size_phi[NLAYER];
0092 TH1D* h1d_clu_size_z[NLAYER];
0093
0094 TH1D* htrk;
0095 TH1D* htrk_clus;
0096 TH1D* htrk_dz[NLAYER];
0097 TH1D* htrk_dx[NLAYER];
0098 TH1D* htrk_chi2xy;
0099 TH1D* htrk_chi2zy;
0100
0101 TH1D* htrk_cut;
0102 TH1D* htrk_cut_clus;
0103 TH1D* htrk_cut_dx[NLAYER];
0104 TH1D* htrk_cut_dz[NLAYER];
0105 TH1D* htrk_cut_chi2xy;
0106 TH1D* htrk_cut_chi2zy;
0107
0108
0109 std::string m_foutname;
0110
0111
0112 bool do_tracking;
0113
0114 int m_ievent;
0115 int m_ref_align_stave;
0116
0117 MvtxStandaloneTracking* m_mvtxtracking;
0118
0119 };
0120
0121 #endif