BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcHoughFinder/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
19 public:
20 HoughMap(int charge, HoughHitList &houghHitList,int mapHit,int ntheta,int nrho,double rhoMin,double rhoMaxi,int peakWidth,int peakHigh,double hitpro);
21 HoughMap();
22 HoughMap(const HoughMap& other);
23 void doMap();
24 ~HoughMap();
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
63 //unused
64 double Rho;
65 double Theta;
66 double Height;
67 //
68 int MAX;
69
70 double exTheta(int,double ,double ,int );
71 double exRho(int,double ,double ,int );
72 int exThetaBin(double );
73 int exRhoBin(double );
75
76 private:
77 void buildMap();
78 void findPeaks(vector< vector<int> > vec_hist,double ,double ,double ,double );
79 //void loopPeak(double ,double ,int ,int, double hist[1000][1000]);
80 void loopPeak(double ,double ,int ,int);
81 void sortPeaks();
82 void hitFinding();
83 void trackFinder();
84 void compareTrack_and_Peak(HoughTrack& track,HoughPeak& peak);
85 // distribution of noise and peak
86 void mapDev(vector< vector<int> > vec_hist,double& aver ,double& sigma);
87 void mapDev(TH2D* h,double& aver ,double& sigma);
88
89 //unused
90 int mergeNeighbor(int** hough_trans_CS_peak,double ,double ,double ,double );
91 void combineNeighbor(int ipeak);
92 void combine_two_cells(vector< const HoughHit* >&cellHitList,int ax,int py);
93 void candiTrack();
94
95 //in study
96 void gravity();
97 void cald_layer();
98 void Leastfit(vector<double>, vector<double>,double&,double&);
99
100 //class member
101 int _mapHit; //0 all ; 1 axial
102 int _nTheta; //number of theta bin
103 int _nRho; //number of rho bin
104 double _thetaMin; //0
105 double _thetaMax; //M_PI
106 double _rhoMin; // -0.1
107 double _rhoMax; // 0.1
108 int _peakWidth; //no use ?
109 int _peakHigh; //no use ?
110 double _hitpro; // proportion cut in other track
111 int _charge; //map charge
112 HoughHitList _hitList;//hit list in this space
113 vector<HoughPeak> _houghPeakList;//peak list of HoughRec space
114 vector<HoughTrack> _houghTrackList;//peak list of HoughRec space
115 TH2D* _houghSpace;//accumulate array of HoughRec space
116 //double** _houghRL;
117 //double** _houghNL;
118 //TH2D* _houghR;
119// double** _houghS;
120// double** _houghS2;
121// vector< const HoughHit* >** _mapHitList;//hits of each bin in the accumulate array
122
123 // in map study
124 vector<double> maxlayer_slant;
125 double m_maxlayer;
126 vector<double> nomaxlayer_slant;
127 vector<int> nomaxlayerid;
128
129
130
131};
132#endif
133
void printPeak()
Definition: HoughMap.cxx:128
void clearMap()
Definition: HoughMap.cxx:116
void select_slant()
Definition: HoughMap.cxx:554
void printMapHit()
int exRhoBin(double)
void doMap()
Definition: HoughMap.cxx:98
const vector< HoughTrack > getTrackList() const
const vector< HoughPeak > getPeakList() const
double exRho(int, double, double, int)
Definition: HoughMap.cxx:340
void printTrack()
Definition: HoughMap.cxx:433
HoughMap()
Definition: HoughMap.cxx:12
int exThetaBin(double)
double exTheta(int, double, double, int)
Definition: HoughMap.cxx:345