BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
HoughTrack.cxx
Go to the documentation of this file.
1#include "HoughTrack.h"
2#include "HoughMap.h"
3#include "HoughStereo.h"
4#include "TF1.h"
5#include "TGraph.h"
6#include <map>
7#include <vector>
8using namespace std;
9
10bool HoughTrack::m_debug = 0;
11
13 p_trk = NULL;
14 p_trk2D = NULL;
15}
17
19 _dist = ( other._dist );
20 _charge = ( other._charge );
21 _ptLeast = ( other._ptLeast );
22 _pt2D = ( other._pt2D );
23 _pt3D = ( other._pt3D );
24 _pz = ( other._pz );
25 _p = ( other._p );
26
27 _d0 = other._d0;
28 _omega = other._omega;
29 _phi0 = other._phi0;
30 _tanl = ( other._tanl );
31 _z0 = ( other._z0 );
32 _tanl_zs = ( other._tanl_zs );
33 _z0_zs = ( other._z0_zs );
34
35 _centerPeak = ( other._centerPeak );
36 _Hough2D = ( other._Hough2D );
37 _Hough3D = ( other._Hough3D );
38 _bunchTime = ( other._bunchTime );
39 _centerX = ( other._centerX );
40 _centerY = ( other._centerY );
41 _centerR = ( other._centerR );
42 _chi2_aver = ( other._chi2_aver );
43 _nfit = ( other._nfit );
44 _chi2_aver2D = ( other._chi2_aver2D );
45 _nfit2D = ( other._nfit2D );
46 _recHitVec = ( other._recHitVec );
47 _stat2D = ( other._stat2D );
48 _stat3D = ( other._stat3D );
49 p_trk = other.p_trk;
50 p_trk2D = other.p_trk2D;
51 _maprho = other._maprho;
52 _maptheta = other._maptheta;
53 t_pro_correct = other.t_pro_correct;
54 _houghList = other._houghList;
55 vec_mdcHit = other.vec_mdcHit;
56 // if(_recHitVec.size() != 0 ){
57 // for(int i =0;i<_recHitVec.size();i++){
58 // delete _recHitVec[i];
59 // _recHitVec[i]=NULL;
60 // }
61 // _recHitVec.clear();
62 // }
63 // for(int i =0;i<other._recHitVec.size();i++){
64 // //const HoughHit* p_hit= new HoughHit( *(other._recHitVec[i]));
65 // HoughRecHit p_hit ( (trackHitList[i])->digi(),0.,0. );
66 // _recHitVec.push_back(p_hit);
67 // }
68 return *this;
69}
70
72 : _dist( other._dist )
73 , _charge( other._charge )
74 , _ptLeast( other._ptLeast )
75 , _pt2D( other._pt2D )
76 , _pt3D( other._pt3D )
77 , _pz( other._pz )
78 , _p( other._p )
79 , _d0( other._d0 )
80 , _omega( other._omega )
81 , _phi0( other._phi0 )
82 , _z0( other._z0 )
83 , _tanl( other._tanl )
84 , _z0_zs( other._z0_zs )
85 , _tanl_zs( other._tanl_zs )
86 , _centerPeak( other._centerPeak )
87 , _Hough2D( other._Hough2D )
88 , _Hough3D( other._Hough3D )
89 , _bunchTime( other._bunchTime )
90 , _centerX( other._centerX )
91 , _centerY( other._centerY )
92 , _centerR( other._centerR )
93 , _chi2_aver( other._chi2_aver )
94 , _nfit( other._nfit )
95 , _chi2_aver2D( other._chi2_aver2D )
96 , _nfit2D( other._nfit2D )
97 , _stat2D( other._stat2D )
98 , _stat3D( other._stat3D )
99 , _recHitVec( other._recHitVec )
100 , p_trk( other.p_trk )
101 , p_trk2D( other.p_trk2D )
102 , _maprho( other._maprho )
103 , _maptheta( other._maptheta )
104 , t_pro_correct( other.t_pro_correct )
105 , _houghList( other._houghList )
106 , vec_mdcHit( other.vec_mdcHit ) {
107 // _recHitVec.clear();
108 // if(_recHitVec.size() != 0 ){
109 // //cout<<"clear first "<<endl;
110 // for(int i =0;i<_recHitVec.size();i++){
111 // delete _recHitVec[i];
112 // _recHitVec[i]=NULL;
113 // }
114 // _recHitVec.clear();
115 //}
116 // for(int i =0;i<other._recHitVec.size();i++){
117 // //const HoughHit* p_hit= new HoughHit( *(other._recHitVec[i]));
118 // HoughRecHit p_hit ( (trackHitList[i])->digi(),0.,0. );
119 // _recHitVec.push_back(p_hit);
120 //}
121}
122
124 for ( int i = 0; i < other._recHitVec.size(); i++ )
125 {
126 int same = 0;
127 for ( int j = 0; j < _recHitVec.size(); j++ )
128 {
129 if ( _recHitVec[j].digi() == other._recHitVec[i].digi() ) { same = 1; }
130 }
131 if ( same == 0 )
132 {
133 // const HoughHit* p_hit= new HoughHit( *(other._recHitVec[i]));
134 // HoughRecHit p_hit ( (other._recHitVec[i]).digi(),0.,1);
135 HoughRecHit p_hit( ( other._recHitVec[i] ) );
136 _recHitVec.push_back( p_hit );
137 }
138 // cout<<" after copy: "<<i<<" new: "<<p_hit<<" old: "<<other._recHitVec[i]<<endl;
139 }
140 return *this;
141}
142
143HoughTrack::HoughTrack( const HoughPeak& centerPeak, std::vector<const HoughHit*> trackHitList,
144 double rho, double theta ) {
145 _centerPeak = centerPeak;
146 _recHitVec.clear();
147 _stat2D = 0;
148 _stat3D = 0;
149 _tanl = -999;
150 _z0 = -999;
151 _ptLeast = -999;
152 _pt2D = -999;
153 _pt3D = -999;
154 _p = -999;
155 _d0 = -999;
156 _omega = -999;
157 _phi0 = -999;
158 _z0 = -999;
159 _tanl = -999;
160 _chi2_aver = -999;
161 _nfit = -999;
162 p_trk = NULL;
163 p_trk2D = NULL;
164 _charge = 0; // undeter mine
165 _maprho = rho;
166 _maptheta = theta;
167 // if(_recHitVec.size()!= 0 ){
168 // cout<<" Mind trackhitlist size !=0 "<<endl;
169 // for(int i =0;i<_recHitVec.size();i++){
170 // delete _recHitVec[i];
171 // _recHitVec[i]=NULL;
172 // }
173 // _recHitVec.clear();
174 // }
175 int t_size = trackHitList.size();
176 for ( int i = 0; i < t_size; i++ )
177 {
178 HoughRecHit p_hit( *( trackHitList[i] ), 0., 0., 1 );
179 p_hit.setPtr2D( &_Hough2D );
180 p_hit.setflag( 0 );
181 _recHitVec.push_back( p_hit );
182 }
183}
184
185bool digi_in_track( const HoughRecHit& hita, const HoughRecHit& hitb ) {
186 return hita.getLayerId() < hitb.getLayerId();
187}
189 std::sort( _recHitVec.begin(), _recHitVec.end(), digi_in_track );
190}
191
192int HoughTrack::fit2D( double bunchtime ) {
193 sortHit();
194 // cout<<"in fit2d"<<endl;
195 _bunchTime = bunchtime;
196 _stat2D = fitLeast();
197 // outerHit();
198 _stat2D = fit_global2D( _recHitVec );
199 // printRecHit();
200 // collectAxialHit();
201 //_Hough2D.print();
202 // cald_layer();
203 return _stat2D;
204}
205
206bool less_layer( const int& a, const int& b ) { return a < b; }
208 vector<int> vec_layer_num[43];
209 for ( int ilay = 0; ilay < 43; ilay++ )
210 {
211 for ( int ihit = 0; ihit < _recHitVec.size(); ihit++ )
212 {
213 if ( _recHitVec[ihit].getLayerId() == ilay && _recHitVec[ihit].getflag() == 0 )
214 { vec_layer_num[ilay].push_back( _recHitVec[ihit].getWireId() ); }
215 }
216 std::sort( vec_layer_num[ilay].begin(), vec_layer_num[ilay].end(), less_layer );
217 // for(int j=0;j<vec_layer_num[ilay].size();j++)
218 // cout<<"("<<ilay<<","<<vec_layer_num[ilay][j]<<")"<<endl;
219 if ( vec_layer_num[ilay].size() < 4 ) continue;
220 for ( int j = 0; j < vec_layer_num[ilay].size(); j++ )
221 {
222 // if( (vec_layer_num[ilay][j]+1 == vec_layer_num[ilay][j+1]) &&
223 //(vec_layer_num[ilay][j+1]+1 ==
224 // vec_layer_num[ilay][j+2]) && (vec_layer_num[ilay][j+2]+1 == vec_layer_num[ilay][j+3])
225 // ) {
226 for ( int jhit = 0; jhit < _recHitVec.size(); jhit++ )
227 {
228 if ( ( ilay == _recHitVec[jhit].getLayerId() ) &&
229 ( vec_layer_num[ilay][j] == _recHitVec[jhit].getWireId() ) )
230 { _recHitVec[jhit].setflag( -1 ); }
231 }
232 //}
233 }
234 }
235}
236
237// int HoughTrack::collectAxialHit(){
238// for( int ilay=8;ilay<20;ilay++){
239// for( int ihit=0;ihit<_recHitVec.size();ihit++){
240// if( _recHitVec[ihit].getLayerId()==ilay && _recHitVec[ihit].getflag()==0) {
241// _recHitVec[ihit].setflag(1);
242// }
243// }
244// }
245// }
246
247void HoughTrack::collectAxialHit() {
248 vector<HoughRecHit> hitCol;
249 int lay_contain[12]; // FIXME
250 for ( int ilay = 8; ilay < 20; ilay++ )
251 {
252 int lay_count = 0;
253 for ( int ihit = 0; ihit < _recHitVec.size(); ihit++ )
254 {
255 if ( _recHitVec[ihit].getLayerId() == ilay && _recHitVec[ihit].getflag() == 0 )
256 {
257 hitCol.push_back( _recHitVec[ihit] );
258 lay_count++;
259 }
260 }
261 lay_contain[ilay - 8] = lay_count;
262 }
263 // int **a;
264 int** a;
265 int* len;
266 int p[12];
267 a = (int**)malloc( sizeof( int* ) * 12 );
268 len = (int*)malloc( sizeof( int ) * 12 );
269 for ( int i = 0; i < 12; i++ )
270 {
271 int add_lay_count = 0;
272 for ( int s = 0; s < i; s++ ) { add_lay_count += lay_contain[s]; }
273 int n = lay_contain[i];
274 len[i] = n;
275 a[i] = (int*)malloc( sizeof( int ) * n );
276 for ( int j = 0; j < n; j++ )
277 {
278 a[i][j] = add_lay_count + j;
279 cout << "aij " << a[i][j] << endl;
280 cout << "(" << hitCol[add_lay_count + j].getLayerId() << ","
281 << hitCol[add_lay_count + j].getWireId() << ")" << endl;
282 }
283 }
284 int numall = 0;
285 fun( 0, a, len, p, hitCol, numall );
286 cout << " num all " << numall << endl;
287}
288
289void HoughTrack::fun( int level, int** a, int* len, int* p, vector<HoughRecHit>& hitCol,
290 int& numall ) {
291 if ( level < 12 )
292 {
293 cout << "level " << level << " len " << len[level] << endl;
294 for ( int i = 0; i < len[level]; i++ )
295 {
296 cout << i << " i " << endl;
297 p[level] = i;
298 cout << i << " i " << endl;
299 cout << "fun " << level + 1 << endl;
300 fun( level + 1, a, len, p, hitCol, numall );
301 }
302 }
303 else
304 {
305 vector<HoughRecHit> recHitCol;
306 for ( int i = 0; i < 12; i++ )
307 {
308 int num = a[i][p[i]];
309 cout << "(" << hitCol[num].getLayerId() << "," << hitCol[num].getWireId() << ")" << endl;
310 recHitCol.push_back( hitCol[num] );
311 }
312 fit_global2D( recHitCol );
313 numall++;
314 }
315}
316
318 sortHit();
319 // cout<<"in fit3d"<<endl;
320 int nhit_zs = calzs();
321 if ( nhit_zs >= 3 ) fitzs();
322 else
323 {
324 _tanl = 0.;
325 _z0 = 0.;
326 }
327 outerHit();
328 if ( m_debug > 0 )
329 {
330 cout << " before 3d fit " << endl;
331 this->printRecHit();
332 }
333 _stat3D = fit_global3D( 0 );
334 return _stat3D;
335}
336
337int HoughTrack::fit3D_inner() { // for multi turn track
338 sortHit();
339 int nhit_zs = calzs();
340 cutMultiCirHit();
341 if ( nhit_zs >= 3 ) fitzs();
342 else
343 {
344 // cout<<" not enough ster hit in zs fit"<<endl;
345 _tanl = 0.;
346 _z0 = 0.;
347 }
348 cutMultiCirHit_after_zs();
349 outerHit();
350 if ( m_debug > 0 )
351 {
352 cout << " before 3d fit " << endl;
353 this->printRecHit();
354 }
355 _stat3D = fit_global3D( 0 );
356 return _stat3D;
357}
358
359void HoughTrack::cutMultiCirHit() {
360 for ( int i = 0; i < _recHitVec.size(); i++ )
361 {
362 if ( _recHitVec[i].getLayerId() > 8 ) continue;
363 if ( ( fabs( _recHitVec[i].getzAmb( 0 ) ) > 10 ) &&
364 ( fabs( _recHitVec[i].getzAmb( 1 ) ) > 10 ) )
365 {
366 _recHitVec[i].setflag( 1 );
367 // cout<<"reject
368 //("<<_recHitVec[i].getLayerId()<<","<<_recHitVec[i].getWireId()<<")"<<_recHitVec[i].getCirList()<<endl;
369 }
370 }
371 _Hough3D.setRecHit( _recHitVec );
372}
373
374void HoughTrack::cutMultiCirHit_after_zs() {
375 for ( int i = 0; i < _recHitVec.size(); i++ )
376 {
377 int layer = _recHitVec[i].getLayerId();
378 double zl = _recHitVec[i].getzAmb( 0 );
379 double zr = _recHitVec[i].getzAmb( 1 );
380 double sl = _recHitVec[i].getsAmb( 0 );
381 double sr = _recHitVec[i].getsAmb( 1 );
382 double dl = zl - ( sl * _tanl + _z0 );
383 double dr = zr - ( sr * _tanl + _z0 );
384 if ( layer <= 8 && fabs( dl ) > 10 && fabs( dr ) > 10 ) _recHitVec[i].setflag( 1 );
385 if ( layer > 8 && fabs( dl ) > 20 && fabs( dr ) > 20 ) _recHitVec[i].setflag( 1 );
386 // if (layer>30) _recHitVec[i].setflag(1);
387 }
388 _Hough3D.setRecHit( _recHitVec );
389}
390
391int HoughTrack::fitLeast() {
392 _Hough2D = Hough2D( _recHitVec, _bunchTime );
393 double circleR = fabs( 1. / ( _maprho ) );
394 double circleX = ( 1. / _maprho ) * cos( _maptheta );
395 double circleY = ( 1. / _maprho ) * sin( _maptheta );
396 double d0 = sqrt( circleX * circleX + circleY * circleY ) - circleR;
397 double phi0 = atan2( circleY, circleX ) + M_PI / 2.;
398 double omega = 1 / circleR;
399 if ( _charge == -1 )
400 {
401 d0 = d0;
402 omega = -1. * fabs( omega );
403 }
404 if ( _charge == 1 )
405 {
406 d0 = -d0;
407 omega = 1. * fabs( omega );
408 phi0 = phi0 - M_PI;
409 }
410 _Hough2D.setCharge( _charge );
411 _Hough2D.setCirX( circleX );
412 _Hough2D.setCirY( circleY );
413 _Hough2D.setCirR( circleR );
414 _Hough2D.setD0( d0 );
415 _Hough2D.setPhi0( phi0 );
416 _Hough2D.setOmega( omega );
417 _Hough2D.setPt( circleR / 333.567 );
418
419 // fill HoughTrack
420 _centerX = _Hough2D.getCirX();
421 _centerY = _Hough2D.getCirY();
422 _centerR = _Hough2D.getCirR();
423 //_pt=_Hough2D.getPt();
424 _pt2D = _Hough2D.getPt();
425 _d0 = _Hough2D.getD0();
426 _omega = _Hough2D.getOmega();
427 _phi0 = _Hough2D.getPhi0();
428 hitOnTrack();
429 if ( m_debug > 0 )
430 {
431 cout << " after least 2d " << endl;
432 printRecHit();
433 }
434 return 1;
435}
436
437int HoughTrack::fit_global2D( vector<HoughRecHit>& recHitVec ) {
438 //_Hough2D=Hough2D(_Hough2D,_recHitVec,bunchtime);
439 //_Hough2D.setRecHit(_recHitVec);
440 _Hough2D.setRecHit( recHitVec );
441 int Stat_2d = _Hough2D.fit();
442 p_trk2D = _Hough2D.getTrk();
443 if ( Stat_2d == 1 )
444 {
445 _centerX = _Hough2D.getCirX();
446 _centerY = _Hough2D.getCirY();
447 _centerR = _Hough2D.getCirR();
448 //_pt=_Hough2D.getPt();
449 _pt2D = _Hough2D.getPt();
450 _d0 = _Hough2D.getD0();
451 _omega = _Hough2D.getOmega();
452 _phi0 = _Hough2D.getPhi0();
453 _chi2_aver2D = _Hough2D.getChi2_2D();
454 _nfit2D = _Hough2D.getNfit();
455 if ( m_debug > 0 ) cout << "pt after global 2d: " << _pt2D << endl;
456 if ( m_debug > 0 ) cout << "after global 2d " << endl;
457 hitOnTrack();
458 if ( m_debug > 0 )
459 {
460 cout << " after global 2d " << endl;
461 printRecHit();
462 }
463 }
464 else
465 {
466 if ( m_debug > 0 ) cout << " 2d global fail" << endl;
467 }
468 return Stat_2d;
469}
470
471int HoughTrack::fit_global3D( int time ) {
472 if ( time == 0 )
473 _Hough3D = Hough3D( _Hough2D, _recHitVec, _bunchTime, _tanl, _z0, vec_mdcHit );
474 if ( m_debug > 0 ) _Hough3D.print();
475 // _Hough3D.setCharge(_charge);
476 int Stat_3d = _Hough3D.fit();
477 p_trk = _Hough3D.getTrk();
478 if ( Stat_3d == 1 )
479 {
480 _centerX = _Hough3D.getCirX();
481 _centerY = _Hough3D.getCirY();
482 _centerR = _Hough3D.getCirR();
483 _pt3D = _Hough3D.getPt();
484 _p = _Hough3D.getP();
485 _pz = _Hough3D.getPz();
486 _d0 = _Hough3D.getD0();
487 _omega = _Hough3D.getOmega();
488 _phi0 = _Hough3D.getPhi0();
489 _tanl = _Hough3D.getTanl();
490 _z0 = _Hough3D.getZ0();
491 _chi2_aver = _Hough3D.getChi2();
492 _nfit = _Hough3D.getNfit();
493 if ( m_debug > 0 ) cout << "pt after global 3d: " << _pt3D << endl;
494 // hitOnTrack();
495 }
496 else
497 {
498 if ( m_debug > 0 ) cout << " 3d global fail" << endl;
499 }
500 return Stat_3d;
501}
502
503void HoughTrack::hitOnTrack() {
504 if ( m_debug > 0 ) cout << " calculate hit on track " << endl;
505 for ( int ihit = 0; ihit < _recHitVec.size(); ihit++ )
506 {
507 std::pair<double, double> theta_l = calcuArcTrack( ( _recHitVec[ihit] ) );
508 int flag = judge_half( _recHitVec[ihit] );
509 double dist = calcuDistToTrack( ( _recHitVec[ihit] ) );
510 double distToCir = calcuDistToCir( ( _recHitVec[ihit] ) );
511 _recHitVec[ihit].setflag( flag ); // FIXME
512 _recHitVec[ihit].setDisToTrack( dist );
513 _recHitVec[ihit].setDisToCir( distToCir );
514 _recHitVec[ihit].setRet( theta_l );
515 }
516 // cut_axial_inner();
517}
518
519int HoughTrack::judge_half( const HoughRecHit& hit ) {
520 int cir = 0; // add initialize 25-05-15
521 double xhit = hit.getMidX();
522 double yhit = hit.getMidY();
523 double x_cir = _Hough2D.getCirX();
524 double y_cir = _Hough2D.getCirY();
525 double r_cir = _Hough2D.getCirR();
526 if ( _charge == -1 )
527 {
528 if ( ( x_cir * yhit - y_cir * xhit >= 0 ) ) cir = 0;
529 else cir = 1;
530 }
531 else if ( _charge == 1 )
532 {
533 if ( ( x_cir * yhit - y_cir * xhit <= 0 ) ) cir = 0;
534 else cir = 1;
535 }
536 else cout << " charge is not set !!!!!!!!!!" << endl;
537
538 return cir;
539}
540
541double HoughTrack::calcuDistToTrack( const HoughRecHit& hit ) {
542 double xhit = hit.getMidX();
543 double yhit = hit.getMidY();
544 double x_cir = _Hough2D.getCirX();
545 double y_cir = _Hough2D.getCirY();
546 double r_cir = _Hough2D.getCirR();
547 double dist = sqrt( pow( ( xhit - x_cir ), 2 ) + pow( ( yhit - y_cir ), 2 ) ) - r_cir;
548 return dist;
549}
550
551double HoughTrack::calcuDistToCir( const HoughRecHit& hit ) {
552 double xhit = hit.getMidX();
553 double yhit = hit.getMidY();
554 double x_cir = _Hough2D.getCirX();
555 double y_cir = _Hough2D.getCirY();
556 double r_cir = _Hough2D.getCirR();
557 double dist = sqrt( pow( ( xhit - x_cir ), 2 ) + pow( ( yhit - y_cir ), 2 ) );
558 return dist;
559}
560// double HoughTrack::InterSect(const HoughRecHit& hit){
561// double xeast = _rechit->getEastPoint().x();
562// double xwest = _rechit->getWestPoint().x();
563// double yeast = _rechit->getEastPoint().y();
564// double ywest = _rechit->getWestPoint().y();
565// double k = (ywest-yeast)/(xwest-xeast);
566// double b = -k*xeast+yeast;
567// double drift = _rechit->getDriftDist();
568// double x_cir=_Hough2D.getCirX();
569// double y_cir=_Hough2D.getCirY();
570// double r_cir=_Hough2D.getCirR();
571// }
572
573std::pair<double, double> HoughTrack::calcuArcTrack( const HoughRecHit& hit ) {
574 double xhit = hit.getMidX();
575 double yhit = hit.getMidY();
576 double x_cir = _centerX;
577 double y_cir = _centerY;
578 double r_cir = _centerR;
579 std::pair<double, double> theta_l;
580
581 double theta_temp;
582 double l_temp = 1.e9; // add initialize 25-05-15
583 if ( x_cir == 0 || xhit - x_cir == 0 ) { theta_temp = 0; }
584 else
585 {
586 theta_temp = M_PI - atan2( yhit - y_cir, xhit - x_cir ) + atan2( y_cir, x_cir );
587 if ( theta_temp > 2 * M_PI ) { theta_temp = theta_temp - 2 * M_PI; }
588 if ( theta_temp < 0 ) { theta_temp = theta_temp + 2 * M_PI; }
589 }
590 if ( _charge == -1 ) { l_temp = r_cir * theta_temp; }
591 if ( _charge == 1 )
592 {
593 theta_temp = 2 * M_PI - theta_temp;
594 l_temp = r_cir * ( theta_temp );
595 }
596 theta_l.first = theta_temp;
597 theta_l.second = l_temp;
598 return theta_l;
599}
600
602 int n_zs = 0;
603 for ( int i = 0; i < _recHitVec.size(); i++ )
604 {
605 if ( _recHitVec[i].getSlayerType() == 0 || _recHitVec[i].getflag() != 0 ) continue;
606 // if ( _recHitVec[i].getLayerId()>=8) continue;
607 HoughStereo zs( _bunchTime, &_Hough2D, &( _recHitVec[i] ) );
608 // cout<<"("<<_recHitVec[i].getLayerId()<<","<<_recHitVec[i].getWireId()<<") stat
609 //"<<stat<<" style
610 //"<<_recHitVec[i].getStyle() <<endl; cout<<endl;
611
612 // zs.setAmb(-1); //right
613 // int stat_left = zs.cald();
614
615 // zs.setAmb(1); //left
616 // int stat_right= zs.cald();
617 // if( stat_left==-1 && stat_right==-1 ) _recHitVec[i].setflag(-999);
618
619 int stat = zs.cald();
620 _recHitVec[i].setnsol( stat );
621 if ( stat == 0 ) _recHitVec[i].setflag( -999 );
622
623 zs.setRecHit();
624 _recHitVec[i].setAmb( -999 ); // check
625
626 if ( _recHitVec[i].getLayerId() < 8 ) n_zs++;
627 if ( m_debug > 0 ) zs.print();
628 }
629 // int naddStero = cutNoise_inner();
630 // return naddStero;
631 return n_zs;
632}
634 HoughZsFit zsfit( &_recHitVec );
635 _tanl = zsfit.getTanl();
636 _z0 = zsfit.getZ0();
637 _tanl_zs = zsfit.getTanl();
638 _z0_zs = zsfit.getZ0();
639 t_pro_correct = zsfit.getPro();
640 if ( m_debug > 0 ) printRecHit();
641}
642
643int HoughTrack::getHitNum( int select ) const {
644 int size = _recHitVec.size();
645 int n0, n1, n2, n3, n4, n5, n6;
646 n0 = n1 = n2 = n3 = n4 = n5 = n6 = 0;
647 for ( int i = 0; i < size; i++ )
648 {
649 int cir = _recHitVec[i].getCirList();
650 int index = _recHitVec[i].digi()->getTrackIndex();
651 int style = _recHitVec[i].getStyle();
652 n0++;
653 if ( style == 1 ) n1++;
654 if ( style == 2 ) n2++;
655 if ( index < 0 ) n3++;
656 if ( index >= 0 && cir <= 1 && style == 0 ) n4++;
657 if ( index < 0 || cir > 1 ) n5++;
658 if ( index >= 0 && cir == 0 && style == 0 ) n6++;
659 }
660 if ( select == 0 ) return n0;
661 if ( select == 1 ) return n1;
662 if ( select == 2 ) return n2;
663 if ( select == 3 ) return n3;
664 if ( select == 4 ) return n4;
665 if ( select == 5 ) return n5;
666 if ( select == 6 ) return n6;
667 std::cerr << __FILE__ << ":" << __LINE__ << ": should not reach here" << std::endl;
668 exit( 1 );
669}
670
671int HoughTrack::getHitNumA( int select ) const {
672 int size = _recHitVec.size();
673 int n0, n1, n2, n3, n4, n5, n6;
674 n0 = n1 = n2 = n3 = n4 = n5 = n6 = 0;
675 for ( int i = 0; i < size; i++ )
676 {
677 int cir = _recHitVec[i].getCirList();
678 int index = _recHitVec[i].digi()->getTrackIndex();
679 int type = _recHitVec[i].getSlayerType();
680 int style = _recHitVec[i].getStyle();
681 if ( type == 0 ) n0++;
682 if ( type == 0 && style == 1 ) n1++;
683 if ( type == 0 && style == 2 ) n2++;
684 if ( type == 0 && index < 0 ) n3++;
685 if ( type == 0 && index >= 0 && cir <= 1 && style == 0 ) n4++;
686 if ( type == 0 && ( index < 0 || cir > 1 ) ) n5++;
687 if ( type == 0 && index >= 0 && cir == 0 && style == 0 ) n6++;
688 }
689 if ( select == 0 ) return n0;
690 if ( select == 1 ) return n1;
691 if ( select == 2 ) return n2;
692 if ( select == 3 ) return n3;
693 if ( select == 4 ) return n4;
694 if ( select == 5 ) return n5;
695 if ( select == 6 ) return n6;
696 std::cerr << __FILE__ << ":" << __LINE__ << ": should not reach here" << std::endl;
697 exit( 1 );
698}
699int HoughTrack::getHitNumS( int select ) const {
700 int size = _recHitVec.size();
701 int n0, n1, n2, n3, n4, n5, n6;
702 n0 = n1 = n2 = n3 = n4 = n5 = n6 = 0;
703 for ( int i = 0; i < size; i++ )
704 {
705 int cir = _recHitVec[i].getCirList();
706 int index = _recHitVec[i].digi()->getTrackIndex();
707 int type = _recHitVec[i].getSlayerType();
708 int style = _recHitVec[i].getStyle();
709 if ( type != 0 ) n0++;
710 if ( type != 0 && style == 1 ) n1++;
711 if ( type != 0 && style == 2 ) n2++;
712 if ( type != 0 && index < 0 ) n3++;
713 if ( type != 0 && index >= 0 && cir <= 1 && style == 0 ) n4++;
714 if ( type != 0 && ( index < 0 || cir > 1 ) ) n5++;
715 if ( type != 0 && index >= 0 && cir == 0 && style == 0 ) n6++;
716 }
717 if ( select == 0 ) return n0;
718 if ( select == 1 ) return n1;
719 if ( select == 2 ) return n2;
720 if ( select == 3 ) return n3;
721 if ( select == 4 ) return n4;
722 if ( select == 5 ) return n5;
723 if ( select == 6 ) return n6;
724 std::cerr << __FILE__ << ":" << __LINE__ << ": should not reach here" << std::endl;
725 exit( 1 );
726}
727
729 // hit number test
730 int axialHit = 0;
731 // int stereoHit=0;
732 // int innerHit=0;
733 vector<int> vec_layer;
734 for ( int i = 0; i < _recHitVec.size(); i++ )
735 {
736 int layer = _recHitVec[i].getLayerId();
737 int slant = _recHitVec[i].getSlayerType();
738 if ( 0 == slant ) axialHit++;
739 // if( 0!=slant ) stereoHit++;
740 // if( layer<8 ) innerHit++;
741 }
742 // if ( axialHit <5 || stereoHit <3 || innerHit ==0 ) return 0;
743 if ( axialHit < 5 ) return 0;
744 else return 1;
745 // // continues hit test
746 // bool continues=false;
747 // for(int i =0;i<vec_layer.size();i++){
748 // int layer = vec_layer[i];
749 // vector<int>::iterator iter = find( vec_layer.begin(),vec_layer.end(),layer+1 );
750 // if( iter != vec_layer.end() ){
751 // vector<int>::iterator iter2 = find( vec_layer.begin(),vec_layer.end(),layer-1 );
752 // if( iter2 != vec_layer.end() ) continues = true;
753 // }
754 // }
755}
756
758 vector<HoughRecHit> vec_rec; // store hit temp
759 int naddStero = 0;
760 for ( int ihit = 0; ihit < _houghList.size(); ihit++ )
761 {
762 const HoughHit hit = _houghList[ihit];
763 if ( hit.getSlayerType() == 0 ) continue;
764 if ( hit.driftTime( _bunchTime, 0 ) > 800 ) continue;
765 HoughRecHit p_hit( hit, 0, 0, 1 );
766 p_hit.setPtr2D( &_Hough2D );
767 std::pair<double, double> theta_l = calcuArcTrack( p_hit );
768 double dist = calcuDistToTrack( p_hit );
769 double distToCir = calcuDistToCir( p_hit );
770 int flag = judge_half( p_hit );
771 int layer = p_hit.getLayerId();
772 int wire = p_hit.getWireId();
773 double disCut;
774 if ( layer < 8 ) disCut = 4;
775 else disCut = 6;
776 // double dist=sqrt( pow( (xhit-x_cir),2)+pow( (yhit-y_cir),2) )-r_cir;
777 // cout<<"find stereo hit dist?("<<layer<<" ,"<<wire<<" ) "<<dist<<endl;
778 if ( m_debug > 0 )
779 cout << "(" << layer << "," << wire << ") "
780 << " rec hit dist theta " << dist << " " << theta_l.first << endl;
781 if ( fabs( dist ) < disCut )
782 {
783 p_hit.setDisToTrack( dist );
784 p_hit.setDisToCir( dist );
785 p_hit.setRet( theta_l );
786 p_hit.setflag( flag );
787 // if( p_hit.getflag()==0 ) vec_rec.push_back(p_hit);
788 // vec_rec.push_back(p_hit);
789 if ( p_hit.getflag() != 0 ) continue;
790 _recHitVec.push_back( p_hit );
791 naddStero++;
792 }
793 }
794 return naddStero;
795}
796
798 for ( int ilay = 0; ilay < 43; ilay++ )
799 {
800 // if( (ilay<7&&ilay<20) || ilay>35 ) continue;
801 if ( ( ilay >= 0 && ilay <= 7 ) || ( ilay >= 20 && ilay <= 35 ) ) continue;
802 // for( int ilay=0;ilay<8;ilay++)
803 double disToCir = 9999;
804 int max = -999;
805 int count = 0;
806 int count_cut = 0;
807 for ( int ihit = 0; ihit < _recHitVec.size(); ihit++ )
808 {
809 if ( _recHitVec[ihit].getLayerId() == ilay && _recHitVec[ihit].getflag() == 0 )
810 {
811 count++;
812 if ( ( fabs( _recHitVec[ihit].getDisToCir() ) < disToCir ) )
813 {
814 disToCir = fabs( _recHitVec[ihit].getDisToCir() );
815 max = ihit;
816 count_cut = 1;
817 }
818 }
819 }
820 if ( m_debug > 0 )
821 cout << "ilay count count_cut " << ilay << " " << count << " " << count_cut << endl;
822 if ( count_cut != 0 && count > 1 ) _recHitVec[max].setflag( -999 );
823 if ( m_debug > 0 && count_cut != 0 && count > 1 )
824 cout << "delete (" << _recHitVec[max].getLayerId() << "," << _recHitVec[max].getWireId()
825 << ")" << endl;
826 }
827 int size_of_axial = 0; // add initialize 25-05-15
828 for ( int ihit = 0; ihit < _recHitVec.size(); ihit++ )
829 {
830 if ( _recHitVec[ihit].getSlayerType() == 0 && _recHitVec[ihit].getflag() == 0 )
831 size_of_axial++;
832 }
833 return size_of_axial;
834}
835
837 // for( int ilay=0;ilay<43;ilay++)
838 // if( (ilay>7&&ilay<20) || ilay>35 ) continue;
839 for ( int ilay = 0; ilay < 8; ilay++ )
840 {
841 double z_0 = 0;
842 double z_1 = 0;
843 int min = -999;
844 int count = 0;
845 int count_cut = 0;
846 // cout<<" size "<<_recHitVec.size()<<endl;
847 for ( int ihit = 0; ihit < _recHitVec.size(); ihit++ )
848 {
849 if ( _recHitVec[ihit].getLayerId() == ilay && _recHitVec[ihit].getflag() == 0 )
850 {
851 count++;
852 if ( ( ( fabs( _recHitVec[ihit].getzAmb( 0 ) ) > z_0 ) &&
853 ( fabs( _recHitVec[ihit].getzAmb( 1 ) ) > z_1 ) ) )
854 {
855 if ( z_0 != 0 && z_1 != 0 ) count_cut++;
856 z_0 = fabs( _recHitVec[ihit].getzAmb( 0 ) );
857 z_1 = fabs( _recHitVec[ihit].getzAmb( 1 ) );
858 min = ihit;
859 }
860 else if ( ( ( fabs( _recHitVec[ihit].getzAmb( 0 ) ) < z_0 ) &&
861 ( fabs( _recHitVec[ihit].getzAmb( 1 ) ) < z_1 ) ) )
862 { count_cut++; }
863 }
864 }
865 if ( m_debug > 0 )
866 cout << "ilay count count_cut " << ilay << " " << count << " " << count_cut << endl;
867 if ( count_cut > 0 && count > 1 ) _recHitVec[min].setflag( -999 );
868 if ( m_debug > 0 && count_cut > 0 && count > 1 )
869 cout << "delete (" << _recHitVec[min].getLayerId() << "," << _recHitVec[min].getWireId()
870 << ")" << endl;
871 }
872 int size_of_stereo = 0; // add initialize 25-05-15
873 for ( int ihit = 0; ihit < _recHitVec.size(); ihit++ )
874 {
875 if ( _recHitVec[ihit].getSlayerType() != 0 && _recHitVec[ihit].getflag() == 0 )
876 size_of_stereo++;
877 }
878 return size_of_stereo;
879}
880
882 cout << "print rec hit" << endl;
883 double rho = _centerPeak.getRho();
884 double theta = _centerPeak.getTheta();
885 int size = _recHitVec.size();
886 for ( int i = 0; i < size; i++ )
887 {
888 int layer = _recHitVec[i].getLayerId();
889 int wire = _recHitVec[i].getWireId();
890 int slant = _recHitVec[i].getSlayerType();
891 int flag = _recHitVec[i].getflag();
892 int style = _recHitVec[i].getStyle();
893 int cirlist = _recHitVec[i].getCirList();
894 if ( slant == 0 )
895 std::cout << "axial hit (" << layer << "," << wire << ") "
896 << _recHitVec[i].getDisToTrack() << " " << _recHitVec[i].getDisToCir() << " "
897 << flag << " " << style << " " << cirlist << std::endl;
898 }
899 for ( int i = 0; i < size; i++ )
900 {
901 int layer = _recHitVec[i].getLayerId();
902 int wire = _recHitVec[i].getWireId();
903 int slant = _recHitVec[i].getSlayerType();
904 int flag = _recHitVec[i].getflag();
905 int style = _recHitVec[i].getStyle();
906 int cirlist = _recHitVec[i].getCirList();
907 if ( slant != 0 )
908 std::cout << "stereo hit (" << layer << "," << wire << ") "
909 << _recHitVec[i].getDisToTrack() << " " << flag << " " << style << " "
910 << cirlist << std::endl;
911 }
912}
913
915 int n_neg( 0 );
916 int n_pos( 0 );
917 for ( int ihit = 0; ihit < _recHitVec.size(); ihit++ )
918 {
919 double xhit = _recHitVec[ihit].getMidX();
920 double yhit = _recHitVec[ihit].getMidY();
921 double x_cir = _Hough2D.getCirX();
922 double y_cir = _Hough2D.getCirY();
923 double r_cir = _Hough2D.getCirR();
924 if ( ( x_cir * yhit - y_cir * xhit >= 0 ) ) n_neg++;
925 if ( ( x_cir * yhit - y_cir * xhit <= 0 ) ) n_pos++;
926 }
927 if ( m_debug > 0 ) cout << " in track charge 2d " << n_neg << " " << n_pos << endl;
928 if ( ( _charge == -1 && n_neg < 3 ) || ( _charge == 1 && n_pos < 3 ) ) return 0;
929 else if ( _charge == 0 ) { cout << " wrong ! in track charge 3D not set charge " << endl; }
930 else return 1;
931
932 std::cerr << __FILE__ << ":" << __LINE__ << ": should not reach here" << std::endl;
933 exit( 1 );
934}
935
937 int n_neg( 0 );
938 int n_pos( 0 );
939 for ( int ihit = 0; ihit < _recHitVec.size(); ihit++ )
940 {
941 if ( _recHitVec[ihit].getSlayerType() == 0 ) continue;
942 if ( _recHitVec[ihit].getLayerId() > 7 ) continue;
943 double xhit = _recHitVec[ihit].getMidX();
944 double yhit = _recHitVec[ihit].getMidY();
945 double x_cir = _Hough2D.getCirX();
946 double y_cir = _Hough2D.getCirY();
947 double r_cir = _Hough2D.getCirR();
948 if ( ( x_cir * yhit - y_cir * xhit >= 0 ) ) n_neg++;
949 if ( ( x_cir * yhit - y_cir * xhit <= 0 ) ) n_pos++;
950 }
951 if ( m_debug > 0 ) cout << " in track charge 3d " << n_neg << " " << n_pos << endl;
952 if ( ( _charge == -1 && n_neg < 2 ) || ( _charge == 1 && n_pos < 2 ) ) return 0;
953 else if ( _charge == 0 ) { cout << " wrong ! in track charge 3D not set charge " << endl; }
954 else return 1;
955
956 std::cerr << __FILE__ << ":" << __LINE__ << ": should not reach here" << std::endl;
957 exit( 1 );
958}
959void HoughTrack::Leastfit( vector<double> u, vector<double> v, double& k, double& b ) {
960 int N = u.size();
961 if ( N <= 2 ) return;
962 double* x = new double[N];
963 double* y = new double[N];
964 for ( int i = 0; i < N; i++ )
965 {
966 x[i] = u[i];
967 y[i] = v[i];
968 }
969
970 TF1* fpol1 = new TF1( "fpol1", "pol1", -50, 50 );
971 TGraph* tg = new TGraph( N, x, y );
972 tg->Fit( "fpol1", "QN" );
973 double ktemp = fpol1->GetParameter( 1 );
974 double btemp = fpol1->GetParameter( 0 );
975 k = ktemp;
976 b = btemp;
977 delete[] x;
978 delete[] y;
979 delete fpol1;
980 delete tg;
981}
983 // in truth
984 double k, b, theta, rho, x_cross, y_cross;
985 vector<double> vtemp, utemp;
986 std::vector<HoughRecHit>::iterator iter = _recHitVec.begin();
987 for ( int iHit = 0; iter != _recHitVec.end(); iter++, iHit++ )
988 {
989 const HoughRecHit h = ( *iter );
990 // if( h.getCirList()!=0 ) continue;
991 if ( h.digi()->getTrackIndex() >= 0 && h.getStyle() == 0 && h.getSlayerType() == 0 &&
992 h.getCirList() == 0 && utemp.size() < 10 ) // ??use 2nd half
993 {
994 utemp.push_back( h.getUTruth() );
995 vtemp.push_back( h.getVTruth() );
996 }
997 }
998 Leastfit( utemp, vtemp, k, b );
999 // calcu truth
1000 // k,b from truth
1001 x_cross = -b / ( k + 1 / k );
1002 y_cross = b / ( 1 + k * k );
1003 rho = sqrt( x_cross * x_cross + y_cross * y_cross );
1004 theta = atan2( y_cross, x_cross );
1005 //
1006 // cout<<"track center position "<<_centerX<<" "<<_centerY<<endl;
1007 std::vector<HoughRecHit>::iterator iter0 = _recHitVec.begin();
1008 for ( ; iter0 != _recHitVec.end(); iter0++ )
1009 {
1010 HoughRecHit* hit = &( *iter0 );
1011 if ( hit->getSlayerType() != 0 ) continue;
1012 // if( hit->getCirList()!=0 ) continue; // use in learn distribute
1013 // double cirr_hit = hit->getDriftDistTruth();
1014 double cirx_hit = hit->getMidX();
1015 double ciry_hit = hit->getMidY();
1016 double cirr_hit = hit->getDriftDist();
1017 double l1l2 = sqrt( ( cirx_hit - _centerX ) * ( cirx_hit - _centerX ) +
1018 ( ciry_hit - _centerY ) * ( ciry_hit - _centerY ) );
1019 double deltaD = 1.e9; // add initialize 25-05-15
1020 if ( l1l2 > _centerR ) deltaD = l1l2 - _centerR - cirr_hit;
1021 if ( l1l2 <= _centerR ) deltaD = l1l2 - _centerR + cirr_hit;
1022 hit->setDeltaD( deltaD );
1023 // cal flight length
1024
1025 double theta_temp;
1026 double l_temp = 1.e9; // add initialize 25-05-15
1027 if ( _centerX == 0 || cirx_hit - _centerX == 0 ) { theta_temp = 0; }
1028 else
1029 {
1030 theta_temp = M_PI - atan2( ciry_hit - _centerY, cirx_hit - _centerX ) +
1031 atan2( _centerY, _centerX );
1032 if ( theta_temp > 2 * M_PI ) { theta_temp = theta_temp - 2 * M_PI; }
1033 if ( theta_temp < 0 ) { theta_temp = theta_temp + 2 * M_PI; }
1034 }
1035 // cout<<" charge "<<_charge <<" "<<theta_temp<<endl;
1036 if ( _charge == -1 ) { l_temp = _centerR * theta_temp; }
1037 if ( _charge == 1 )
1038 {
1039 theta_temp = 2 * M_PI - theta_temp;
1040 l_temp = _centerR * ( theta_temp );
1041 }
1042 // cout<<"("<<hit->getLayerId()<<","<<hit->getWireId()<<") "<<l_temp<<endl;
1043 hit->setFltLen( l_temp );
1044
1045 // cout<<"int map deltaD: ("<<hit->getLayerId()<<","<<hit->getWireId()<<")"<<
1046 // hit->getDeltaD()<<endl;
1047 }
1048}
1050 int nster1 = 0;
1051 int nster2 = 0;
1052 int nster3 = 0;
1053 int naxial1 = 0;
1054 int naxial2 = 0;
1055 int naxial3 = 0;
1056 for ( int ihit = 0; ihit < _houghList.size(); ihit++ )
1057 {
1058 const HoughHit hit = _houghList[ihit];
1059 if ( hit.driftTime( _bunchTime, 0 ) > 1000 ) continue;
1060 if ( hit.getLayerId() >= 24 ) continue;
1061 HoughRecHit p_hit( hit, 0, 0, 1 );
1062 p_hit.setPtr2D( &_Hough2D );
1063 std::pair<double, double> theta_l = calcuArcTrack( p_hit );
1064 double dist = calcuDistToTrack( p_hit );
1065 double distToCir = calcuDistToCir( p_hit );
1066 int flag = judge_half( p_hit );
1067 int layer = p_hit.getLayerId();
1068 int wire = p_hit.getWireId();
1069 int slayer = p_hit.getSlayerType();
1070 double disCut;
1071 if ( slayer == 0 ) disCut = 6;
1072 else
1073 {
1074 if ( layer < 8 ) disCut = 6;
1075 else disCut = 6;
1076 }
1077 if ( m_debug > 0 )
1078 cout << "(" << layer << "," << wire << ") "
1079 << " pair dist flag " << dist << " " << flag << endl;
1080 if ( fabs( dist ) < disCut )
1081 {
1082 if ( flag != 1 ) continue; // find hit in the 2nd half
1083 if ( layer < 4 ) nster1++;
1084 else if ( layer < 8 ) nster2++;
1085 else if ( layer < 12 ) naxial1++;
1086 else if ( layer < 16 ) naxial2++;
1087 else if ( layer < 20 ) naxial3++;
1088 else nster3++;
1089 }
1090 }
1091 if ( m_debug > 0 )
1092 {
1093 cout << "naxial_1 " << naxial1 << endl;
1094 cout << "naxial_2 " << naxial2 << endl;
1095 cout << "naxial_3 " << naxial3 << endl;
1096 cout << "stereo_1 " << nster1 << endl;
1097 cout << "stereo_2 " << nster2 << endl;
1098 cout << "stereo_3 " << nster3 << endl;
1099 }
1100 if ( nster1 >= 2 && nster2 >= 2 && nster3 >= 2 && naxial1 >= 2 && naxial2 >= 2 &&
1101 naxial3 >= 2 )
1102 return 1;
1103 else return 0;
1104}
1106 cout << "print HoughTrack : " << p_trk->id() << endl;
1107 cout << "par : " << _d0 << "," << _omega << "," << _phi0 << "," << _z0 << "," << _tanl
1108 << ", pt: " << _pt3D << endl;
1109 TrkHitList* qhits = p_trk->hits();
1110 TrkHotList::hot_iterator hotIter = qhits->hotList().begin();
1111 int lay = ( (MdcHit*)( hotIter->hit() ) )->layernumber();
1112 int wir = ( (MdcHit*)( hotIter->hit() ) )->wirenumber();
1113 while ( hotIter != qhits->hotList().end() )
1114 {
1115 cout << "(" << ( (MdcHit*)( hotIter->hit() ) )->layernumber() << ","
1116 << ( (MdcHit*)( hotIter->hit() ) )->wirenumber() << ":" << hotIter->isActive()
1117 << ") ";
1118 cout << "nuse " << hotIter->hit()->nUsedHits() << endl;
1119
1120 hotIter++;
1121 }
1122}
const Int_t n
Double_t time
#define min(a, b)
#define max(a, b)
DOUBLE_PRECISION count[3]
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
XmlRpcServer s
bool digi_in_track(const HoughRecHit &hita, const HoughRecHit &hitb)
bool less_layer(const int &a, const int &b)
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
int n2
Definition SD0Tag.cxx:59
int n1
Definition SD0Tag.cxx:58
#define M_PI
Definition TConstant.h:4
const MdcDigi * digi() const
Definition HoughHit.h:53
double getUTruth() const
Definition HoughHit.h:90
int getCirList() const
Definition HoughHit.h:102
void setFltLen(double flt)
Definition HoughHit.h:99
int getSlayerType() const
Definition HoughHit.h:62
double driftTime() const
Definition HoughHit.cxx:170
double getDriftDist() const
Definition HoughHit.h:67
double getMidY() const
Definition HoughHit.h:59
void setDeltaD(double d)
Definition HoughHit.h:98
double getMidX() const
Definition HoughHit.h:58
int getStyle() const
Definition HoughHit.h:103
int getLayerId() const
Definition HoughHit.h:60
double getVTruth() const
Definition HoughHit.h:91
int getWireId() const
Definition HoughHit.h:61
void setRet(std::pair< double, double > theta_l)
Definition HoughRecHit.h:29
void setPtr2D(Hough2D *p_hough2D)
Definition HoughRecHit.h:26
int getflag() const
Definition HoughRecHit.h:23
void setDisToCir(double dis)
Definition HoughRecHit.h:28
void setflag(int i)
Definition HoughRecHit.h:34
void setDisToTrack(double dis)
Definition HoughRecHit.h:27
int cut_axial_inner()
void sortHit()
int trackCharge2D()
int getHitNumS(int) const
static bool m_debug
Definition HoughTrack.h:79
int find_stereo_hit()
int getHitNumA(int) const
int fit2D(double bunchtime)
int getHitNum(int) const
void Leastfit(vector< double >, vector< double >, double &, double &)
int trackCharge3D()
int fit3D_inner()
HoughTrack & add(const HoughTrack &other)
void cald_layer()
int judgeTrack()
void outerHit()
HoughTrack & operator=(const HoughTrack &other)
int cutNoise_inner()
void printRecHit() const
int find_pair_hit()
double getPro() const
Definition HoughZsFit.h:23
double getTanl() const
Definition HoughZsFit.h:21
double getZ0() const
Definition HoughZsFit.h:22
int getTrackIndex() const
Definition RawData.cxx:38
int nUsedHits() const
const TrkHotList & hotList() const
TrkHitOnTrkIter< TrkHotList::const_iterator_traits > hot_iterator