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