File indexing completed on 2025-08-05 08:13:28
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef __AnaMvtxPrototype1_H__
0010 #define __AnaMvtxPrototype1_H__
0011
0012
0013 #include <fun4all/SubsysReco.h>
0014 #include <string>
0015 #include <vector>
0016 #include <map>
0017
0018 #include "TMath.h"
0019
0020 class PHCompositeNode;
0021
0022 class TrkrClusterContainer;
0023 class TrkrCluster;
0024
0025 class MvtxStandaloneTracking;
0026
0027 class TFile;
0028 class TTree;
0029 class TH1D;
0030 class TH2D;
0031
0032
0033 typedef std::vector<TrkrCluster*> ClusVec;
0034 typedef std::vector<ClusVec> TrkVec;
0035 typedef std::multimap<unsigned int, TrkrCluster*> LyrClusMap;
0036
0037 struct mis {
0038 double dx;
0039 double dy;
0040 double dz;
0041 };
0042
0043 class AnaMvtxPrototype1: public SubsysReco {
0044
0045 public:
0046
0047 AnaMvtxPrototype1(const std::string &name = "AnaMvtxPrototype1",
0048 const std::string &ofName = "out.root");
0049
0050 int Init(PHCompositeNode*);
0051 int InitRun(PHCompositeNode*);
0052 int process_event(PHCompositeNode*);
0053 int End(PHCompositeNode*);
0054
0055
0056
0057
0058 void MisalignLayer(int lyr, double dx, double dy, double dz);
0059
0060 private:
0061
0062
0063 int GetNodes(PHCompositeNode *);
0064
0065
0066 double CalcSlope(double x0, double y0, double x1, double y1);
0067 double CalcIntecept(double x0, double y0, double m);
0068 double CalcProjection(double x, double m, double b);
0069
0070 void Misalign();
0071 void PrintMisalign();
0072
0073
0074 TrkrClusterContainer* clusters_;
0075
0076
0077
0078
0079
0080 std::string _foutname;
0081 TFile *_f;
0082
0083 TH1D* hlayer;
0084 TH1D* hsize[4];
0085 TH1D* hsize_phi[4];
0086 TH1D* hsize_z[4];
0087 TH2D* hxz[4];
0088 TH1D* hdx[4];
0089 TH1D* hdz[4];
0090
0091 TH1D* htrk;
0092 TH1D* htrk_dx[4];
0093 TH1D* htrk_dz[4];
0094 TH1D* htrk_chi2xy;
0095 TH1D* htrk_chi2zy;
0096
0097 TH1D* htrk_cut;
0098 TH1D* htrk_cut_dx[4];
0099 TH1D* htrk_cut_dz[4];
0100 TH1D* htrk_cut_chi2xy;
0101 TH1D* htrk_cut_chi2zy;
0102
0103
0104
0105 int _ievent;
0106 std::map<int, mis> _misalign;
0107 MvtxStandaloneTracking* mvtxtracking_;
0108
0109 };
0110
0111 #endif