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

#include <HoughPeak.h>

Public Member Functions

 HoughPeak ()
 
 HoughPeak (const HoughPeak &other)
 
 ~HoughPeak ()
 
 HoughPeak (int itheta, int irho, double theta, double rho, vector< const HoughHit * > **mapHitList, bool is, int peakNum)
 
 HoughPeak (int height, int itheta, int irho, double theta, double rho, bool is, int peakNum, int charge)
 
vector< const HoughHit * > getHoughHitList () const
 
int peakHeight () const
 
int getPeakNum () const
 
int getThetaBin () const
 
int getRhoBin () const
 
double getTheta () const
 
double getRho () const
 
double getRho_reci () const
 
bool getisCandiTrack () const
 
void setisCandiTrack (bool is)
 
int getHitNum (int) const
 
int getHitNumA (int) const
 
int getHitNumS (int) const
 
void printAllHit () const
 
void print ()
 
HoughPeakoperator= (const HoughPeak &other)
 
int collectHits (HoughHitList &)
 
double intersect_cylinder (double r_cylinder, double r_center, double phi_center, int charge)
 
double intersect_cylinder (int charge, double x_center, double y_center, double r_cylinder)
 
 HoughPeak ()
 
 HoughPeak (const HoughPeak &other)
 
 ~HoughPeak ()
 
 HoughPeak (int itheta, int irho, double theta, double rho, vector< const HoughHit * > **mapHitList, bool is, int peakNum)
 
 HoughPeak (int height, int itheta, int irho, double theta, double rho, bool is, int peakNum, int charge)
 
vector< const HoughHit * > getHoughHitList () const
 
int peakHeight () const
 
int getPeakNum () const
 
int getThetaBin () const
 
int getRhoBin () const
 
double getTheta () const
 
double getRho () const
 
double getRho_reci () const
 
bool getisCandiTrack () const
 
void setisCandiTrack (bool is)
 
int getHitNum (int) const
 
int getHitNumA (int) const
 
int getHitNumS (int) const
 
void printAllHit () const
 
void print ()
 
HoughPeakoperator= (const HoughPeak &other)
 
int collectHits (HoughHitList &)
 
double intersect_cylinder (double r_cylinder, double r_center, double phi_center, int charge)
 
double intersect_cylinder (int charge, double x_center, double y_center, double r_cylinder)
 

Static Public Attributes

static double m_dcut1
 
static double m_dcut2
 
static bool m_debug =0
 
static double m_factor =5.0
 
static vector< double > m_cut_deltaD
 

Detailed Description

Constructor & Destructor Documentation

◆ HoughPeak() [1/8]

HoughPeak::HoughPeak ( )

Definition at line 24 of file HoughPeak.cxx.

24 {
25}

◆ HoughPeak() [2/8]

HoughPeak::HoughPeak ( const HoughPeak other)

Definition at line 59 of file HoughPeak.cxx.

60{
61 if(_houghPeakHitList.size() != 0 ){
62 for(int i =0;i<_houghPeakHitList.size();i++){
63 _houghPeakHitList[i]=NULL;
64 }
65 _houghPeakHitList.clear();
66 }
67 _height=other._height;
68 _theta=other._theta;
69 _rho=other._rho;
70 _thetaBin=other._thetaBin;
71 _rhoBin=other._rhoBin;
72 _houghPeakHitList = other._houghPeakHitList;
73 _isCandiTrack=other._isCandiTrack;
74 _peakNum=other._peakNum;
75 _charge=other._charge;
76 //for(int i =0;i<other._houghPeakHitList.size();i++){
77 // const HoughHit* p_hit= new HoughHit( *(other._houghPeakHitList[i]));
78 // _houghPeakHitList.push_back(p_hit);
79 //}
80}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~HoughPeak() [1/2]

HoughPeak::~HoughPeak ( )

Definition at line 26 of file HoughPeak.cxx.

26 {
27 // cout<<" HoughPeak destruct" <<endl;
28 for(int i =0;i<_houghPeakHitList.size();i++){
29 // delete _houghPeakHitList[i];
30 _houghPeakHitList[i]=NULL;
31 }
32 _houghPeakHitList.clear();
33}

◆ HoughPeak() [3/8]

HoughPeak::HoughPeak ( int  itheta,
int  irho,
double  theta,
double  rho,
vector< const HoughHit * > **  mapHitList,
bool  is,
int  peakNum 
)

Definition at line 82 of file HoughPeak.cxx.

82 {
83 _thetaBin=itheta;
84 _rhoBin=irho;
85 _theta=theta;
86 _rho=rho;
87 _houghPeakHitList = mapHitList[itheta][irho];
88 _isCandiTrack =isCandiTrack;
89 _peakNum=peakNum;
90 // int t_size=mapHitList[itheta][irho].size();
91 // for(int i =0;i<t_size;i++){
92 // const HoughHit* p_hit= new HoughHit( *(mapHitList[itheta][irho][i]));
93 // _houghPeakHitList.push_back(p_hit);
94 // }
95}

◆ HoughPeak() [4/8]

HoughPeak::HoughPeak ( int  height,
int  itheta,
int  irho,
double  theta,
double  rho,
bool  is,
int  peakNum,
int  charge 
)

Definition at line 97 of file HoughPeak.cxx.

97 {
98 _height=height;
99 _thetaBin=itheta;
100 _rhoBin=irho;
101 _theta=theta;
102 _rho=rho;
103 // _houghPeakHitList = mapHitList[itheta][irho];
104 _isCandiTrack =isCandiTrack;
105 _peakNum=peakNum;
106 _charge=charge;
107 // collectHits(hitlist);
108}

◆ HoughPeak() [5/8]

HoughPeak::HoughPeak ( )

◆ HoughPeak() [6/8]

HoughPeak::HoughPeak ( const HoughPeak other)

◆ ~HoughPeak() [2/2]

HoughPeak::~HoughPeak ( )

◆ HoughPeak() [7/8]

HoughPeak::HoughPeak ( int  itheta,
int  irho,
double  theta,
double  rho,
vector< const HoughHit * > **  mapHitList,
bool  is,
int  peakNum 
)

◆ HoughPeak() [8/8]

HoughPeak::HoughPeak ( int  height,
int  itheta,
int  irho,
double  theta,
double  rho,
bool  is,
int  peakNum,
int  charge 
)

Member Function Documentation

◆ collectHits() [1/2]

int HoughPeak::collectHits ( HoughHitList hitlist)

Definition at line 193 of file HoughPeak.cxx.

193 {
194 if(m_debug>0)cout<<endl<<"in "<<__FILE__<<" collectHits:"<<endl;
195 //mean
196 //double p0[3] = {0.198127,0.124575,0.147637};
197 //double p1[3] = {-16.3613,-8.02201,-11.4986};
198 //double p2[3] = {0.235927,0.255211,0.269964};
199 //x3y4
200 //double p0[3] = {0.124424,0.0803608,0.514702};
201 //double p1[3] = {-2.41956,0.050727,-42.9705};
202 //double p2[3] = {0.35053,0.297292,0.355571};
203 double cirr_track = fabs(1./(_rho));
204 double cirx_track = (1./_rho)*cos(_theta);
205 double ciry_track = (1./_rho)*sin(_theta);
206 double pt = fabs( (1./_rho)/333.567 );
207 if(m_debug>0)cout<<"peakNum:"<<_peakNum<<" peak height:"<<_height<<" rho,theta:"<<_rho<<","<<_theta<<" circle center(x,y):("<<cirx_track<<","<<ciry_track<<")"<<endl;
208 //std::vector<HoughHit>::const_iterator iter= hitlist.getList().begin();
209 std::vector<HoughHit>::iterator iter= hitlist.getList().begin();
210 //int XVcluster(0);
211 for(; iter!= hitlist.getList().end(); iter++){
212 //const HoughHit *hit = &(*iter);
213 HoughHit *hit = &(*iter);
214 int layer = hit->getLayerId();
215 int wire = hit->getWireId();
216 if(hit->getDetectorType() == MDC && hit->getSlayerType()!=0 ) continue;
217 if(hit->getDetectorType() == CGEM && (hit->getCluster())->getflag() ==1) continue;
218 double cirx_hit = hit->getMidX();
219 double ciry_hit = hit->getMidY();
220 double cirr_hit = hit->getDriftDist();
221 if( _charge == 1 && (cirx_track*ciry_hit - ciry_track*cirx_hit>=0) ) continue; // suppose charge -1 FIXME
222 if( _charge ==-1 && (cirx_track*ciry_hit - ciry_track*cirx_hit<=0) ) continue; // suppose charge -1 FIXME
223 double deltaD ;
224 if(hit->getDetectorType() == MDC){
225 double l1l2 = sqrt( (cirx_hit-cirx_track)*(cirx_hit-cirx_track)+(ciry_hit-ciry_track)*(ciry_hit-ciry_track) );
226 if( l1l2>cirr_track ) deltaD = l1l2-cirr_track-cirr_hit;
227 if( l1l2<=cirr_track ) deltaD = l1l2-cirr_track+cirr_hit;
228 }else if(hit->getDetectorType() == CGEM){
229 double r_cgem = hit->getCgemGeomSvc()->getCgemLayer(layer)->getMiddleROfGapD()/10.;
230 double phi_cross = intersect_cylinder(_charge,cirx_track,ciry_track,r_cgem);
231 double phih_cluster = hit->getCluster()->getrecphi();
232 double dphi = phih_cluster - phi_cross;
233 if(dphi>M_PI)dphi-=2*M_PI;
234 if(dphi<-1*M_PI)dphi+=2*M_PI;
235 //double cut_factor = (1/(p0[layer]*pt*1000+p1[layer])+p2[layer])/cut_deltaD[layer];
236 //cout<<layer<<" "<<pt<<" "<<cut_factor<<endl;
237 //deltaD = r_cgem*dphi/cut_factor;
238 deltaD = r_cgem*dphi;
239 //hit->setDeltaD(deltaD);
240 }
241
242 //cal flight length
243
244 double theta_temp;
245 double l_temp;
246 //if(cirx_track==0||cirx_hit-cirx_track==0){
247 //theta_temp=0;
248 //}
249 //else{
250 theta_temp=M_PI-atan2(ciry_hit-ciry_track,cirx_hit-cirx_track)+atan2(ciry_track,cirx_track);
251 if(theta_temp>2*M_PI){
252 theta_temp=theta_temp-2*M_PI;
253 }
254 if(theta_temp<0){
255 theta_temp=theta_temp+2*M_PI;
256 }
257 //}
258 //cout<<" charge "<<_charge <<" "<<theta_temp<<endl;
259 if(_charge==-1) {
260 l_temp=cirr_track*theta_temp;
261 }
262 if(_charge==1) {
263 theta_temp=2*M_PI-theta_temp;
264 l_temp=cirr_track*(theta_temp);
265 }
266 if(m_debug>0)cout<<"hit: ("<<layer<<","<<wire<<") "<<" pt: "<<pt<<" deltaD: "<<deltaD<<" ,l: "<<l_temp<<endl;
267 //if( fabs(deltaD)<0.2 && l_temp<=35 ) _houghPeakHitList.push_back(hit); //suppose 60MeV FIXME
268 //if( fabs(deltaD)<0.2 && l_temp>35 && l_temp<=45) _houghPeakHitList.push_back(hit);
269 /*
270 double d_cut1 = m_dcut1;
271 if( pt<0.06 && fabs(deltaD)<d_cut1 && l_temp<=35 ) _houghPeakHitList.push_back(hit);
272 if( 0.06<pt&&pt<0.07 && fabs(deltaD)<d_cut1 && l_temp<=35 ) _houghPeakHitList.push_back(hit);
273 if( 0.07<pt&&pt<0.08 && fabs(deltaD)<d_cut1 && l_temp<=43 ) _houghPeakHitList.push_back(hit);
274 if( 0.08<pt&&pt<0.09 && fabs(deltaD)<d_cut1 && l_temp<=43 ) _houghPeakHitList.push_back(hit);
275 if( 0.09<pt&&pt<0.10 && fabs(deltaD)<d_cut1 && l_temp<=41 ) _houghPeakHitList.push_back(hit);
276 if( 0.10<pt&&pt<0.11 && fabs(deltaD)<d_cut1 && l_temp<=41 ) _houghPeakHitList.push_back(hit);
277 if( 0.11<pt&&pt<0.12 && fabs(deltaD)<d_cut1 && l_temp<=41 ) _houghPeakHitList.push_back(hit);
278 if( pt>0.12 && fabs(deltaD)<d_cut1 ) _houghPeakHitList.push_back(hit);
279
280 double d_cut2 = m_dcut2;
281 if( pt<0.06 && fabs(deltaD)<d_cut2 && l_temp>35&&l_temp<45 ) _houghPeakHitList.push_back(hit);
282 if( 0.06<pt&&pt<0.07 && fabs(deltaD)<d_cut2 && l_temp>35&& l_temp<=45) _houghPeakHitList.push_back(hit);
283 if( 0.07<pt&&pt<0.08 && fabs(deltaD)<d_cut2 && l_temp>43&& l_temp<=50) _houghPeakHitList.push_back(hit);
284 if( 0.10<pt&&pt<0.11 && fabs(deltaD)<d_cut2 && l_temp>80&& l_temp<=105) _houghPeakHitList.push_back(hit);
285 if( 0.11<pt&&pt<0.12 && fabs(deltaD)<d_cut2 && l_temp>80&& l_temp<=105) _houghPeakHitList.push_back(hit);
286 */
287 if( pt<0.06 && fabs(deltaD)<0.1&& l_temp<=35 ) _houghPeakHitList.push_back(hit);
288 if( 0.06<pt&&pt<0.07 && fabs(deltaD)<0.1 && l_temp<=35 ) _houghPeakHitList.push_back(hit);
289 if( 0.07<pt&&pt<0.08 && fabs(deltaD)<0.1 && l_temp<=43 ) _houghPeakHitList.push_back(hit);
290 if( 0.08<pt&&pt<0.09 && fabs(deltaD)<0.1 && l_temp<=43 ) _houghPeakHitList.push_back(hit);
291 if( 0.09<pt&&pt<0.10 && fabs(deltaD)<0.1 && l_temp<=41 ) _houghPeakHitList.push_back(hit);
292 if( 0.10<pt&&pt<0.11 && fabs(deltaD)<0.1 && l_temp<=41 ) _houghPeakHitList.push_back(hit);
293 if( 0.11<pt&&pt<0.12 && fabs(deltaD)<0.1 && l_temp<=41 ) _houghPeakHitList.push_back(hit);
294
295 if( pt<0.06 && fabs(deltaD)<0.1&& l_temp>35&&l_temp<45 ) _houghPeakHitList.push_back(hit);
296 if( 0.06<pt&&pt<0.07 && fabs(deltaD)<0.1 && l_temp>35&& l_temp<=45) _houghPeakHitList.push_back(hit);
297 if( 0.07<pt&&pt<0.08 && fabs(deltaD)<0.1 && l_temp>43&& l_temp<=50) _houghPeakHitList.push_back(hit);
298 if( 0.08<pt&&pt<0.09 && fabs(deltaD)<0.1 && l_temp>43&& l_temp<=50) _houghPeakHitList.push_back(hit);
299 // if( 0.09<pt&&pt<0.10 && fabs(deltaD)<0. && l_temp>41&& l_temp<=50) _houghPeakHitList.push_back(hit);
300 // if( 0.10<pt&&pt<0.11 && fabs(deltaD)<0. && l_temp>80&& l_temp<=105) _houghPeakHitList.push_back(hit);
301 // if( 0.11<pt&&pt<0.12 && fabs(deltaD)<0. && l_temp>80&& l_temp<=105) _houghPeakHitList.push_back(hit);
302 //if( pt>0.12 && fabs(deltaD)<0.1) _houghPeakHitList.push_back(hit);
303 //if( pt>0.12 && fabs(deltaD)<m_factor*cut_deltaD[layer]) _houghPeakHitList.push_back(hit);
304 if( pt>0.12 && fabs(deltaD)<m_factor*m_cut_deltaD[layer]) _houghPeakHitList.push_back(hit);
305 //_houghPeakHitList.push_back(hit);
306 }
307 return _houghPeakHitList.size();
308
309}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
double sin(const BesAngle a)
double cos(const BesAngle a)
#define M_PI
Definition: TConstant.h:4
const std::vector< HoughHit > & getList() const
double intersect_cylinder(double r_cylinder, double r_center, double phi_center, int charge)
Definition: HoughPeak.cxx:312

◆ collectHits() [2/2]

int HoughPeak::collectHits ( HoughHitList )

◆ getHitNum() [1/2]

int HoughPeak::getHitNum ( int  select) const

Definition at line 110 of file HoughPeak.cxx.

110 {
111 int size=_houghPeakHitList.size();
112 int n0,n1,n2,n3,n4,n5,n6;
113 n0=n1=n2=n3=n4=n5=n6=0;
114 for(int i=0;i<size;i++){
115 int cir= _houghPeakHitList[i]->getCirList();
116 int style= _houghPeakHitList[i]->getStyle();
117 // cout<<"peak compare ("<<_houghPeakHitList[i]->getLayerId()<<" ," <<_houghPeakHitList[i]->getWireId()<<" )"<<endl;
118 n0++;
119 if( style == 1 ) n1++;
120 if( style == 2 ) n2++;
121 if(_houghPeakHitList[i]->getDetectorType()==MDC){
122 int index = _houghPeakHitList[i]->digi()->getTrackIndex();
123 if( index < 0 ) n3++;
124 if( index >=0 && cir<=1 && style==0 ) n4++;
125 if( index <0 || cir>1 ) n5++;
126 if( index >=0 && cir==0 && style==0 ) n6++;
127 }
128 }
129 if( select == 0 ) return n0;
130 if( select == 1 ) return n1;
131 if( select == 2 ) return n2;
132 if( select == 3 ) return n3;
133 if( select == 4 ) return n4;
134 if( select == 5 ) return n5;
135 if( select == 6 ) return n6;
136}
int n2
Definition: SD0Tag.cxx:55
int n1
Definition: SD0Tag.cxx:54

◆ getHitNum() [2/2]

int HoughPeak::getHitNum ( int  ) const

◆ getHitNumA() [1/2]

int HoughPeak::getHitNumA ( int  select) const

Definition at line 137 of file HoughPeak.cxx.

137 {
138 int size=_houghPeakHitList.size();
139 int n0,n1,n2,n3,n4,n5,n6;
140 n0=n1=n2=n3=n4=n5=n6=0;
141 for(int i=0;i<size;i++){
142 int cir= _houghPeakHitList[i]->getCirList();
143 int type = _houghPeakHitList[i]->getSlayerType();
144 int style= _houghPeakHitList[i]->getStyle();
145 if( type ==0 ) n0++;
146 if( type==0 && style == 1 ) n1++;
147 if( type==0 && style == 2 ) n2++;
148 if(_houghPeakHitList[i]->getDetectorType()==MDC){
149 int index = _houghPeakHitList[i]->digi()->getTrackIndex();
150 if( type==0 && index < 0 ) n3++;
151 if( type==0 && index >=0 && cir<=1 && style==0) n4++;
152 if( type==0 && (index <0 || cir>1) ) n5++;
153 if( type==0 && index >=0 && cir==0 && style==0) n6++;
154 }
155 }
156 if( select == 0 ) return n0;
157 if( select == 1 ) return n1;
158 if( select == 2 ) return n2;
159 if( select == 3 ) return n3;
160 if( select == 4 ) return n4;
161 if( select == 5 ) return n5;
162 if( select == 6 ) return n6;
163}

Referenced by print().

◆ getHitNumA() [2/2]

int HoughPeak::getHitNumA ( int  ) const

◆ getHitNumS() [1/2]

int HoughPeak::getHitNumS ( int  select) const

Definition at line 164 of file HoughPeak.cxx.

164 {
165 int size=_houghPeakHitList.size();
166 int n0,n1,n2,n3,n4,n5,n6;
167 n0=n1=n2=n3=n4=n5=n6=0;
168 for(int i=0;i<size;i++){
169 int cir= _houghPeakHitList[i]->getCirList();
170 int type = _houghPeakHitList[i]->getSlayerType();
171 int style= _houghPeakHitList[i]->getStyle();
172 if( type !=0 ) n0++;
173 if( type!=0 && style == 1 ) n1++;
174 if( type!=0 && style == 2 ) n2++;
175 if(_houghPeakHitList[i]->getDetectorType()==MDC){
176 int index = _houghPeakHitList[i]->digi()->getTrackIndex();
177 if( type!=0 && index < 0 ) n3++;
178 if( type!=0 && index >=0 && cir<=1 && style==0) n4++;
179 if( type!=0 && (index <0 || cir>1) ) n5++;
180 if( type!=0 && index >=0 && cir==0 && style==0) n6++;
181 }
182 }
183 if( select == 0 ) return n0;
184 if( select == 1 ) return n1;
185 if( select == 2 ) return n2;
186 if( select == 3 ) return n3;
187 if( select == 4 ) return n4;
188 if( select == 5 ) return n5;
189 if( select == 6 ) return n6;
190}

◆ getHitNumS() [2/2]

int HoughPeak::getHitNumS ( int  ) const

◆ getHoughHitList() [1/2]

vector< const HoughHit * > HoughPeak::getHoughHitList ( ) const
inline

Definition at line 19 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughPeak.h.

19{return _houghPeakHitList;}

◆ getHoughHitList() [2/2]

vector< const HoughHit * > HoughPeak::getHoughHitList ( ) const
inline

Definition at line 19 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughPeak.h.

19{return _houghPeakHitList;}

◆ getisCandiTrack() [1/2]

bool HoughPeak::getisCandiTrack ( ) const
inline

Definition at line 27 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughPeak.h.

27{return _isCandiTrack;}

◆ getisCandiTrack() [2/2]

bool HoughPeak::getisCandiTrack ( ) const
inline

Definition at line 27 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/HoughPeak.h.

27{return _isCandiTrack;}

◆ getPeakNum() [1/2]

int HoughPeak::getPeakNum ( ) const
inline

Definition at line 21 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughPeak.h.

21{return _peakNum;}

◆ getPeakNum() [2/2]

int HoughPeak::getPeakNum ( ) const
inline

◆ getRho() [1/2]

double HoughPeak::getRho ( ) const
inline

◆ getRho() [2/2]

double HoughPeak::getRho ( ) const
inline

◆ getRho_reci() [1/2]

double HoughPeak::getRho_reci ( ) const
inline

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

26{return 1./_rho;}

◆ getRho_reci() [2/2]

double HoughPeak::getRho_reci ( ) const
inline

◆ getRhoBin() [1/2]

int HoughPeak::getRhoBin ( ) const
inline

Definition at line 23 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughPeak.h.

23{return _rhoBin;}

◆ getRhoBin() [2/2]

int HoughPeak::getRhoBin ( ) const
inline

◆ getTheta() [1/2]

double HoughPeak::getTheta ( ) const
inline

◆ getTheta() [2/2]

double HoughPeak::getTheta ( ) const
inline

◆ getThetaBin() [1/2]

int HoughPeak::getThetaBin ( ) const
inline

Definition at line 22 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughPeak.h.

22{return _thetaBin;}

◆ getThetaBin() [2/2]

int HoughPeak::getThetaBin ( ) const
inline

◆ intersect_cylinder() [1/4]

double HoughPeak::intersect_cylinder ( double  r_cylinder,
double  r_center,
double  phi_center,
int  charge 
)

Definition at line 312 of file HoughPeak.cxx.

313{
314 double phi;
315 if(charge==0)return 9999;
316 while(phi_center<0) phi_center += 2*M_PI;
317 while(phi_center>2*M_PI) phi_center -= 2*M_PI;
318 if(r_center<r_cylinder/2) return -9999;
319 double dphi = acos( r_cylinder/(2*r_center) );
320 if(charge<0) phi = phi_center + dphi;
321 else phi = phi_center - dphi;
322 while(phi<0) phi += 2*M_PI;
323 while(phi>2*M_PI) phi -= 2*M_PI;
324 return phi;
325}

Referenced by collectHits().

◆ intersect_cylinder() [2/4]

double HoughPeak::intersect_cylinder ( double  r_cylinder,
double  r_center,
double  phi_center,
int  charge 
)

◆ intersect_cylinder() [3/4]

double HoughPeak::intersect_cylinder ( int  charge,
double  x_center,
double  y_center,
double  r_cylinder 
)

Definition at line 326 of file HoughPeak.cxx.

327{
328 double phi;
329 double phi_center = atan2(y_center,x_center);
330 double r_center = sqrt(x_center*x_center+y_center*y_center);
331 if(charge==0)return 9999;
332 while(phi_center<0) phi_center += 2*M_PI;
333 while(phi_center>2*M_PI) phi_center -= 2*M_PI;
334 if(r_center<r_cylinder/2) return -9999;
335 double dphi = acos( r_cylinder/(2*r_center) );
336 if(charge<0) phi = phi_center + dphi;
337 else phi = phi_center - dphi;
338 while(phi<0) phi += 2*M_PI;
339 while(phi>2*M_PI) phi -= 2*M_PI;
340 return phi;
341}

◆ intersect_cylinder() [4/4]

double HoughPeak::intersect_cylinder ( int  charge,
double  x_center,
double  y_center,
double  r_cylinder 
)

◆ operator=() [1/2]

HoughPeak & HoughPeak::operator= ( const HoughPeak other)

Definition at line 34 of file HoughPeak.cxx.

35{
36 if( this == &other ) return *this;
37 _height=other._height;
38 _theta=other._theta;
39 _rho=other._rho;
40 _thetaBin=other._thetaBin;
41 _rhoBin=other._rhoBin;
42 _isCandiTrack=other._isCandiTrack;
43 _peakNum=other._peakNum;
44 _charge=other._charge;
45 if(_houghPeakHitList.size() != 0 ){
46 for(int i =0;i<_houghPeakHitList.size();i++){
47 _houghPeakHitList[i]=NULL;
48 }
49 _houghPeakHitList.clear();
50 }
51 _houghPeakHitList = other._houghPeakHitList;
52 //for(int i =0;i<other._houghPeakHitList.size();i++){
53 // const HoughHit* p_hit= new HoughHit( *(other._houghPeakHitList[i]));
54 // _houghPeakHitList.push_back(p_hit);
55 //}
56 return *this;
57}

◆ operator=() [2/2]

HoughPeak & HoughPeak::operator= ( const HoughPeak other)

◆ peakHeight() [1/2]

int HoughPeak::peakHeight ( ) const
inline

Definition at line 20 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/HoughPeak.h.

20{return _height;}

Referenced by less_hits_in_peak().

◆ peakHeight() [2/2]

int HoughPeak::peakHeight ( ) const
inline

◆ print() [1/2]

void HoughPeak::print ( )

Definition at line 343 of file HoughPeak.cxx.

344{
345 //cout<<"........................................print peak "<<_peakNum<<"........................................"<<endl;
346 //cout<<"charge:"<<_charge<<endl;
347 //cout<<"isCandiTrack:"<<_isCandiTrack<<endl;
348 //cout<<"height:"<<_height<<endl;
349 //cout<<"thetaBin:"<<_thetaBin<<" theta:"<<_theta<<endl;
350 //cout<<"rhoBin:"<<_rhoBin<<" rho:"<<_rho<<endl;
351 cout<<"peak "<<_peakNum
352 <<" (theta,rho): "<<"("<<_theta<<", "<<_rho<<"),"
353 <<" height = "<<_height
354 <<", nHit = "<<getHitNumA(0)
355 <<", isCandiTrack:"<<_isCandiTrack
356 <<endl;
357 //printAllHit();
358}
int getHitNumA(int) const
Definition: HoughPeak.cxx:137

◆ print() [2/2]

void HoughPeak::print ( )

◆ printAllHit() [1/2]

void HoughPeak::printAllHit ( ) const

Definition at line 360 of file HoughPeak.cxx.

360 {
361 int size=_houghPeakHitList.size();
362 if( size ==0 ) return ;
363 cout<<"Print hitlist in HoughPeak " <<endl;
364 cout<<"at center ("<<_theta<<" ,"<<_rho<<"): "<<size<<endl;
365 for(int i=0;i<size;i++){
366 int layer= _houghPeakHitList[i]->getLayerId();
367 int wire = _houghPeakHitList[i]->getWireId();
368 std::cout<<_houghPeakHitList[i]->getHitId()<<" ("<<layer<<","<<wire<<"), type "<<_houghPeakHitList[i]->getSlayerType()<<std::endl;
369 }
370}

◆ printAllHit() [2/2]

void HoughPeak::printAllHit ( ) const

◆ setisCandiTrack() [1/2]

void HoughPeak::setisCandiTrack ( bool  is)
inline

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

28{ _isCandiTrack=is;}

◆ setisCandiTrack() [2/2]

void HoughPeak::setisCandiTrack ( bool  is)
inline

Member Data Documentation

◆ m_cut_deltaD

vector< double > HoughPeak::m_cut_deltaD
static

◆ m_dcut1

double HoughPeak::m_dcut1
static

◆ m_dcut2

double HoughPeak::m_dcut2
static

◆ m_debug

bool HoughPeak::m_debug =0
static

◆ m_factor

double HoughPeak::m_factor =5.0
static

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