21 _charge=(other._charge);
22 _ptLeast=(other._ptLeast);
33 _tanl_zs=(other._tanl_zs);
34 _z0_zs=(other._z0_zs);
36 _centerPeak=(other._centerPeak);
37 _Hough2D=(other._Hough2D);
38 _Hough3D=(other._Hough3D);
39 _bunchTime=(other._bunchTime);
40 _centerX=(other._centerX);
41 _centerY=(other._centerY);
42 _centerR=(other._centerR);
43 _chi2_aver=(other._chi2_aver);
45 _chi2_aver2D=(other._chi2_aver2D);
46 _nfit2D=(other._nfit2D);
47 _recHitVec=(other._recHitVec);
48 _stat2D=(other._stat2D);
49 _stat3D=(other._stat3D);
51 p_trk2D=other.p_trk2D;
52 _maprho = other._maprho;
53 _maptheta= other._maptheta;
54 t_pro_correct= other.t_pro_correct;
55 _houghList = other._houghList;
56 vec_mdcHit = other.vec_mdcHit;
73 _charge(other._charge),
74 _ptLeast(other._ptLeast),
86 _tanl_zs(other._tanl_zs),
88 _centerPeak(other._centerPeak),
89 _Hough2D(other._Hough2D),
90 _Hough3D(other._Hough3D),
91 _bunchTime(other._bunchTime),
92 _centerX(other._centerX),
93 _centerY(other._centerY),
94 _centerR(other._centerR),
95 _chi2_aver(other._chi2_aver),
97 _chi2_aver2D(other._chi2_aver2D),
98 _nfit2D(other._nfit2D),
99 _stat2D(other._stat2D),
100 _stat3D(other._stat3D),
101 _recHitVec(other._recHitVec),
103 p_trk2D(other.p_trk2D),
104 _maprho(other._maprho),
105 _maptheta(other._maptheta),
106 t_pro_correct(other.t_pro_correct),
107 _houghList(other._houghList),
108 vec_mdcHit ( other.vec_mdcHit)
128 for(
int i =0;i<other._recHitVec.size();i++){
130 for(
int j =0;j<_recHitVec.size();j++){
131 if( _recHitVec[j].digi() == other._recHitVec[i].digi() ) { same=1;}
137 _recHitVec.push_back(p_hit);
145 _centerPeak=centerPeak;
175 int t_size = trackHitList.size();
176 for(
int i =0;i<t_size;i++){
180 _recHitVec.push_back(p_hit);
188 std::sort (_recHitVec.begin(),_recHitVec.end(),
digi_in_track);
193 _bunchTime=bunchtime;
194 _stat2D = fitLeast();
196 _stat2D = fit_global2D(_recHitVec);
208 vector<int> vec_layer_num[43];
209 for(
int ilay=0;ilay<43;ilay++){
210 for(
int ihit=0;ihit<_recHitVec.size();ihit++){
211 if( _recHitVec[ihit].getLayerId()==ilay && _recHitVec[ihit].getflag()==0 ) {
212 vec_layer_num[ilay].push_back( _recHitVec[ihit].getWireId() );
215 std::sort( vec_layer_num[ilay].begin(),vec_layer_num[ilay].end(),
less_layer);
217 if( vec_layer_num[ilay].size() < 4 )
continue;
218 for(
int j=0;j<vec_layer_num[ilay].size();j++) {
220 for(
int jhit=0;jhit<_recHitVec.size();jhit++) {
221 if( (ilay==_recHitVec[jhit].getLayerId()) && (vec_layer_num[ilay][j]==_recHitVec[jhit].getWireId() ) ) {_recHitVec[jhit].setflag(-1);}
239int HoughTrack::collectAxialHit(){
240 vector<HoughRecHit> hitCol;
242 for(
int ilay=8;ilay<20;ilay++){
244 for(
int ihit=0;ihit<_recHitVec.size();ihit++){
245 if( _recHitVec[ihit].getLayerId()==ilay && _recHitVec[ihit].getflag()==0) {
246 hitCol.push_back( _recHitVec[ihit]);
250 lay_contain[ilay-8]=lay_count;
256 a = (
int**)malloc(
sizeof(
int*) * 12);
257 len = (
int*)malloc(
sizeof(
int) * 12);
258 for (
int i = 0; i < 12; i++) {
260 for (
int s = 0;
s < i;
s++) {
261 add_lay_count+=lay_contain[
s];
263 int n = lay_contain[i];
265 a[i] = (
int*)malloc(
sizeof(
int) *
n);
266 for (
int j = 0; j <
n; j++) {
267 a[i][j]= add_lay_count+j;
268 cout<<
"aij "<<a[i][j]<<endl;
269 cout<<
"("<<hitCol[add_lay_count+j].getLayerId()<<
","<<hitCol[add_lay_count+j].getWireId()<<
")"<<endl;
273 fun(0,a,len,p,hitCol,numall);
274 cout<<
" num all "<<numall<<endl;
276void HoughTrack::fun(
int level,
int** a,
int* len,
int* p,vector<HoughRecHit>& hitCol,
int& numall) {
278 cout<<
"level "<<level<<
" len "<<len[level]<<endl;
279 for (
int i = 0; i < len[level]; i++) {
280 cout<<i<<
" i "<<endl;
282 cout<<i<<
" i "<<endl;
283 cout<<
"fun "<<level+1<<endl;
284 fun(level+1,a,len,p,hitCol,numall);
288 for (
int i = 0; i < 12; i++) {
290 cout<<
"("<<hitCol[
num].getLayerId()<<
","<<hitCol[
num].getWireId()<<
")"<<endl;
301 int nhit_zs =
calzs();
302 if( nhit_zs >=3 )
fitzs();
308 _stat3D = fit_global3D(0);
314 int nhit_zs =
calzs();
316 if( nhit_zs >=3 )
fitzs();
321 cutMultiCirHit_after_zs();
324 _stat3D = fit_global3D(0);
328int HoughTrack::cutMultiCirHit(){
329 for(
int i=0;i<_recHitVec.size();i++){
330 if( _recHitVec[i].getLayerId()>8 )
continue;
331 if( (fabs(_recHitVec[i].getzAmb(0))>10) && (fabs(_recHitVec[i].getzAmb(1))>10) ) {
332 _recHitVec[i].setflag(1);
339int HoughTrack::cutMultiCirHit_after_zs(){
340 for(
int i=0;i<_recHitVec.size();i++){
341 int layer = _recHitVec[i].getLayerId();
342 double zl = _recHitVec[i].getzAmb(0);
343 double zr = _recHitVec[i].getzAmb(1);
344 double sl = _recHitVec[i].getsAmb(0);
345 double sr = _recHitVec[i].getsAmb(1);
346 double dl = zl - (sl*_tanl+_z0);
347 double dr = zr - (sr*_tanl+_z0);
348 if (layer<=8 && fabs(dl)>10 && fabs(dr)>10 ) _recHitVec[i].setflag(1);
349 if (layer>8 && fabs(dl)>20 && fabs(dr)>20 ) _recHitVec[i].setflag(1);
355int HoughTrack::fitLeast(){
356 _Hough2D=
Hough2D(_recHitVec,_bunchTime);
357 double circleR = fabs(1./(_maprho));
358 double circleX = (1./_maprho)*
cos(_maptheta);
359 double circleY = (1./_maprho)*
sin(_maptheta);
360 double d0 = sqrt( circleX*circleX + circleY*circleY )-circleR;
361 double phi0 = atan2(circleY,circleX)+
M_PI/2.;
362 double omega = 1/circleR;
365 omega=-1.*fabs(omega);
369 omega=1.*fabs(omega);
376 _Hough2D.
setD0( d0 );
379 _Hough2D.
setPt( circleR/333.567 );
386 _pt2D=_Hough2D.
getPt();
387 _d0=_Hough2D.
getD0();
396int HoughTrack::fit_global2D(vector<HoughRecHit>& recHitVec){
400 int Stat_2d=_Hough2D.
fit();
401 p_trk2D = _Hough2D.
getTrk();
407 _pt2D=_Hough2D.
getPt();
408 _d0=_Hough2D.
getD0();
413 if(
m_debug>0) cout<<
"pt after global 2d: "<<_pt2D<<endl;
414 if(
m_debug>0) cout<<
"after global 2d "<<endl;
419 if(
m_debug>0) cout<<
" 2d global fail"<<endl;
424int HoughTrack::fit_global3D(
int time){
425 if(
time==0 ) _Hough3D=
Hough3D(_Hough2D,_recHitVec,_bunchTime,_tanl,_z0,vec_mdcHit);
428 int Stat_3d=_Hough3D.
fit();
429 p_trk = _Hough3D.
getTrk();
434 _pt3D=_Hough3D.
getPt();
436 _pz=_Hough3D.
getPz();
437 _d0=_Hough3D.
getD0();
441 _z0=_Hough3D.
getZ0();
442 _chi2_aver = _Hough3D.
getChi2();
444 if(
m_debug>0) cout<<
"pt after global 3d: "<<_pt3D<<endl;
448 if(
m_debug>0) cout<<
" 3d global fail"<<endl;
453void HoughTrack::hitOnTrack(){
454 if(
m_debug>0) cout<<
" calculate hit on track "<<endl;
455 for(
int ihit=0;ihit<_recHitVec.size();ihit++){
456 std::pair<double,double> theta_l = calcuArcTrack( (_recHitVec[ihit]) );
457 int flag = judge_half(_recHitVec[ihit]);
458 double dist=calcuDistToTrack( (_recHitVec[ihit]));
459 double distToCir=calcuDistToCir( (_recHitVec[ihit]));
460 _recHitVec[ihit].setflag(
flag);
461 _recHitVec[ihit].setDisToTrack(dist);
462 _recHitVec[ihit].setDisToCir(distToCir);
463 _recHitVec[ihit].setRet(theta_l);
472 double x_cir=_Hough2D.
getCirX();
473 double y_cir=_Hough2D.
getCirY();
474 double r_cir=_Hough2D.
getCirR();
476 if( (x_cir*yhit - y_cir*xhit >=0) ) cir=0;
480 if( (x_cir*yhit - y_cir*xhit <=0) ) cir=0;
483 else cout<<
" charge is not set !!!!!!!!!!"<<endl;
488double HoughTrack::calcuDistToTrack(
const HoughRecHit& hit){
491 double x_cir=_Hough2D.
getCirX();
492 double y_cir=_Hough2D.
getCirY();
493 double r_cir=_Hough2D.
getCirR();
494 double dist=sqrt( pow( (xhit-x_cir),2)+pow( (yhit-y_cir),2) )-r_cir;
498double HoughTrack::calcuDistToCir(
const HoughRecHit& hit){
501 double x_cir=_Hough2D.
getCirX();
502 double y_cir=_Hough2D.
getCirY();
503 double r_cir=_Hough2D.
getCirR();
504 double dist=sqrt( pow( (xhit-x_cir),2)+pow( (yhit-y_cir),2) );
520std::pair<double,double> HoughTrack::calcuArcTrack(
const HoughRecHit& hit){
523 double x_cir=_centerX;
524 double y_cir=_centerY;
525 double r_cir=_centerR;
526 std::pair<double,double> theta_l;
530 if(x_cir==0||xhit-x_cir==0){
534 theta_temp=
M_PI-atan2(yhit-y_cir,xhit-x_cir)+atan2(y_cir,x_cir);
535 if(theta_temp>2*
M_PI){
536 theta_temp=theta_temp-2*
M_PI;
539 theta_temp=theta_temp+2*
M_PI;
543 l_temp=r_cir*theta_temp;
546 theta_temp=2*
M_PI-theta_temp;
547 l_temp=r_cir*(theta_temp);
549 theta_l.first=theta_temp;
550 theta_l.second=l_temp;
556 for(
int i =0; i<_recHitVec.size(); i++){
557 if ( _recHitVec[i].getSlayerType() ==0 || _recHitVec[i].getflag()!=0 )
continue;
559 HoughStereo zs( _bunchTime, &_Hough2D, &(_recHitVec[i]) );
571 _recHitVec[i].setnsol(stat);
572 if( stat==0 ) _recHitVec[i].setflag(-999);
575 _recHitVec[i].setAmb(-999);
577 if( _recHitVec[i].getLayerId()<8 ) n_zs++;
589 _z0_zs=zsfit.
getZ0();
590 t_pro_correct = zsfit.
getPro();
595 int size=_recHitVec.size();
596 int n0,
n1,
n2,n3,n4,n5,n6;
597 n0=
n1=
n2=n3=n4=n5=n6=0;
598 for(
int i=0;i<size;i++){
599 int cir= _recHitVec[i].getCirList();
600 int index = _recHitVec[i].digi()->getTrackIndex();
601 int style= _recHitVec[i].getStyle();
603 if( style == 1 )
n1++;
604 if( style == 2 )
n2++;
605 if( index < 0 ) n3++;
606 if( index >=0 && cir<=1 && style==0) n4++;
607 if( index <0 || cir>1 ) n5++;
608 if( index >=0 && cir==0 && style==0) n6++;
610 if( select == 0 )
return n0;
611 if( select == 1 )
return n1;
612 if( select == 2 )
return n2;
613 if( select == 3 )
return n3;
614 if( select == 4 )
return n4;
615 if( select == 5 )
return n5;
616 if( select == 6 )
return n6;
619 int size=_recHitVec.size();
620 int n0,
n1,
n2,n3,n4,n5,n6;
621 n0=
n1=
n2=n3=n4=n5=n6=0;
622 for(
int i=0;i<size;i++){
623 int cir= _recHitVec[i].getCirList();
624 int index = _recHitVec[i].digi()->getTrackIndex();
625 int type = _recHitVec[i].getSlayerType();
626 int style= _recHitVec[i].getStyle();
628 if( type==0 && style == 1 )
n1++;
629 if( type==0 && style == 2 )
n2++;
630 if( type==0 && index < 0 ) n3++;
631 if( type==0 && index >=0 && cir<=1 && style==0 ) n4++;
632 if( type==0 && (index <0 || cir>1) ) n5++;
633 if( type==0 && index >=0 && cir==0 && style==0 ) n6++;
635 if( select == 0 )
return n0;
636 if( select == 1 )
return n1;
637 if( select == 2 )
return n2;
638 if( select == 3 )
return n3;
639 if( select == 4 )
return n4;
640 if( select == 5 )
return n5;
641 if( select == 6 )
return n6;
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 int cir= _recHitVec[i].getCirList();
649 int index = _recHitVec[i].digi()->getTrackIndex();
650 int type = _recHitVec[i].getSlayerType();
651 int style= _recHitVec[i].getStyle();
653 if( type!=0 && style == 1 )
n1++;
654 if( type!=0 && style == 2 )
n2++;
655 if( type!=0 && index < 0 ) n3++;
656 if( type!=0 && index >=0 && cir<=1 && style==0) n4++;
657 if( type!=0 && (index <0 || cir>1) ) n5++;
658 if( type!=0 && index >=0 && cir==0 && style==0) n6++;
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;
674 vector<int> vec_layer;
675 for(
int i =0;i<_recHitVec.size();i++){
676 int layer = _recHitVec[i].getLayerId();
677 int slant= _recHitVec[i].getSlayerType();
678 if( 0==slant ) axialHit++;
683 if ( axialHit <5 )
return 0;
698 vector<HoughRecHit> vec_rec;
700 for(
int ihit=0;ihit<_houghList.size();ihit++){
701 const HoughHit hit= _houghList[ihit];
703 if ( hit.
driftTime(_bunchTime,0)>800 )
continue;
706 std::pair<double,double> theta_l = calcuArcTrack( p_hit );
707 double dist=calcuDistToTrack( p_hit );
708 double distToCir=calcuDistToCir( p_hit );
709 int flag = judge_half( p_hit );
713 if(layer<8) disCut=4;
717 if(
m_debug >0 )cout<<
"("<<layer<<
","<<wire<<
") "<<
" rec hit dist theta "<<dist<<
" "<< theta_l.first<<endl;
718 if( fabs(dist) < disCut ) {
725 if( p_hit.
getflag()!=0 )
continue;
726 _recHitVec.push_back(p_hit);
734 for(
int ilay=0;ilay<43;ilay++){
736 if ((ilay>=0&&ilay<=7)||(ilay>=20&&ilay<=35))
continue;
738 double disToCir=9999;
742 for(
int ihit=0;ihit<_recHitVec.size();ihit++){
743 if( _recHitVec[ihit].getLayerId()==ilay && _recHitVec[ihit].getflag()==0 ) {
745 if( (fabs(_recHitVec[ihit].getDisToCir())<disToCir) ) {
746 disToCir= fabs(_recHitVec[ihit].getDisToCir());
max=ihit;
751 if(
m_debug >0 ) cout<<
"ilay count count_cut "<<ilay<<
" "<<
count<<
" "<<count_cut<<endl;
752 if( count_cut !=0 &&
count>1 ) _recHitVec[
max].setflag(-999);
753 if(
m_debug >0 && count_cut!=0 &&
count>1) cout<<
"delete ("<<_recHitVec[
max].getLayerId()<<
","<<_recHitVec[
max].getWireId()<<
")"<<endl;
756 for(
int ihit=0;ihit<_recHitVec.size();ihit++){
757 if(_recHitVec[ihit].getSlayerType()==0 && _recHitVec[ihit].getflag()==0 ) size_of_axial++;
759 return size_of_axial;
765 for(
int ilay=0;ilay<8;ilay++){
772 for(
int ihit=0;ihit<_recHitVec.size();ihit++){
773 if( _recHitVec[ihit].getLayerId()==ilay && _recHitVec[ihit].getflag()==0) {
775 if( ((fabs(_recHitVec[ihit].getzAmb(0))>z_0) && (fabs(_recHitVec[ihit].getzAmb(1)) > z_1)) ) {
776 if( z_0!=0 && z_1!=0 ) count_cut++;
777 z_0= fabs(_recHitVec[ihit].getzAmb(0));z_1= fabs(_recHitVec[ihit].getzAmb(1)) ;
min=ihit;
779 else if( ((fabs(_recHitVec[ihit].getzAmb(0))<z_0) && (fabs(_recHitVec[ihit].getzAmb(1)) < z_1)) ) {
784 if(
m_debug >0 ) cout<<
"ilay count count_cut "<<ilay<<
" "<<
count<<
" "<<count_cut<<endl;
785 if( count_cut>0 &&
count>1 ) _recHitVec[
min].setflag(-999);
786 if(
m_debug >0 && count_cut>0 &&
count>1) cout<<
"delete ("<<_recHitVec[
min].getLayerId()<<
","<<_recHitVec[
min].getWireId()<<
")"<<endl;
789 for(
int ihit=0;ihit<_recHitVec.size();ihit++){
790 if(_recHitVec[ihit].getSlayerType()!=0 && _recHitVec[ihit].getflag()==0 ) size_of_stereo++;
792 return size_of_stereo;
796 cout<<
"print rec hit"<<endl;
797 double rho = _centerPeak.
getRho();
798 double theta= _centerPeak.
getTheta();
799 int size=_recHitVec.size();
800 for(
int i=0;i<size;i++){
801 int layer= _recHitVec[i].getLayerId();
802 int wire = _recHitVec[i].getWireId();
803 int slant= _recHitVec[i].getSlayerType();
804 int flag= _recHitVec[i].getflag();
805 int style= _recHitVec[i].getStyle();
806 int cirlist= _recHitVec[i].getCirList();
807 if( slant ==0 ) std::cout<<
"axial hit ("<<layer<<
","<<wire<<
") "<<_recHitVec[i].getDisToTrack()<<
" "<<_recHitVec[i].getDisToCir()<<
" "<<
flag<<
" "<<style<<
" "<<cirlist<<std::endl;
809 for(
int i=0;i<size;i++){
810 int layer= _recHitVec[i].getLayerId();
811 int wire = _recHitVec[i].getWireId();
812 int slant= _recHitVec[i].getSlayerType();
813 int flag= _recHitVec[i].getflag();
814 int style= _recHitVec[i].getStyle();
815 int cirlist= _recHitVec[i].getCirList();
816 if( slant !=0 ) std::cout<<
"stereo hit ("<<layer<<
","<<wire<<
") "<<_recHitVec[i].getDisToTrack()<<
" "<<
flag<<
" "<<style<<
" "<<cirlist<<std::endl;
823 for(
int ihit=0;ihit<_recHitVec.size();ihit++){
824 double xhit =_recHitVec[ihit].getMidX();
825 double yhit =_recHitVec[ihit].getMidY();
826 double x_cir=_Hough2D.
getCirX();
827 double y_cir=_Hough2D.
getCirY();
828 double r_cir=_Hough2D.
getCirR();
829 if( (x_cir*yhit - y_cir*xhit >=0) ) n_neg++;
830 if( (x_cir*yhit - y_cir*xhit <=0) ) n_pos++;
832 if(
m_debug >0 ) cout<<
" in track charge 2d "<<n_neg<<
" "<<n_pos<<endl;
833 if( (_charge==-1&&n_neg<3) || (_charge==1&&n_pos<3) )
return 0;
834 else if( _charge ==0 ) cout<<
" wrong ! in track charge 2D not set charge "<<endl;
841 for(
int ihit=0;ihit<_recHitVec.size();ihit++){
842 if(_recHitVec[ihit].getSlayerType()==0 )
continue;
843 if(_recHitVec[ihit].getLayerId()>7 )
continue;
844 double xhit =_recHitVec[ihit].getMidX();
845 double yhit =_recHitVec[ihit].getMidY();
846 double x_cir=_Hough2D.
getCirX();
847 double y_cir=_Hough2D.
getCirY();
848 double r_cir=_Hough2D.
getCirR();
849 if( (x_cir*yhit - y_cir*xhit >=0) ) n_neg++;
850 if( (x_cir*yhit - y_cir*xhit <=0) ) n_pos++;
852 if(
m_debug >0 ) cout<<
" in track charge 3d "<<n_neg<<
" "<<n_pos<<endl;
853 if( (_charge==-1&&n_neg<2) || (_charge==1&&n_pos<2) )
return 0;
854 else if( _charge ==0 ) cout<<
" wrong ! in track charge 3D not set charge "<<endl;
860 double *
x=
new double[N];
861 double *
y=
new double[N];
862 for(
int i=0;i<N;i++){
867 TF1 *fpol1=
new TF1(
"fpol1",
"pol1",-50,50);
868 TGraph *tg=
new TGraph(N,
x,
y);
869 tg->Fit(
"fpol1",
"QN");
870 double ktemp =fpol1->GetParameter(1);
871 double btemp =fpol1->GetParameter(0);
881 double k,
b,theta,rho,x_cross,y_cross;
882 vector<double> vtemp,utemp;
883 std::vector<HoughRecHit>::iterator
iter = _recHitVec.begin();
884 for(
int iHit=0;
iter!= _recHitVec.end();
iter++,iHit++){
896 x_cross = -
b/(k+1/k);
898 rho=sqrt(x_cross*x_cross+y_cross*y_cross);
899 theta=atan2(y_cross,x_cross);
902 std::vector<HoughRecHit>::iterator iter0= _recHitVec.begin();
903 for(; iter0!= _recHitVec.end(); iter0++){
908 double cirx_hit = hit->
getMidX();
909 double ciry_hit = hit->
getMidY();
911 double l1l2 = sqrt( (cirx_hit-_centerX)*(cirx_hit-_centerX)+(ciry_hit-_centerY)*(ciry_hit-_centerY) );
913 if( l1l2>_centerR ) deltaD = l1l2-_centerR-cirr_hit;
914 if( l1l2<=_centerR ) deltaD = l1l2-_centerR+cirr_hit;
920 if(_centerX==0||cirx_hit-_centerX==0){
924 theta_temp=
M_PI-atan2(ciry_hit-_centerY,cirx_hit-_centerX)+atan2(_centerY,_centerX);
925 if(theta_temp>2*
M_PI){
926 theta_temp=theta_temp-2*
M_PI;
929 theta_temp=theta_temp+2*
M_PI;
934 l_temp=_centerR*theta_temp;
937 theta_temp=2*
M_PI-theta_temp;
938 l_temp=_centerR*(theta_temp);
953 for(
int ihit=0;ihit<_houghList.size();ihit++){
954 const HoughHit hit= _houghList[ihit];
955 if ( hit.
driftTime(_bunchTime,0)>1000 )
continue;
959 std::pair<double,double> theta_l = calcuArcTrack( p_hit );
960 double dist=calcuDistToTrack( p_hit );
961 double distToCir=calcuDistToCir( p_hit );
962 int flag = judge_half( p_hit );
967 if( slayer == 0 ) disCut = 6;
969 if(layer<8) disCut=6;
972 if(
m_debug >0 )cout<<
"("<<layer<<
","<<wire<<
") "<<
" pair dist flag "<<dist<<
" "<<
flag<<endl;
973 if( fabs(dist) < disCut ) {
974 if(
flag !=1 )
continue;
975 if ( layer<4) nster1++;
976 else if ( layer<8) nster2++;
977 else if ( layer<12) naxial1++;
978 else if ( layer<16) naxial2++;
979 else if ( layer<20) naxial3++;
984 cout <<
"naxial_1 "<<naxial1<<endl;
985 cout <<
"naxial_2 "<<naxial2<<endl;
986 cout <<
"naxial_3 "<<naxial3<<endl;
987 cout <<
"stereo_1 "<<nster1<<endl;
988 cout <<
"stereo_2 "<<nster2<<endl;
989 cout <<
"stereo_3 "<<nster3<<endl;
991 if (nster1>=2 && nster2>=2 && nster3>=2 && naxial1>=2 && naxial2>=2 && naxial3>=2 )
return 1;
995 cout<<
"print HoughTrack : "<<p_trk->
id()<<endl;
996 cout<<
"par : "<<_d0<<
","<<_omega<<
","<<_phi0<<
","<<_z0<<
","<<_tanl<<
", pt: "<<_pt3D<<endl;
999 int lay=((
MdcHit*)(hotIter->hit()))->layernumber();
1000 int wir=((
MdcHit*)(hotIter->hit()))->wirenumber();
1002 cout <<
"(" <<((
MdcHit*)(hotIter->hit()))->layernumber()
1003 <<
","<<((
MdcHit*)(hotIter->hit()))->wirenumber()
1004 <<
":"<<hotIter->isActive()<<
") ";
1005 cout <<
"nuse "<<hotIter->hit()->nUsedHits()<<endl;
double sin(const BesAngle a)
double cos(const BesAngle a)
DOUBLE_PRECISION count[3]
std::vector< HoughRecHit > recHitCol
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
double getChi2_2D() const
void setPhi0(double phi0)
void setCirX(double cirx)
void setCirY(double ciry)
void setCirR(double cirr)
void setCharge(int charge)
void setRecHit(const recHitCol &rechit)
void setOmega(double omega)
TrkRecoTrk * getTrk() const
void setRecHit(const recHitCol &rechit)
TrkRecoTrk * getTrk() const
const MdcDigi * digi() const
void setFltLen(double flt)
int getSlayerType() const
double getDriftDist() const
void setRet(std::pair< double, double > theta_l)
void setPtr2D(Hough2D *p_hough2D)
void setDisToCir(double dis)
void setDisToTrack(double dis)
int getHitNumS(int) const
int getHitNumA(int) const
int fit2D(double bunchtime)
void Leastfit(vector< double >, vector< double >, double &, double &)
HoughTrack & add(const HoughTrack &other)
HoughTrack & operator=(const HoughTrack &other)
int getTrackIndex() const
const TrkHotList & hotList() const
hot_iterator begin() const