CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
HoughMap Class Reference

#include <HoughMap.h>

Public Member Functions

 HoughMap (int charge, HoughHitList &houghHitList, int mapHit, int ntheta, int nrho, double rhoMin, double rhoMaxi, int peakWidth, int peakHigh, double hitpro)
 
 HoughMap ()
 
 HoughMap (const HoughMap &other)
 
void doMap ()
 
 ~HoughMap ()
 
TH2D * getMdcHoughFinder () const
 
const HoughHitListgetHitList () const
 
int getPeakNumber () const
 
int getTrackNumber () const
 
const HoughPeakgetPeak (int i) const
 
const HoughTrackgetTrack (int i) const
 
const vector< HoughPeakgetPeakList () const
 
const vector< HoughTrackgetTrackList () const
 
int getPeakWidth () const
 
int getPeakHigh () const
 
int getNTheta () const
 
int getNRho () const
 
void printPeak ()
 
void printTrack ()
 
void clearMap ()
 
double exTheta (int, double, double, int)
 
double exRho (int, double, double, int)
 
int exThetaBin (double)
 
int exRhoBin (double)
 
void printMapHit ()
 
 HoughMap (int charge, HoughHitList &houghHitList, int mapHit, int ntheta, int nrho, double rhoMin, double rhoMaxi, int peakWidth, int peakHigh, double hitpro)
 
 HoughMap ()
 
 HoughMap (const HoughMap &other)
 
void doMap ()
 
 ~HoughMap ()
 
TH2D * getMdcHoughFinder () const
 
const HoughHitListgetHitList () const
 
int getPeakNumber () const
 
int getTrackNumber () const
 
const HoughPeakgetPeak (int i) const
 
const HoughTrackgetTrack (int i) const
 
const vector< HoughPeakgetPeakList () const
 
const vector< HoughTrackgetTrackList () const
 
int getPeakWidth () const
 
int getPeakHigh () const
 
int getNTheta () const
 
int getNRho () const
 
void printPeak ()
 
void printTrack ()
 
void clearMap ()
 
double exTheta (int, double, double, int)
 
double exRho (int, double, double, int)
 
int exThetaBin (double)
 
int exRhoBin (double)
 
void printMapHit ()
 

Public Attributes

double Rho
 
double Theta
 
double Height
 
int MAX
 

Static Public Attributes

static int m_debug =0
 
static int m_useHalfCir =0
 
static int m_N1
 
static int m_N2
 
static int m_nPoint2D =1
 
static int m_method =1
 
static double m_nRMS =3
 

Detailed Description

Constructor & Destructor Documentation

◆ HoughMap() [1/6]

HoughMap::HoughMap ( int  charge,
HoughHitList houghHitList,
int  mapHit,
int  ntheta,
int  nrho,
double  rhoMin,
double  rhoMaxi,
int  peakWidth,
int  peakHigh,
double  hitpro 
)

Definition at line 20 of file HoughMap.cxx.

20 {
21 _hitList=houghHitList;
22 _mapHit=mapHit;
23 _nTheta=ntheta;
24 _nRho=nrho;
25 _thetaMin=0;
26 _thetaMax=M_PI;
27 _rhoMin=rhoMin;
28 _rhoMax=rhoMax;
29 _peakWidth=peakWidth;
30 _peakHigh=peakHigh;
31 _hitpro=hitpro;
32 _charge=charge;
33
34 //_mapHitList = new vector<const HoughHit*>*[_nTheta];
35 //_houghS= new double*[_nTheta];
36 //_houghS2= new double*[m_N2];
37 // _houghR= new double*[_nTheta];
38 // _houghRL= new double*[_nTheta];
39 // _houghNL= new double*[_nTheta];
40
41 //for(int i=0; i<_nTheta; i++){
42 //_mapHitList[i] = new vector<const HoughHit*>[_nRho];
43 // _houghS[i] = new double[_nRho];
44 // _houghR[i] = new double[_nRho];
45 // _houghRL[i] = new double[_nRho];
46 // _houghNL[i] = new double[_nRho];
47 // for(int j=0; j<_nRho; j++){
48 // _houghS[i][j]=0;
49 // _houghR[i][j]=0;
50 // }
51 //}
52 // for(int i=0; i<m_N2; i++){
53 // _houghS2[i] = new double[m_N2];
54 // for(int j=0; j<m_N2; j++){
55 // _houghS2[i][j]=0;
56 // }
57 // }
58
59 if(_charge==-1) _houghSpace = new TH2D("houghspace","houghspace",_nTheta,_thetaMin,_thetaMax,_nRho,_rhoMin,_rhoMax);
60 if(_charge==1 ) _houghSpace = new TH2D("houghspace2","houghspace2",_nTheta,_thetaMin,_thetaMax,_nRho,_rhoMin,_rhoMax);
61 //if(_charge==-1) _houghSpace2 = new TH2D("houghSpace","houghSpace",_nTheta,_thetaMin,_thetaMax,_nRho,_rhoMin,_rhoMax);
62 //if(_charge==1 ) _houghSpace2 = new TH2D("houghSpace2","houghSpace2",_nTheta,_thetaMin,_thetaMax,_nRho,_rhoMin,_rhoMax);
63 // _houghR= new TH2D("houghR","houghR",_nTheta,_thetaMin,_thetaMax,_nRho,_rhoMin,_rhoMax);
64
65 doMap();
66}
#define M_PI
Definition: TConstant.h:4
void doMap()
Definition: HoughMap.cxx:103

◆ HoughMap() [2/6]

HoughMap::HoughMap ( )

Definition at line 15 of file HoughMap.cxx.

15 {
16 //_mapHitList=NULL;
17 _houghSpace=NULL;
18}

◆ HoughMap() [3/6]

HoughMap::HoughMap ( const HoughMap other)

Definition at line 67 of file HoughMap.cxx.

67 {
68 _mapHit =other._mapHit,
69 _nTheta =other._nTheta,
70 _nRho =other._nRho,
71 _thetaMin=other._thetaMin,
72 _thetaMax=other._thetaMax,
73 _rhoMin =other._rhoMin,
74 _rhoMax =other._rhoMax,
75 _hitList =other._hitList,
76 _houghPeakList=other._houghPeakList,
77 _houghTrackList=other._houghTrackList,
78 _houghSpace = other._houghSpace,
79 _charge = other._charge;
80 //_houghR= other._houghR;
81
82 //_mapHitList = new vector<const HoughHit*>*[_nTheta];
83 //_houghNL= new double*[_nTheta];
84 //_houghRL= new double*[_nTheta];
85 //_houghS= new double*[_nTheta];
86 //for(int i=0; i<_nTheta; i++){
87 //_mapHitList[i] = new vector<const HoughHit*>[_nRho];
88 // _houghNL[i] = new double[_nRho];
89 // _houghRL[i] = new double[_nRho];
90 //_houghS[i] = new double[_nRho];
91 //}
92
93 //for(int i=0; i<_nTheta; i++){
94 // for(int j=0; j<_nRho; j++){
95 //_mapHitList[i][j]=other._mapHitList[i][j];
96 // _houghNL[i][j]=other._houghNL[i][j];
97 // _houghRL[i][j]=other._houghRL[i][j];
98 // _houghS[i][j]=other._houghS[i][j];
99 // }
100 // }
101}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~HoughMap() [1/2]

HoughMap::~HoughMap ( )

Definition at line 140 of file HoughMap.cxx.

140 {
141 clearMap();
142}
void clearMap()
Definition: HoughMap.cxx:126

◆ HoughMap() [4/6]

HoughMap::HoughMap ( int  charge,
HoughHitList houghHitList,
int  mapHit,
int  ntheta,
int  nrho,
double  rhoMin,
double  rhoMaxi,
int  peakWidth,
int  peakHigh,
double  hitpro 
)

◆ HoughMap() [5/6]

HoughMap::HoughMap ( )

◆ HoughMap() [6/6]

HoughMap::HoughMap ( const HoughMap other)

◆ ~HoughMap() [2/2]

HoughMap::~HoughMap ( )

Member Function Documentation

◆ clearMap() [1/2]

void HoughMap::clearMap ( )

Definition at line 126 of file HoughMap.cxx.

126 {
127
128 // for(int i=0; i<_nTheta; i++){ delete []_mapHitList[i];delete []_houghNL; delete []_houghRL;delete []_houghS;}
129 // for(int i=0; i<_nTheta; i++){ delete []_mapHitList[i]; }
130 // delete []_mapHitList;
131 delete _houghSpace;
132 //delete _houghSpace2;
133 // for(int i=0; i<_nTheta; i++){ delete []_houghS[i];}
134 // delete []_houghS;
135 // delete _houghR;
136 // for(int i=0; i<m_N2; i++) { delete []_houghS2[i];}
137 // delete []_houghS2;
138}

Referenced by ~HoughMap().

◆ clearMap() [2/2]

void HoughMap::clearMap ( )

◆ doMap() [1/2]

void HoughMap::doMap ( )

Definition at line 103 of file HoughMap.cxx.

103 {
104 if(m_method==1)buildMap();
105 if(m_method==2)findPeaks();
106 //{
107 //buildHoughMap();
108 //findHoughPeaks();
109 //}
110 //mapDev();
111 //cald_layer();
112 //select_slant();
113 //gravity();
114 //findPeaks();
115 //if(m_debug>0) {cout<<" before sort "<<endl; printPeak();}
116 //{cout<<" before sort "<<endl; printPeak();}
117 sortPeaks();
118 //{cout<<" after sort "<<endl; printPeak();}
119 hitFinding();
120 trackFinder();
121 if(m_debug>0) { cout<<" after sort "<<endl; printPeak();}
122 // candiTrack();
123 if(m_debug>0) printTrack();
124}
void printPeak()
Definition: HoughMap.cxx:954
void printTrack()
Definition: HoughMap.cxx:966

Referenced by HoughMap().

◆ doMap() [2/2]

void HoughMap::doMap ( )

◆ exRho() [1/2]

double HoughMap::exRho ( int  irho,
double  rhomin,
double  rhomax,
int  n 
)

Definition at line 878 of file HoughMap.cxx.

878 {
879 //double rho = _rhoMin+(irho+1/2.)*(_rhoMax-_rhoMin)/_nRho;
880 double rho = rhomin+(irho+1/2.)*(rhomax-rhomin)/n;
881 return rho;
882}
const Int_t n

◆ exRho() [2/2]

double HoughMap::exRho ( int  ,
double  ,
double  ,
int   
)

◆ exRhoBin() [1/2]

int HoughMap::exRhoBin ( double  )

◆ exRhoBin() [2/2]

int HoughMap::exRhoBin ( double  )

◆ exTheta() [1/2]

double HoughMap::exTheta ( int  itheta,
double  thetamin,
double  thetamax,
int  n 
)

Definition at line 884 of file HoughMap.cxx.

884 {
885 double theta= thetamin+(itheta+1/2.)*(thetamax-thetamin)/n;
886 return theta;
887}

◆ exTheta() [2/2]

double HoughMap::exTheta ( int  ,
double  ,
double  ,
int   
)

◆ exThetaBin() [1/2]

int HoughMap::exThetaBin ( double  )

◆ exThetaBin() [2/2]

int HoughMap::exThetaBin ( double  )

◆ getHitList() [1/2]

const HoughHitList & HoughMap::getHitList ( ) const
inline

Definition at line 28 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

28{return _hitList;}

◆ getHitList() [2/2]

const HoughHitList & HoughMap::getHitList ( ) const
inline

◆ getMdcHoughFinder() [1/2]

TH2D * HoughMap::getMdcHoughFinder ( ) const
inline

Definition at line 26 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

26{return _houghSpace;}

◆ getMdcHoughFinder() [2/2]

TH2D * HoughMap::getMdcHoughFinder ( ) const
inline

Definition at line 26 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughMap.h.

26{return _houghSpace;}

◆ getNRho() [1/2]

int HoughMap::getNRho ( ) const
inline

Definition at line 42 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

42{return _nRho;}

◆ getNRho() [2/2]

int HoughMap::getNRho ( ) const
inline

◆ getNTheta() [1/2]

int HoughMap::getNTheta ( ) const
inline

Definition at line 41 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

41{return _nTheta;}

◆ getNTheta() [2/2]

int HoughMap::getNTheta ( ) const
inline

◆ getPeak() [1/2]

const HoughPeak & HoughMap::getPeak ( int  i) const
inline

Definition at line 32 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

32{return _houghPeakList[i];}

◆ getPeak() [2/2]

const HoughPeak & HoughMap::getPeak ( int  i) const
inline

Definition at line 32 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughMap.h.

32{return _houghPeakList[i];}

◆ getPeakHigh() [1/2]

int HoughMap::getPeakHigh ( ) const
inline

Definition at line 40 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

40{return _peakHigh;}

◆ getPeakHigh() [2/2]

int HoughMap::getPeakHigh ( ) const
inline

◆ getPeakList() [1/2]

const vector< HoughPeak > HoughMap::getPeakList ( ) const
inline

Definition at line 36 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

36{return _houghPeakList;}

◆ getPeakList() [2/2]

const vector< HoughPeak > HoughMap::getPeakList ( ) const
inline

Definition at line 36 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughMap.h.

36{return _houghPeakList;}

◆ getPeakNumber() [1/2]

int HoughMap::getPeakNumber ( ) const
inline

Definition at line 30 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

30{return _houghPeakList.size();}

Referenced by printPeak().

◆ getPeakNumber() [2/2]

int HoughMap::getPeakNumber ( ) const
inline

Definition at line 30 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughMap.h.

30{return _houghPeakList.size();}

◆ getPeakWidth() [1/2]

int HoughMap::getPeakWidth ( ) const
inline

Definition at line 39 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

39{return _peakWidth;}

◆ getPeakWidth() [2/2]

int HoughMap::getPeakWidth ( ) const
inline

Definition at line 39 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughMap.h.

39{return _peakWidth;}

◆ getTrack() [1/2]

const HoughTrack & HoughMap::getTrack ( int  i) const
inline

Definition at line 33 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

33{return _houghTrackList[i];}

◆ getTrack() [2/2]

const HoughTrack & HoughMap::getTrack ( int  i) const
inline

Definition at line 33 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughMap.h.

33{return _houghTrackList[i];}

◆ getTrackList() [1/2]

const vector< HoughTrack > HoughMap::getTrackList ( ) const
inline

Definition at line 37 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

37{return _houghTrackList;}

Referenced by HoughTrackList::HoughTrackList().

◆ getTrackList() [2/2]

const vector< HoughTrack > HoughMap::getTrackList ( ) const
inline

Definition at line 37 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughMap.h.

37{return _houghTrackList;}

◆ getTrackNumber() [1/2]

int HoughMap::getTrackNumber ( ) const
inline

Definition at line 31 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughMap.h.

31{return _houghTrackList.size();}

Referenced by printTrack().

◆ getTrackNumber() [2/2]

int HoughMap::getTrackNumber ( ) const
inline

Definition at line 31 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughMap.h.

31{return _houghTrackList.size();}

◆ printMapHit() [1/2]

void HoughMap::printMapHit ( )

◆ printMapHit() [2/2]

void HoughMap::printMapHit ( )

◆ printPeak() [1/2]

void HoughMap::printPeak ( )

Definition at line 954 of file HoughMap.cxx.

954 {
955 cout<<"Print Peak in HoughMap sumPeak: "<<_houghPeakList.size()<<endl;
956 cout<<"nPeak:"<<getPeakNumber()<<endl;
957 vector<HoughPeak>::iterator iter =_houghPeakList.begin();
958 for(int i=0;iter!=_houghPeakList.end();iter++,i++){
959 //cout<<"count of Peak on HoughMap: "<<(*iter).getHoughHitList().size()<<endl;
960 //(*iter).printAllHit();
961 (*iter).print();
962
963 }
964}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

Referenced by doMap().

◆ printPeak() [2/2]

void HoughMap::printPeak ( )

◆ printTrack() [1/2]

void HoughMap::printTrack ( )

Definition at line 966 of file HoughMap.cxx.

966 {
967 cout<<"Print Track in HoughMap: "<<endl;
968 cout<<"nTrack:"<<getTrackNumber()<<endl;
969 vector<HoughTrack>::iterator iter =_houghTrackList.begin();
970 for(int i=0;iter!=_houghTrackList.end();iter++,i++){
971 //cout<<"Print Track"<<i<<endl;
972 //(*iter).printRecHit();
973 //(*iter).print();
974 (*iter).printHoughTrack();
975 (*iter).getCenterPeak().print();
976 }
977}

Referenced by doMap().

◆ printTrack() [2/2]

void HoughMap::printTrack ( )

Member Data Documentation

◆ Height

double HoughMap::Height

◆ m_debug

int HoughMap::m_debug =0
static

◆ m_method

int HoughMap::m_method =1
static

◆ m_N1

int HoughMap::m_N1
static

◆ m_N2

int HoughMap::m_N2
static

◆ m_nPoint2D

int HoughMap::m_nPoint2D =1
static

◆ m_nRMS

double HoughMap::m_nRMS =3
static

◆ m_useHalfCir

int HoughMap::m_useHalfCir =0
static

◆ MAX

int HoughMap::MAX

◆ Rho

double HoughMap::Rho

◆ Theta

double HoughMap::Theta

The documentation for this class was generated from the following files: