CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughMap.h
Go to the documentation of this file.
1#ifndef HOUGHMAP_H
2#define HOUGHMAP_H
3
4#include <vector>
5#include "TH2D.h"
6#include "TF1.h"
7#include "TGraph.h"
8#include "MdcHoughFinder/HoughHit.h"
9#include "MdcHoughFinder/HoughHitList.h"
10#include "MdcHoughFinder/HoughPeak.h"
11#include "MdcHoughFinder/HoughTrack.h"
12#include <memory>
13
14using namespace std;
15
16//class HoughPeak;
17
18class HoughMap{
19 public:
20 HoughMap(int charge, HoughHitList &houghHitList,int mapHit,int ntheta,int nrho,double rhoMin,double rhoMaxi,int peakWidth,int peakHigh,double hitpro);
22 HoughMap(const HoughMap& other);
23 void doMap();
25
26 TH2D* getMdcHoughFinder() const {return _houghSpace;}
27// TH2D* getHoughR() const {return _houghR;}
28 const HoughHitList& getHitList() const {return _hitList;}
29 //
30 int getPeakNumber() const {return _houghPeakList.size();}
31 int getTrackNumber() const {return _houghTrackList.size();}
32 const HoughPeak& getPeak(int i) const {return _houghPeakList[i];}
33 const HoughTrack& getTrack(int i) const {return _houghTrackList[i];}
34 //HoughPeak& getPeak(int i) {return _houghPeakList[i];}
35
36 const vector<HoughPeak> getPeakList() const {return _houghPeakList;}
37 const vector<HoughTrack> getTrackList() const {return _houghTrackList;}
38// vector<const HoughHit*> getMapHitList(int i,int j) const {return _mapHitList[i][j];}
39 int getPeakWidth() const {return _peakWidth;}
40 int getPeakHigh() const {return _peakHigh;}
41 int getNTheta() const {return _nTheta;}
42 int getNRho() const {return _nRho;}
43// double** getNL() const {return _houghNL;}
44// double** getRL() const {return _houghRL;}
45// double** getS2() const {return _houghS2;}
46// double** getS() const {return _houghS;}
47 void printPeak();
48 void printTrack();
49 void clearMap();
50
51 //unused
52 //void select_slant();
53 //vector<double> get_maxlayer_slant() const {return maxlayer_slant;}
54 //double get_maxlayer() const {return m_maxlayer;}
55 //vector<double> get_nomaxlayer_slant() const {return nomaxlayer_slant;}
56 //vector<int> get_nomaxlayerid() const {return nomaxlayerid;}
57
58 static int m_debug;
59 static int m_useHalfCir;
60 static int m_N1;
61 static int m_N2;
62 static int m_nPoint2D;
63 static int m_method;
64 static double m_nRMS;
65
66 //unused
67 double Rho;
68 double Theta;
69 double Height;
70 //
71 int MAX;
72
73 double exTheta(int,double ,double ,int );
74 double exRho(int,double ,double ,int );
75 int exThetaBin(double );
76 int exRhoBin(double );
78
79 private:
80 void buildMap();
81 void findPeaks(vector< vector<int> > vec_hist,double ,double ,double ,double );
82 //void loopPeak(double ,double ,int ,int, double hist[1000][1000]);
83 void loopPeak(double ,double ,int ,int);
84 void sortPeaks();
85 void hitFinding();
86 void trackFinder();
87 void compareTrack_and_Peak(HoughTrack& track,HoughPeak& peak);
88 // distribution of noise and peak
89 void mapDev(vector< vector<int> > vec_hist,double& aver ,double& sigma);
90 void mapDev(TH2D* h,double& aver ,double& sigma);
91 double mapDev(TH2D* h,double nRMS);
92
93 //unused
94 int mergeNeighbor(int** hough_trans_CS_peak,double ,double ,double ,double );
95 void combineNeighbor(int ipeak);
96 void combine_two_cells(vector< const HoughHit* >&cellHitList,int ax,int py);
97 void candiTrack();
98
99 //in study
100 void gravity();
101 void cald_layer();
102 void Leastfit(vector<double>, vector<double>,double&,double&);
103 void buildHoughMap(int x_bin, double x_min, double x_max, int y_bin, double y_min, double y_max, int nPoint, int peak);
104 void findHoughPeaks(vector<HoughPeak>& vecPeak);
105 void clearHoughMap();
106 void findPeaks();
107
108 //class member
109 int _mapHit; //0 all ; 1 axial
110 int _nTheta; //number of theta bin
111 int _nRho; //number of rho bin
112 double _thetaMin; //0
113 double _thetaMax; //M_PI
114 double _rhoMin; // -0.1
115 double _rhoMax; // 0.1
116 int _peakWidth; //no use ?
117 int _peakHigh; //no use ?
118 double _hitpro; // proportion cut in other track
119 int _charge; //map charge
120 HoughHitList _hitList;//hit list in this space
121 vector<HoughPeak> _houghPeakList;//peak list of HoughRec space
122 vector<HoughTrack> _houghTrackList;//peak list of HoughRec space
123 TH2D* _houghSpace;//accumulate array of HoughRec space
124 TH2D* _houghMap;//accumulate array of HoughRec space
125 //double** _houghRL;
126 //double** _houghNL;
127 //TH2D* _houghR;
128// double** _houghS;
129// double** _houghS2;
130// vector< const HoughHit* >** _mapHitList;//hits of each bin in the accumulate array
131
132 // in map study
133 //vector<double> maxlayer_slant;
134 //double m_maxlayer;
135 //vector<double> nomaxlayer_slant;
136 //vector<int> nomaxlayerid;
137
138
139
140};
141#endif
142
void printPeak()
HoughMap(const HoughMap &other)
void clearMap()
void printMapHit()
HoughMap(int charge, HoughHitList &houghHitList, int mapHit, int ntheta, int nrho, double rhoMin, double rhoMaxi, int peakWidth, int peakHigh, double hitpro)
int exRhoBin(double)
void doMap()
double exRho(int, double, double, int)
void printTrack()
int exThetaBin(double)
double exTheta(int, double, double, int)