| 12 |
extern "C" { |
extern "C" { |
| 13 |
void dotrack_(int*, double*, double*, double*, double*, int*); |
void dotrack_(int*, double*, double*, double*, double*, int*); |
| 14 |
void dotrack2_(int*, double*, double*, double*, double*,double*, double*, double*,int*); |
void dotrack2_(int*, double*, double*, double*, double*,double*, double*, double*,int*); |
| 15 |
void mini2_(int*,int*,int*); |
void mini2_(int*,int*,int*); |
| 16 |
void guess_(); |
void guess_(); |
| 17 |
|
void gufld_(float*, float*); |
| 18 |
|
float risxeta2_(float *); |
| 19 |
|
float risxeta3_(float *); |
| 20 |
|
float risxeta4_(float *); |
| 21 |
|
float risyeta2_(float *); |
| 22 |
} |
} |
| 23 |
|
|
| 24 |
//-------------------------------------- |
//-------------------------------------- |
| 386 |
cout << endl << "zv : "; for(int i=0; i<6; i++)cout << zv[i] << " "; |
cout << endl << "zv : "; for(int i=0; i<6; i++)cout << zv[i] << " "; |
| 387 |
cout << endl << "resx : "; for(int i=0; i<6; i++)cout << resx[i] << " "; |
cout << endl << "resx : "; for(int i=0; i<6; i++)cout << resx[i] << " "; |
| 388 |
cout << endl << "resy : "; for(int i=0; i<6; i++)cout << resy[i] << " "; |
cout << endl << "resy : "; for(int i=0; i<6; i++)cout << resy[i] << " "; |
| 389 |
|
cout << endl << "tailx : "; for(int i=0; i<6; i++)cout << tailx[i] << " "; |
| 390 |
|
cout << endl << "taily : "; for(int i=0; i<6; i++)cout << taily[i] << " "; |
| 391 |
cout << endl << "coval : "; for(int i=0; i<5; i++)cout << coval[0][i]<<" "; |
cout << endl << "coval : "; for(int i=0; i<5; i++)cout << coval[0][i]<<" "; |
| 392 |
cout << endl << " "; for(int i=0; i<5; i++)cout << coval[1][i]<<" "; |
cout << endl << " "; for(int i=0; i<5; i++)cout << coval[1][i]<<" "; |
| 393 |
cout << endl << " "; for(int i=0; i<5; i++)cout << coval[2][i]<<" "; |
cout << endl << " "; for(int i=0; i<5; i++)cout << coval[2][i]<<" "; |
| 413 |
for(int i=0; i<6; i++) resy[i]=*ry++; |
for(int i=0; i<6; i++) resy[i]=*ry++; |
| 414 |
} |
} |
| 415 |
/** |
/** |
| 416 |
* Set the TrkTrack good measurement. |
* Set the TrkTrack tails position resolution |
| 417 |
|
*/ |
| 418 |
|
void TrkTrack::SetTail(double *tx, double *ty, double factor){ |
| 419 |
|
for(int i=0; i<6; i++) tailx[i]=factor*(*tx++); |
| 420 |
|
for(int i=0; i<6; i++) taily[i]=factor*(*ty++); |
| 421 |
|
} |
| 422 |
|
/** |
| 423 |
|
* Set the TrkTrack Student parameter (resx,resy,tailx,taily) |
| 424 |
|
* from previous gausian fit |
| 425 |
|
*@param flag =0 standard, =1 with noise correction |
| 426 |
|
*/ |
| 427 |
|
void TrkTrack::SetStudentParam(int flag){ |
| 428 |
|
float sx[11]={0.000128242, |
| 429 |
|
0.000136942, |
| 430 |
|
0.000162718, |
| 431 |
|
0.000202644, |
| 432 |
|
0.00025597, |
| 433 |
|
0.000317456, |
| 434 |
|
0.000349048, |
| 435 |
|
0.000384638, |
| 436 |
|
0.000457295, |
| 437 |
|
0.000512319, |
| 438 |
|
0.000538573}; |
| 439 |
|
float tx[11]={1.79402, |
| 440 |
|
2.04876, |
| 441 |
|
2.88376, |
| 442 |
|
3.3, |
| 443 |
|
3.14084, |
| 444 |
|
4.07686, |
| 445 |
|
4.44736, |
| 446 |
|
3.5179, |
| 447 |
|
3.38697, |
| 448 |
|
3.45739, |
| 449 |
|
3.18627}; |
| 450 |
|
float sy[11]={0.000483075, |
| 451 |
|
0.000466925, |
| 452 |
|
0.000431658, |
| 453 |
|
0.000428317, |
| 454 |
|
0.000433854, |
| 455 |
|
0.000444044, |
| 456 |
|
0.000482098, |
| 457 |
|
0.000537579, |
| 458 |
|
0.000636279, |
| 459 |
|
0.000741998, |
| 460 |
|
0.000864261}; |
| 461 |
|
float ty[11]={0.997032, |
| 462 |
|
1.11147, |
| 463 |
|
1.18526, |
| 464 |
|
1.61404, |
| 465 |
|
2.21908, |
| 466 |
|
3.08959, |
| 467 |
|
4.48833, |
| 468 |
|
4.42687, |
| 469 |
|
4.65253, |
| 470 |
|
4.52043, |
| 471 |
|
4.29926}; |
| 472 |
|
int index; |
| 473 |
|
float fact; |
| 474 |
|
for(int i=0; i<6; i++) { |
| 475 |
|
index = int((fabs(axv[i])+1.)/2.); |
| 476 |
|
if(index>10) index=10; |
| 477 |
|
tailx[i]=tx[index]; |
| 478 |
|
if(flag==1) { |
| 479 |
|
if(fabs(axv[i])<=10.) fact = resx[i]/risxeta2_(&(axv[i])); |
| 480 |
|
if(fabs(axv[i])>10.&&fabs(axv[i])<=15.) fact = resx[i]/risxeta3_(&(axv[i])); |
| 481 |
|
if(fabs(axv[i])>15.) fact = resx[i]/risxeta4_(&(axv[i])); |
| 482 |
|
} else fact = 1.; |
| 483 |
|
resx[i] = sx[index]*fact; |
| 484 |
|
} |
| 485 |
|
for(int i=0; i<6; i++) { |
| 486 |
|
index = int((fabs(ayv[i])+1.)/2.); |
| 487 |
|
if(index>10) index=10; |
| 488 |
|
taily[i]=ty[index]; |
| 489 |
|
if(flag==1) fact = resy[i]/risyeta2_(&(ayv[i])); |
| 490 |
|
else fact = 1.; |
| 491 |
|
resy[i] = sy[index]*fact; |
| 492 |
|
} |
| 493 |
|
} |
| 494 |
|
/** |
| 495 |
|
* Set the TrkTrack good measurement |
| 496 |
*/ |
*/ |
| 497 |
void TrkTrack::SetGood(int *xg, int *yg){ |
void TrkTrack::SetGood(int *xg, int *yg){ |
| 498 |
|
|
| 554 |
|
|
| 555 |
track.resx[i]=resx[i]; |
track.resx[i]=resx[i]; |
| 556 |
track.resy[i]=resy[i]; |
track.resy[i]=resy[i]; |
| 557 |
|
track.tailx[i]=tailx[i]; |
| 558 |
|
track.taily[i]=taily[i]; |
| 559 |
} |
} |
| 560 |
|
|
| 561 |
for(int i=0; i<5; i++) track.al[i]=al[i]; |
for(int i=0; i<5; i++) track.al[i]=al[i]; |
| 748 |
track_.fact = fact; |
track_.fact = fact; |
| 749 |
} |
} |
| 750 |
/** |
/** |
| 751 |
* Set the factor scale for tracking precision |
* Set the minimum number of steps for tracking precision |
| 752 |
*/ |
*/ |
| 753 |
void TrkTrack::SetStepMin(int istepmin){ |
void TrkTrack::SetStepMin(int istepmin){ |
| 754 |
extern cMini2track track_; |
extern cMini2track track_; |