CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
HoughMap.cxx
Go to the documentation of this file.
1#include "MdcHoughFinder/HoughMap.h"
2#include "MdcHoughFinder/HoughPeak.h"
3#include <vector>
4#include <algorithm>
5#include <cmath>
6
13double HoughMap::m_nRMS=3;
14
16 //_mapHitList=NULL;
17 _houghSpace=NULL;
18}
19
20HoughMap::HoughMap(int charge,HoughHitList &houghHitList,int mapHit ,int ntheta,int nrho,double rhoMin,double rhoMax,int peakWidth,int peakHigh,double hitpro){
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}
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}
102
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}
125
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}
139
141 clearMap();
142}
143void HoughMap::buildMap(){
144 if(m_debug>0) cout<<"in build map "<<endl;
145 //cout<<m_slantCut<<" "<<m_mapcut<<endl;
146 //loop over all hits, fill histogram of HoughRec space
147 //std::vector<HoughHit>::const_iterator iter = _hitList.getList().begin();
148 std::vector<HoughHit>::iterator iter = _hitList.getList().begin();
149 for(; iter!= _hitList.getList().end(); iter++){
150 HoughHit *hit = &(*iter);
151 // --- add CGEM X cluster to map
152 if(hit->getDetectorType() == CGEM && (hit->getCluster())->getflag() !=0 ) continue;
153 if( _mapHit==1 && hit->getSlayerType()!=0 ) continue;
154 if( hit->driftTime()>1000 && hit->driftTime()<0 ) continue; //to big hit ,maybe error hit
155 double drift_CF = hit->getR();
156 hit->makeCir(2*_nTheta,0,2*M_PI,drift_CF); //N2
157 //hit->print();
158 for( int ni=0;ni<2*m_N1;ni++){ //N1
159 double binwidth = M_PI/_nTheta;
160 double binhigh = (_rhoMax-_rhoMin)/_nRho;
161 double theta = hit->getCir(ni).getTheta();
162 double rho = hit->getCir(ni).getRho();
163 //cout<<theta<<" "<<rho<<endl;
164 if( fabs(rho) >=_rhoMax ) continue;
165 double slantOfLine = hit->getCir(ni).getSlant();
166 int chargeOfHitOnCir = (slantOfLine/fabs(slantOfLine)) * (rho/fabs(rho));
167 if(chargeOfHitOnCir == _charge) continue;
168 //if( fabs(slantOfLine)<0.03 ) continue; //FIXME
169 _houghSpace->Fill(theta,rho);
170 // int rhobinNum = (int)( (rho-_rhoMin)/((_rhoMax-_rhoMin)/m_N1) );
171 // int thetabinNum = (int)( (theta-_thetaMin)/((_thetaMax-_thetaMin)/m_N1) );
172 // _mapHitList[thetabinNum][rhobinNum].push_back(hit) ;
173 }
174 //break; //only first line
175 }
176 //initialize
177 // double hist[1000][1000] ={0};
178 // int max =0 ;
179 double aver(0),sigma(0);
180 mapDev(_houghSpace,aver,sigma);
181 //cout<<"aver, sigma, cut: "<<aver<<" "<<sigma<<" "<<aver+ m_mapcut*sigma<<endl;
182 //double a[7];
183 //_houghSpace->GetStats(a);
184 //for(int ai =0;ai<7;ai++)cout<<a[ai]<<" ";
185 //cout<<endl;
186 for (int iTheta=0; iTheta<_nTheta; iTheta++) {
187 for (int iRho=0; iRho<_nRho; iRho++) {
188 int z=_houghSpace->GetBinContent(iTheta+1,iRho+1);
189 double thetabin = _houghSpace->GetXaxis()->GetBinCenter(iTheta+1);
190 double rhobin = _houghSpace->GetYaxis()->GetBinCenter(iRho+1);
191 double pt = (1/rhobin)/333.567;
192 int MINCOUNT = 10; //num at least consider exist a track
193 if(0.06<=pt&&pt<0.07 ) MINCOUNT = 6;
194 if(pt<0.06) MINCOUNT = 5;
195 double minCount_Cut=( aver+4*sigma >MINCOUNT)? (aver+4*sigma):MINCOUNT; // 4 temp par
196 // _houghS[iTheta][iRho]=z;
197 //if( z>=MINCOUNT) loopPeak(thetabin,rhobin,iTheta,iRho,hist);
198 //if( z>=MINCOUNT) loopPeak(thetabin,rhobin,iTheta,iRho);
199 //if( z>=minCount_Cut)cout<<"cut "<<minCount_Cut<<" z "<<z<<endl;
200 //if( z>=minCount_Cut)cout<<minCount_Cut<<endl;
201 //if( z>=minCount_Cut)cout<<setw(5)<<iTheta+1<<setw(5)<<iRho+1<<setw(5)<<z<<setw(12)<<thetabin<<setw(12)<<rhobin<<endl;
202 if( z>=minCount_Cut) loopPeak(thetabin,rhobin,iTheta,iRho);
203 //int binx,biny,binz;
204 //_houghSpace->GetMaximumBin(binx,biny,binz);
205 // if( max <z ) max = z ;
206 }
207 }
208 // MAX = max;
209 // if(m_debug>0) printMapHit();
210
211}
212void HoughMap::buildHoughMap(int x_bin, double x_min, double x_max, int y_bin, double y_min, double y_max, int nPoint, int peak)
213{
214 stringstream ssname;
215 ssname<<peak;
216 string sname = ssname.str();
217 const char * name = sname.c_str() ;
218 _houghMap = new TH2D(name,name, x_bin, x_min, x_max, y_bin, y_min, y_max);
219 std::vector<HoughHit>::iterator iter = _hitList.getList().begin();
220 for(; iter!= _hitList.getList().end(); iter++){
221 if((iter)->getSlayerType()!=0) continue;
222 if( (iter)->driftTime()>1000 && (iter)->driftTime()<0 ) continue;
223 (iter)->buildMap(x_bin, x_min, x_max, y_bin, y_min, y_max,m_nPoint2D,_charge);
224 _houghMap->Add((iter)->getHitMap());
225 }
226}
227
228void HoughMap::clearHoughMap()
229{
230 std::vector<HoughHit>::iterator iter = _hitList.getList().begin();
231 for(; iter!= _hitList.getList().end(); iter++){
232 if((iter)->getHitMap() != NULL)(iter)->clearMap();
233 }
234 if(_houghMap != NULL)delete _houghMap;
235 _houghMap = NULL;
236}
237
238void HoughMap::findHoughPeaks(vector<HoughPeak>& vecPeak)
239{
240 int binx(0),biny(0),binz(0);
241 double theta(0) , rho(0);
242 //double aver(0) , sigma(0) ,cut(0);
243 int height(0);
244 int peak = vecPeak.size();
245 _houghMap->GetMaximumBin(binx,biny,binz);
246 height = _houghMap->GetBinContent(binx,biny);
247 double cut = mapDev(_houghMap,m_nRMS);
248 do{
249 //while(height>cut){
250 peak++;
251 _houghMap->GetMaximumBin(binx,biny,binz);
252 theta = _houghMap->GetXaxis()->GetBinCenter(binx);
253 rho = _houghMap->GetYaxis()->GetBinCenter(biny);
254 height = _houghMap->GetBinContent(binx,biny);
255 //cout<<"peak"<<setw(5)<<peak<<setw(5)<<binx<<setw(5)<<biny<<setw(12)<<theta<<setw(12)<<rho<<setw(12)<<1.0/333.567/rho<<" "<<height;
256 //cout<<endl;
257 //double a[7];
258 //_houghMap->GetStats(a);
259 //for(int ai =0;ai<7;ai++)cout<<a[ai]<<" ";
260 //cout<<endl;
261 //loopPeak(theta,rho,binx,biny);
262 vecPeak.push_back( HoughPeak(height,binx,biny,theta,rho,true,peak,_charge) );//store peak
263 int hot(0);
264 std::vector<HoughHit>::iterator iter = _hitList.getList().begin();
265 for(; iter!= _hitList.getList().end(); iter++){
266 if((iter)->getHitMap() == NULL)continue;
267 if((iter)->getHitMap()->GetBinContent(binx,biny)>0){
268 _houghMap->Add((iter)->getHitMap(),-1);
269 //const char * title = (iter)->getHitMap()->GetTitle();
270 //cout<<"remove "<<title<<endl;
271 hot++;
272 (iter)->clearMap();
273 }
274 }
275 //cout<<"remove "<<hot<<" hits"<<endl;
276 _houghMap->GetMaximumBin(binx,biny,binz);
277 height = _houghMap->GetBinContent(binx,biny);
278 cut = mapDev(_houghMap,m_nRMS);
279 //cout<<"aver="<<aver<<" , RMS="<<sigma<<" ,cut="<<cut<<" , peak height="<<height<<endl;
280 //cout<<endl;
281 if(peak>_hitList.getHitNumA(0))break;
282 //if(aver<_houghMap->GetEntries()/(_nRho*_nTheta))break;
283 }
284 while(height>cut);
285
286}
287
288void HoughMap::findPeaks()
289{
290 int ext[2] = {0};
291 int peak = 0;
292 int nPoint = m_nPoint2D;
293 int x_bin = _nTheta;
294 int y_bin = _nRho;
295 double x_min = _thetaMin;
296 double x_max = _thetaMax;
297 double y_min = _rhoMin;
298 double y_max = _rhoMax;
299 double dx = (x_max - x_min)/x_bin;
300 double dy = (y_max - y_min)/y_bin;
301
302 vector<HoughPeak> vecPeak_tmp;
303 buildHoughMap(x_bin, x_min, x_max, y_bin, y_min, y_max,nPoint,peak);
304 findHoughPeaks(vecPeak_tmp);
305 clearHoughMap();
306
307 std::vector<HoughPeak>::iterator iter = vecPeak_tmp.begin();
308 for(;iter != vecPeak_tmp.end();iter++){
309 ext[0] = 2;
310 ext[1] = 2;
311 peak = iter->getPeakNum();
312 nPoint = m_nPoint2D;
313 x_bin = 10*(2*ext[0]+1);
314 y_bin = 10*(2*ext[1]+1);
315 x_min = iter->getTheta() - (0.5+ext[0])*dx;
316 x_max = iter->getTheta() + (0.5+ext[0])*dx;
317 y_min = iter->getRho() - (0.5+ext[1])*dy;
318 y_max = iter->getRho() + (0.5+ext[1])*dy;
319 //dx = (x_max - x_min)/x_bin;
320 //dy = (y_max - y_min)/y_bin;
321 //cout<<" ------------------------------------------------ ";
322 //cout<<peak;
323 //cout<<" ------------------------------------------------ ";
324 //cout<<endl;
325 buildHoughMap(x_bin, x_min, x_max, y_bin, y_min, y_max,nPoint,peak);
326 findHoughPeaks(_houghPeakList);
327 clearHoughMap();
328 }
329}
330/*
331 void HoughMap::printMapHit(){
332 double aver(0),sigma(0);
333 mapDev(_houghSpace,aver,sigma);
334//cout<<"AVER SIGMA "<<aver<<" "<<sigma<<endl;
335//cout<<"print Map Hit : "<<_charge<<endl;
336for(int i =0;i<m_N1;i++){
337for(int j =0;j<m_N1;j++){
338if( _mapHitList[i][j].size()>=5 ) cout<<"map :("<<i<<","<<j<<") :"<<_mapHitList[i][j].size()<<endl;
339else continue;
340for(int k =0;k<_mapHitList[i][j].size();k++){
341cout<<"Hit: ("<<_mapHitList[i][j][k]->getLayerId()<<","<<_mapHitList[i][j][k]->getWireId()<<")"<<endl;
342}
343}
344}
345}
346*/
347
348void HoughMap::loopPeak(double thetabin,double rhobin,int iTheta,int iRho){
349 //int binx,biny,binz;
350 int ntheta=m_N2;
351 int nrho=m_N2;
352 double theta_left = thetabin-(5/2.)*(M_PI/_nTheta);
353 double theta_right= thetabin+(5/2.)*(M_PI/_nTheta);
354 double rho_down= rhobin-(5/2.)*((2*_rhoMax)/_nRho);
355 double rho_up = rhobin+(5/2.)*((2*_rhoMax)/_nRho);
356 cout<<"("<<theta_left<<", "<<theta_right<<")"<<" ("<<rho_down<<", "<<rho_up<<")"<<endl;
357 // cout<<"binx biny "<<binx<<" "<<biny<<endl;
358 vector< vector<int> > vec_hist(nrho,vector<int>(ntheta,0) );
359 for(int itheta =0;itheta<ntheta;itheta++){
360 for(int irho=0;irho<nrho;irho++){
361 vec_hist[itheta][irho]=0;
362 }
363 }
364
365 std::vector<HoughHit>::iterator iter = _hitList.getList().begin();
366 for(; iter!= _hitList.getList().end(); iter++){
367 HoughHit *hit = &(*iter);
368 if(hit->getDetectorType() == CGEM && (hit->getCluster())->getflag() !=0 ) continue;
369 if( _mapHit==1 && hit->getSlayerType()!=0 ) continue;
370 if( hit->driftTime()>1000 ) continue; //to big hit ,maybe error hit
371 double drift_CF = hit->getR();
372 //cout<<hit->getLayerId()<<endl;
373
374 // from 0 to M_PI
375 hit->makeCir(m_N2,theta_left,theta_right,drift_CF); //N2
376 for( int ni=0;ni<m_N2;ni++){
377 double theta = hit->getCir(ni).getTheta();
378 double rho = hit->getCir(ni).getRho();
379 double slantOfLine = hit->getCir(ni).getSlant();
380 int chargeOfHitOnCir = (slantOfLine/fabs(slantOfLine)) * (rho/fabs(rho));
381 if(chargeOfHitOnCir == _charge ) continue;
382 //if( fabs(slantOfLine)<0.03 ) continue;
383 //
384 //cout<<"theta_left theta_right theta:"<<theta_left<<" "<<theta_right<<" "<<theta<<endl;
385 //cout<<"rho_down rho_up rho :"<<rho_down<<" "<<rho_up<<" "<<rho<<endl;
386 if( theta<=theta_left|| theta>=theta_right) continue;
387 if( rho<=rho_down || rho>=rho_up ) continue;
388 int rhobinNum = (int)( (rho-rho_down)/((rho_up-rho_down)/m_N2) );
389 int thetabinNum = (int)( (theta-theta_left)/((theta_right-theta_left)/m_N2) );
390 vec_hist[thetabinNum][rhobinNum]++;
391 //cout<<"vec_hist"<<vec_hist[thetabinNum][rhobinNum]<<endl;
392 //hist[thetabinNum+iTheta*ntheta][rhobinNum+iRho*nrho]++;
393 }
394
395 // from M_PI to 2*M_PI
396 hit->makeCir(m_N2,theta_left+M_PI,theta_right+M_PI,drift_CF); //N2
397 for( int ni=0;ni<m_N2;ni++){
398 double theta = hit->getCir(ni).getTheta();
399 double rho = hit->getCir(ni).getRho();
400 double slantOfLine = hit->getCir(ni).getSlant();
401 int chargeOfHitOnCir = (slantOfLine/fabs(slantOfLine)) * (rho/fabs(rho));
402 if(chargeOfHitOnCir == _charge ) continue;
403 //if( fabs(slantOfLine)<0.03 ) continue;
404 //
405 if( theta<=theta_left|| theta>=theta_right) continue;
406 if( rho<=rho_down || rho>=rho_up ) continue;
407 int rhobinNum = (int)( (rho-rho_down)/((rho_up-rho_down)/m_N2) );
408 int thetabinNum = (int)( (theta-theta_left)/((theta_right-theta_left)/m_N2) );
409 vec_hist[thetabinNum][rhobinNum]++;
410 //cout<<"vec_hist"<<vec_hist[thetabinNum][rhobinNum]<<endl;
411 //hist[thetabinNum+iTheta*ntheta][rhobinNum+iRho*nrho]++;
412 //cout<<"("<<thetabinNum+iTheta*ntheta<<","<<rhobinNum+iRho*nrho<<"): "<<hist[thetabinNum+iTheta*ntheta][rhobinNum+iRho*nrho]<<endl;
413 }
414 } //loop over hit
415
416 findPeaks(vec_hist,theta_left,theta_right,rho_down,rho_up);
417}
418
419
420//find local maximum in hough space between 8 neighbor cells
421void HoughMap::findPeaks(vector< vector<int> > vec_hist,double theta_left,double theta_right,double rho_down,double rho_up){
422 int minCount_Cut;
423 double rho_peak = 1./2.*(rho_down+rho_up);
424 double pt_peak = (1./rho_peak)/333.567;
425 if (0.06<=pt_peak&&pt_peak<0.07 ) minCount_Cut = 4;
426 if (pt_peak <0.06 ) minCount_Cut = 3;
427 else minCount_Cut = 5;
428 double aver(0),sigma(0);
429 //mapDev(vec_hist,aver,sigma);
430 //int minCount_Cut=( aver+3*sigma> 5)?( aver+3*sigma):5;
431 //cout<<"aver: "<<aver<<" "<<sigma<<endl;
432 int _nTheta = m_N2;
433 int _nRho= m_N2;
434
435 // store peak property
436 // 0: not a peak,
437 // 1: same hight with neighbor cells,
438 // 2: highest peak according to neighbor 8 cells
439 int **hough_trans_CS_peak = new int*[_nTheta];
440 for(int i=0; i<_nTheta; i++){
441 hough_trans_CS_peak[i] = new int[_nRho];
442 for(int j=0; j<_nRho; j++){ hough_trans_CS_peak[i][j]=-999;}
443 }
444
445 //loop over hough space
446 for (int iRho=0; iRho<_nRho; iRho++) {
447 for (int iTheta=0; iTheta<_nTheta; iTheta++) {
448 //int height = houghSpace->GetBinContent(iTheta+1,iRho+1);
449 int height = vec_hist[iTheta][iRho];
450 //cout<<"heght "<<height<<endl;
451 if(height < minCount_Cut) {
452 hough_trans_CS_peak[iTheta][iRho]=0;
453 continue;
454 }
455 //loop over around bins
456 int max_around=0;
457 for (int ar=iTheta-1; ar<=iTheta+1; ar++) {
458 for (int rx=iRho-1; rx<=iRho+1; rx++) {
459 int ax;
460 if (ar<0) { ax=ar+_nTheta; }
461 else if (ar>=_nTheta) { ax=ar-_nTheta; }
462 else { ax=ar; }
463 if ( (ax!=iTheta || rx!=iRho) && rx>=0 && rx<_nRho) {
464 // int heightThisBin =houghSpace->GetBinContent(ax+1,rx+1);
465 int heightThisBin = vec_hist[ax][rx];
466 if (heightThisBin>max_around) { max_around=heightThisBin; }
467 }
468 }
469 }
470 if (height<max_around) { hough_trans_CS_peak[iTheta][iRho]=0; }
471 else if (height==max_around) { hough_trans_CS_peak[iTheta][iRho]=1; }
472 else if (height>max_around) { hough_trans_CS_peak[iTheta][iRho]=2; }
473 }
474 }
475 // mergeNeighbor(hough_trans_CS_peak,theta_left,theta_right,rho_down,rho_up);
476 //merge
477 int peakNum_Merge=0;
478 for (int iRho=0; iRho<_nRho; iRho++) {
479 for (int iTheta=0; iTheta<_nTheta; iTheta++) {
480 if (hough_trans_CS_peak[iTheta][iRho]==1) {
481 hough_trans_CS_peak[iTheta][iRho]=2;
482 for (int ar=iTheta-1; ar<=iTheta+1; ar++) {
483 for (int rx=iRho-1; rx<=iRho+1; rx++) {
484 int ax;
485 if (ar<0) { ax=ar+_nTheta; }
486 else if (ar>=_nTheta) { ax=ar-_nTheta; }
487 else { ax=ar; }
488 if ( (ax!=iTheta || rx!=iRho) && rx>=0 && rx<_nRho) {
489 if (hough_trans_CS_peak[ax][rx]==1) { hough_trans_CS_peak[ax][rx]=0; }
490 }
491 }
492 }
493 }
494 if(hough_trans_CS_peak[iTheta][iRho]==2) {
495 int peak_num = _houghPeakList.size();
496 // _houghPeakList.push_back( HoughPeak(_houghSpace->GetBinContent(iTheta+1,iRho+1),iTheta,iRho,exTheta(iTheta,theta_left,theta_right,m_N2),exRho(iRho,rho_down,rho_up,m_N2),true,peak_num+1,_charge) );//store peak
497 _houghPeakList.push_back( HoughPeak(vec_hist[iTheta][iRho],iTheta,iRho,exTheta(iTheta,theta_left,theta_right,m_N2),exRho(iRho,rho_down,rho_up,m_N2),true,peak_num+1,_charge) );//store peak
498 //cout<<"height "<<vec_hist[iTheta][iRho]<<endl;
499 peakNum_Merge++;
500 cout<<setw(3)<<iTheta<<setw(3)<<iRho<<setw(5)<<vec_hist[iTheta][iRho]<<setw(12)<<theta_left<<setw(12)<<theta_right<<setw(12)<<rho_down<<setw(12)<<rho_up<<setw(12)<<exTheta(iTheta,theta_left,theta_right,m_N2)<<setw(12)<<exRho(iRho,rho_down,rho_up,m_N2)<<endl;
501 }
502 }
503 }
504
505 // end of merge
506 for(int i=0; i<_nTheta; i++){ delete []hough_trans_CS_peak[i]; }
507 delete []hough_trans_CS_peak;
508}
509/*
510//merge "1" peaks, 1: same hight with neighbor peaks
511int HoughMap::mergeNeighbor(int** hough_trans_CS_peak,double theta_left,double theta_right,double rho_down,double rho_up){
512// _houghPeakList.reserve(100);
513int _nTheta = m_N2;
514int _nRho= m_N2;
515int peakNum_Merge=0;
516for (int iRho=0; iRho<_nRho; iRho++) {
517for (int iTheta=0; iTheta<_nTheta; iTheta++) {
518if (hough_trans_CS_peak[iTheta][iRho]==1) {
519hough_trans_CS_peak[iTheta][iRho]=2;
520for (int ar=iTheta-1; ar<=iTheta+1; ar++) {
521for (int rx=iRho-1; rx<=iRho+1; rx++) {
522int ax;
523if (ar<0) { ax=ar+_nTheta; }
524else if (ar>=_nTheta) { ax=ar-_nTheta; }
525else { ax=ar; }
526if ( (ax!=iTheta || rx!=iRho) && rx>=0 && rx<_nRho) {
527if (hough_trans_CS_peak[ax][rx]==1) { hough_trans_CS_peak[ax][rx]=0; }
528}
529}
530}
531}
532if(hough_trans_CS_peak[iTheta][iRho]==2) {
533int peak_num = _houghPeakList.size();
534// _houghPeakList.push_back( HoughPeak(_houghSpace->GetBinContent(iTheta+1,iRho+1),iTheta,iRho,exTheta(iTheta,theta_left,theta_right,m_N2),exRho(iRho,rho_down,rho_up,m_N2),true,peak_num+1,_charge) );//store peak
535_houghPeakList.push_back( HoughPeak(_houghSpace->GetBinContent(iTheta+1,iRho+1),iTheta,iRho,exTheta(iTheta,theta_left,theta_right,m_N2),exRho(iRho,rho_down,rho_up,m_N2),true,peak_num+1,_charge) );//store peak
536peakNum_Merge++;
537}
538}
539}
540return peakNum_Merge;
541}
542*/
543//int HoughMap::exRhoBin(double rho){
544// int rhobin = ( (int)(rho-_rhoMin)/((_rhoMax-_rhoMin)/_nRho) );
545// return rhobin;
546//}
547//int HoughMap::exThetaBin(double theta){
548// int thetabin = (int)( (theta-_thetaMin)/((_thetaMax-_thetaMin)/_nTheta) );
549// return thetabin;
550//}
551/*
552 void HoughMap::candiTrack(){
553 if( _houghPeakList.size()==0 ) return;
554// cout<<"size "<<_houghPeakList.size()<<endl;
555for(int itrack=0;itrack<_houghPeakList.size();itrack++){
556if( _houghPeakList[itrack].getisCandiTrack()==true ) combineNeighbor(itrack); //if track is true do combine
557else continue;
558
559for(int ipeak=itrack+1;ipeak<_houghPeakList.size();ipeak++){
560if(m_debug>0) cout<<" compare track peak : "<<itrack<<" "<<ipeak<<endl;
561compareTrack_and_Peak(_houghTrackList.back(),_houghPeakList[ipeak]);
562}
563}
564}
565*/
566
567/*
568 void HoughMap::combineNeighbor(int ipeak){
569//get the hitlist in the exact peak
570// cout<<" ipeak "<<ipeak<<endl;
571int theta=_houghPeakList[ipeak].getThetaBin();
572int rho =_houghPeakList[ipeak].getRhoBin();
573vector< const HoughHit* > centerHitList = _mapHitList[theta][rho];
574for (int px=theta-_peakWidth; px<=theta+_peakWidth; px++) {
575for (int py=rho-_peakHigh; py<=rho+_peakHigh; py++) {
576int ax;
577if (px<0) { ax=px+_nTheta; }
578else if (px>=_nTheta) { ax=px-_nTheta; }
579else { ax=px; }
580if ( (ax!=theta|| py!=rho) && py>=0 && py<_nRho) combine_two_cells(centerHitList,ax,py);
581}
582}
583_houghTrackList.push_back( HoughTrack(_houghPeakList[ipeak],centerHitList , Rho,Theta) );
584}
585
586void HoughMap::combine_two_cells(vector< const HoughHit* > &centerHitList,int ax,int py){
587//cout<<"combine ("<<ax<<","<<py<<endl;
588vector< const HoughHit* > aroundHitList_xy= _mapHitList[ax][py];
589int size_of_center=centerHitList.size();
590int size_of_around=aroundHitList_xy.size();
591
592for(int i=0;i<size_of_around;i++){
593int same_hit=0;
594for(int j=0;j<size_of_center;j++){
595if( centerHitList[j]->digi()==aroundHitList_xy[i]->digi() ) {same_hit=1;break;}
596}
597if(same_hit==0) {
598centerHitList.push_back(aroundHitList_xy[i]);
599// cout<<"push back hit("<<aroundHitList_xy[i]->getLayerId()<<","<<aroundHitList_xy[i]->getWireId()<<")"<<endl;
600}
601}
602}
603*/
604
605void HoughMap::hitFinding(){
606 if(m_debug>0) cout<<"in hit finding "<<endl;
607 for(int ipeak=0;ipeak<_houghPeakList.size();ipeak++){
608 int hitColNum = _houghPeakList[ipeak].collectHits(_hitList);
609 if( hitColNum < 3 ) _houghPeakList[ipeak].setisCandiTrack(false);
610 //_houghPeakList[ipeak].print();
611 //_houghPeakList[ipeak].printAllHit();
612 }
613}
614
615void HoughMap::trackFinder(){
616 if(m_debug>0) cout<<"in track finder "<<endl;
617 //cout<<"houghPeakList_size "<<_houghPeakList.size()<<endl;
618 if( _houghPeakList.size()==0 ) return;
619 int trkid=0;
620 for(int itrack=0;itrack<_houghPeakList.size();itrack++){
621 if( _houghPeakList[itrack].getisCandiTrack()==true ){ //if track is true do combine
622 _houghTrackList.push_back( HoughTrack(_houghPeakList[itrack],_houghPeakList[itrack].getHoughHitList(),_houghPeakList[itrack].getRho(),_houghPeakList[itrack].getTheta(), trkid) );
623 trkid++;
624 }else continue;
625
626 for(int ipeak=itrack+1;ipeak<_houghPeakList.size();ipeak++){
627 if(_houghPeakList[ipeak].getisCandiTrack())compareTrack_and_Peak(_houghTrackList.back(),_houghPeakList[ipeak]);
628 }
629 }
630 //cout<<"trackList_size............................................."<<_houghTrackList.size()<<endl;
631}
632
633void HoughMap::compareTrack_and_Peak(HoughTrack &track,HoughPeak& peak){
634 int sameHit=0;
635 int sizeoftrack=track.getHoughHitList().size();
636 int sizeofpeak =peak.getHoughHitList().size();
637 //cout<<"track: "<<track.getTrkid()
638 //<<", compare peak "<<track.getCenterPeak().getPeakNum()
639 //<<" and peak "<<peak.getPeakNum()
640 //<<endl;
641 //track.getCenterPeak().print();
642 //track.getCenterPeak().printAllHit();
643 //peak.print();
644 //peak.printAllHit();
645 for(int i=0;i<sizeoftrack;i++){
646 for(int j=0;j<sizeofpeak;j++){
647 //if( ((track.getHoughHitList())[i]).getDetectorType() == MDC && (peak.getHoughHitList())[j]->getDetectorType() == MDC && ((track.getHoughHitList())[i]).digi() == ((peak.getHoughHitList())[j])->digi() ) sameHit++;
648 //if( ((track.getHoughHitList())[i]).getDetectorType() == CGEM && (peak.getHoughHitList())[j]->getDetectorType() == CGEM && ((track.getHoughHitList())[i]).getCluster() == ((peak.getHoughHitList())[j])->getCluster() ) sameHit++;
649 if( ((track.getHoughHitList())[i]).getHitId() == ((peak.getHoughHitList())[j])->getHitId() ){
650 if(((track.getHoughHitList())[i]).getSlayerType() !=0 || ((peak.getHoughHitList())[j])->getSlayerType() !=0)continue;
651 sameHit++;
652 //cout<<" debug digi ("<< ((track.getHoughHitList())[i]).getLayerId()<<" ,"<<((track.getHoughHitList())[i]).getWireId() <<") ("<< ((peak.getHoughHitList())[j])->getLayerId()<<" ,"<<((peak.getHoughHitList())[j])->getWireId()<<" )"<<endl;
653 }
654 }
655 }
656 //int rho_track=track.getRho();
657 //int theta_track=track.getTheta();
658 //int rho_peak=peak.getRho();
659 //int theta_peak=peak.getTheta();
660 //if(peak.getTheta()>0.9&&peak.getTheta()<1.8)peak.print();
661 if(m_debug>0) cout<<"same hit : "<<(double)sameHit/peak.getHoughHitList().size()<<" "<<sameHit<<" "<<peak.getHoughHitList().size()<<endl;
662 //if( sameHit>_hitpro*peak.getHoughHitList().size() || (fabs(rho_track-rho_peak)< 0.3 && fabs(theta_track-theta_peak)< 0.3) )
663 if( sameHit>=_hitpro*peak.getHoughHitList().size() ) {
664 if(m_debug>0) cout <<"DEBUG peak is out "<<peak.getPeakNum()<<endl;
665 peak.setisCandiTrack(false);
666 //cout<<"track: "<<track.getTrkid()
667 //<<", compare peak "<<track.getCenterPeak().getPeakNum()
668 //<<" and peak "<<peak.getPeakNum()
669 //<<" share "<<sameHit<<" hits"
670 //<<endl;
671 //combineTrack_and_Peak(track,peak);
672 }
673 else {
674 //cout<<sameHit<<" "<<_hitpro*peak.getHoughHitList().size()<<endl;
675 if(m_debug>0)cout<<" DEBUG peak is reserve "<<peak.getPeakNum()<<endl;
676 }
677 //cout<<endl;
678}
679
680/*
681 void HoughMap::gravity(){
682 int binx,biny,binz;
683 _houghSpace->GetMaximumBin(binx,biny,binz);
684 double thetabin = _houghSpace->GetXaxis()->GetBinCenter(binx);
685 double rhobin = _houghSpace->GetYaxis()->GetBinCenter(biny);
686 int ntheta=15;
687 int nrho=10;
688 double theta_left = thetabin-(ntheta+1/2.)*(M_PI/_nTheta);
689 double theta_right= thetabin+(ntheta+1/2.)*(M_PI/_nTheta);
690 double rho_down= rhobin-(nrho+1/2.)*((2*_rhoMax)/_nRho);
691 double rho_up = rhobin+(nrho+1/2.)*((2*_rhoMax)/_nRho);
692 int NbinRho=m_N2;
693 int NbinTheta=m_N2;
694 std::vector<HoughHit>::iterator iter = _hitList.getList().begin();
695 TH2D *_houghSpace2 = new TH2D("houghspace2","houghspace2",NbinTheta,theta_left,theta_right,NbinRho,rho_down,rho_up); //N2
696 for(; iter!= _hitList.getList().end(); iter++){
697 HoughHit *hit = &(*iter);
698 if( _mapHit==1 && hit->getSlayerType()!=0 ) continue;
699 double drift_CF = hit->getRTruth();
700 hit->makeCir(NbinTheta,theta_left,theta_right,drift_CF); //N2
701 for( int ni=0;ni<NbinTheta;ni++){
702 double theta = hit->getCir(ni).getTheta();
703 double rho = hit->getCir(ni).getRho();
704 double slantOfLine = hit->getCir(ni).getSlant();
705 int chargeOfHitOnCir = (slantOfLine/fabs(slantOfLine)) * (rho/fabs(rho));
706 if( chargeOfHitOnCir == _charge ) continue;
707 if( fabs(slantOfLine)<0.03 ) continue;
708 _houghSpace2->Fill(theta,rho);
709 }
710 }
711 for (int iRho=0; iRho<NbinRho; iRho++) {
712 for (int iTheta=0; iTheta<NbinTheta; iTheta++) {
713 int z5=_houghSpace2->GetBinContent(iTheta+1,iRho+1);
714 _houghS2[iTheta][iRho]=z5;
715 }
716 }
717 int binx2,biny2,binz2;
718 _houghSpace2->GetMaximumBin(binx2,biny2,binz2);
719 double thetabin2 = _houghSpace2->GetXaxis()->GetBinCenter(binx2);
720 double rhobin2 = _houghSpace2->GetYaxis()->GetBinCenter(biny2);
721 Theta=thetabin2;
722 Rho=rhobin2;
723 Height=_houghSpace2->GetBinContent(binx2,biny2);
724 delete _houghSpace2;
725 }
726 */
727/*
728 void HoughMap::select_slant(){
729 int binx,biny,binz;
730 _houghSpace->GetMaximumBin(binx,biny,binz);
731 double thetabin = _houghSpace->GetXaxis()->GetBinCenter(binx);
732 double rhobin = _houghSpace->GetYaxis()->GetBinCenter(biny);
733 vector<int> vec_layer;
734 std::vector<HoughHit>::iterator iter1= _hitList.getList().begin();
735 for(; iter1!= _hitList.getList().end(); iter1++){
736 if( (*iter1).getSlayerType()!=0 || (*iter1).getStyle()!=0 || (*iter1).getCirList()!=0 ) continue;
737 vec_layer.push_back( (*iter1).getLayerId() );
738 }
739
740 if( vec_layer.size()==0 ) return;
741 vector<int>::iterator laymax=max_element( vec_layer.begin(),vec_layer.end() );
742 int maxLayer=*laymax;
743 m_maxlayer=maxLayer;
744// cout<<"max layer "<<maxLayer<<endl;
745
746vector<int>::iterator iterlay = vec_layer.begin();
747for(; iterlay!= vec_layer.end(); iterlay++){
748if ( *iterlay==*laymax) {
749vec_layer.erase(laymax);
750iterlay--;
751}
752}
753vector<int>::iterator laymax2=max_element( vec_layer.begin(),vec_layer.end() );
754int maxLayer2=*laymax2;
755// cout<<"max layer2 "<<maxLayer2<<endl;
756
757std::vector<HoughHit>::iterator iter = _hitList.getList().begin();
758for(; iter!= _hitList.getList().end(); iter++){
759HoughHit *hit = &(*iter);
760if( hit->getSlayerType()!=0 || hit->getStyle()!=0 || hit->getCirList()!=0 ) continue;
761double slantOfLine= hit->getV()*cos(thetabin) - hit->getU()*sin(thetabin);
762//cout<<"("<<hit->getLayerId()<<","<<hit->getWireId()<<") "<< slantOfLine<<endl;
763if( hit->getLayerId()==maxLayer || hit->getLayerId()==maxLayer2){
764maxlayer_slant.push_back(slantOfLine);
765}
766else{
767nomaxlayer_slant.push_back(slantOfLine);
768nomaxlayerid.push_back(hit->getLayerId());
769}
770}
771}
772*/
773/*
774 void HoughMap::cald_layer(){
775//in truth
776double k,b,theta,rho,x_cross,y_cross;
777vector<double> vtemp,utemp;
778std::vector<HoughHit>::iterator iter = _hitList.getList().begin();
779for(int iHit=0;iter!= _hitList.getList().end(); iter++,iHit++){
780const HoughHit h = (*iter);
781// if( h.getCirList()!=0 ) continue;
782if ( h.digi()->getTrackIndex()>=0 && h.getStyle()==0&& h.getSlayerType()==0 && h.getCirList()==0 && utemp.size()<10) // ??use 2nd half
783{
784utemp.push_back(h.getUTruth());
785vtemp.push_back(h.getVTruth());
786}
787}
788Leastfit(utemp,vtemp,k,b);
789//calcu truth
790//k,b from truth
791x_cross = -b/(k+1/k);
792y_cross = b/(1+k*k);
793rho=sqrt(x_cross*x_cross+y_cross*y_cross);
794theta=atan2(y_cross,x_cross);
795// Rho = rho; //use truth rho, theta
796// Theta =theta;
797//
798double cirr_track = fabs(1./(Rho));
799double cirx_track = (1./Rho)*cos(Theta);
800double ciry_track = (1./Rho)*sin(Theta);
801//cout<<"track center position "<<cirx_track<<" "<<ciry_track<<endl;
802std::vector<HoughHit>::iterator iter0= _hitList.getList().begin();
803for(; iter0!= _hitList.getList().end(); iter0++){
804HoughHit *hit = &(*iter0);
805if( hit->getSlayerType()!=0 ) continue;
806// if( hit->getCirList()!=0 ) continue; // use in learn distribute
807//double cirr_hit = hit->getDriftDistTruth();
808double cirx_hit = hit->getMidX();
809double ciry_hit = hit->getMidY();
810double cirr_hit = hit->getDriftDist();
811double l1l2 = sqrt( (cirx_hit-cirx_track)*(cirx_hit-cirx_track)+(ciry_hit-ciry_track)*(ciry_hit-ciry_track) );
812double deltaD ;
813if( l1l2>cirr_track ) deltaD = l1l2-cirr_track-cirr_hit;
814if( l1l2<=cirr_track ) deltaD = l1l2-cirr_track+cirr_hit;
815hit->setDeltaD(deltaD);
816//cal flight length
817
818double theta_temp;
819double l_temp;
820if(cirx_track==0||cirx_hit-cirx_track==0){
821theta_temp=0;
822}
823else{
824theta_temp=M_PI-atan2(ciry_hit-ciry_track,cirx_hit-cirx_track)+atan2(ciry_track,cirx_track);
825if(theta_temp>2*M_PI){
826theta_temp=theta_temp-2*M_PI;
827}
828if(theta_temp<0){
829theta_temp=theta_temp+2*M_PI;
830}
831}
832//cout<<" charge "<<_charge <<" "<<theta_temp<<endl;
833if(_charge==-1) {
834l_temp=cirr_track*theta_temp;
835}
836if(_charge==1) {
837theta_temp=2*M_PI-theta_temp;
838l_temp=cirr_track*(theta_temp);
839}
840// cout<<"("<<hit->getLayerId()<<","<<hit->getWireId()<<") "<<l_temp<<endl;
841hit->setFltLen(l_temp);
842
843// cout<<"int map deltaD: ("<<hit->getLayerId()<<","<<hit->getWireId()<<")"<< hit->getDeltaD()<<endl;
844}
845}
846*/
847/*
848 void HoughMap::Leastfit(vector<double> u,vector<double> v,double& k ,double& b){
849 int N = u.size();
850 double *x=new double[N];
851 double *y=new double[N];
852 for(int i=0;i<N;i++){
853 x[i]=u[i];
854 y[i]=v[i];
855 }
856
857 TF1 *fpol1=new TF1("fpol1","pol1",-50,50);
858 TGraph *tg=new TGraph(N,x,y);
859 tg->Fit("fpol1","QN");
860 double ktemp =fpol1->GetParameter(1);
861 double btemp =fpol1->GetParameter(0);
862 k = ktemp;
863 b = btemp;
864 delete []x;
865 delete []y;
866 delete fpol1;
867 delete tg;
868 }
869 */
870bool less_hits_in_peak(const HoughPeak& peaka,const HoughPeak& peakb){
871 return peaka.peakHeight() > peakb.peakHeight();
872}
873
874void HoughMap::sortPeaks(){
875 std::sort (_houghPeakList.begin(),_houghPeakList.end(),less_hits_in_peak);
876}
877
878double HoughMap::exRho(int irho,double rhomin,double rhomax,int n){
879 //double rho = _rhoMin+(irho+1/2.)*(_rhoMax-_rhoMin)/_nRho;
880 double rho = rhomin+(irho+1/2.)*(rhomax-rhomin)/n;
881 return rho;
882}
883
884double HoughMap::exTheta(int itheta,double thetamin,double thetamax,int n){
885 double theta= thetamin+(itheta+1/2.)*(thetamax-thetamin)/n;
886 return theta;
887}
888
889void HoughMap::mapDev(vector< vector<int> > vec_hist,double& aver ,double& sigma){
890 int count_use=0;
891 double sum=0;
892 double sum2=0;
893 for(int i=0;i<m_N2;i++){
894 for(int j=0;j<m_N2;j++){
895 int count=vec_hist[i][j];
896 if(count!=0){
897 count_use++;
898 sum+=count;
899 sum2+=count*count;
900 }
901 }
902 }
903 aver=sum/count_use;
904 sigma=sqrt(sum2/count_use-aver*aver);
905}
906
907void HoughMap::mapDev(TH2D* houghspace,double& aver ,double& sigma){
908 int count_use=0;
909 double sum=0;
910 double sum2=0;
911 for(int i=0;i<m_N1;i++){
912 for(int j=0;j<m_N1;j++){
913 int count=houghspace->GetBinContent(i+1,j+1);
914 if(count!=0){
915 count_use++;
916 sum+=count;
917 sum2+=count*count;
918 }
919 }
920 }
921 if(count_use != 0){
922 aver=sum/count_use;
923 sigma=sqrt(sum2/count_use-aver*aver);
924 }else{
925 aver=0;
926 sigma=0;
927 }
928}
929
930double HoughMap::mapDev(TH2D* houghspace,double nRMS){
931 int count_use=0;
932 double sum=0;
933 double sum2=0;
934 for(int i=0;i<m_N1;i++){
935 for(int j=0;j<m_N1;j++){
936 int count=houghspace->GetBinContent(i+1,j+1);
937 if(count!=0){
938 count_use++;
939 sum+=count;
940 sum2+=count*count;
941 }
942 }
943 }
944 double aver(0),rms(0);
945 if(count_use != 0){
946 aver=sum/count_use;
947 if(count_use==1) rms = sqrt(sum2/count_use-aver*aver);
948 else rms = sqrt((sum2-count_use*aver*aver)/(count_use-1));
949 }
950 double cut = aver + nRMS*rms;
951 return cut;
952}
953
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}
965
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}
const Int_t n
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
bool less_hits_in_peak(const HoughPeak &peaka, const HoughPeak &peakb)
Definition: HoughMap.cxx:870
*********Class see also m_nmax DOUBLE PRECISION m_MasPhot DOUBLE PRECISION m_phsu DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_r2 DOUBLE PRECISION m_WtMass INTEGER m_nmax INTEGER m_Nevgen INTEGER m_IsFSR INTEGER m_MarTot *COMMON c_KarFin $ !Output file $ !Event serial number $ !alpha QED at Thomson limit $ !minimum energy at CMS for remooval $ !infrared cut
Definition: KarFin.h:27
#define M_PI
Definition: TConstant.h:4
int getHitNumA(int) const
const std::vector< HoughHit > & getList() const
void makeCir(int n, double phi_begin, double phi_last, double r)
void printPeak()
Definition: HoughMap.cxx:954
void clearMap()
Definition: HoughMap.cxx:126
void doMap()
Definition: HoughMap.cxx:103
double exRho(int, double, double, int)
Definition: HoughMap.cxx:878
void printTrack()
Definition: HoughMap.cxx:966
HoughMap()
Definition: HoughMap.cxx:15
double exTheta(int, double, double, int)
Definition: HoughMap.cxx:884
vector< const HoughHit * > getHoughHitList() const
uint32_t count(const node_t &list)
Definition: node.cxx:42