| 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*); |
void gufld_(float*, float*); |
| 18 |
|
float risxeta2_(float *); |
| 19 |
|
float risxeta3_(float *); |
| 20 |
|
float risxeta4_(float *); |
| 21 |
|
float risyeta2_(float *); |
| 22 |
} |
} |
| 23 |
|
|
| 24 |
//-------------------------------------- |
//-------------------------------------- |
| 60 |
// clx = TRefArray(6,0); |
// clx = TRefArray(6,0); |
| 61 |
// cly = TRefArray(6,0); |
// cly = TRefArray(6,0); |
| 62 |
|
|
| 63 |
|
TrkParams::SetTrackingMode(); |
| 64 |
|
TrkParams::SetPrecisionFactor(); |
| 65 |
|
TrkParams::SetStepMin(); |
| 66 |
|
TrkParams::SetPFA(); |
| 67 |
|
|
| 68 |
}; |
}; |
| 69 |
//-------------------------------------- |
//-------------------------------------- |
| 70 |
// |
// |
| 104 |
// clx = TRefArray(t.clx); |
// clx = TRefArray(t.clx); |
| 105 |
// cly = TRefArray(t.cly); |
// cly = TRefArray(t.cly); |
| 106 |
|
|
| 107 |
|
TrkParams::SetTrackingMode(); |
| 108 |
|
TrkParams::SetPrecisionFactor(); |
| 109 |
|
TrkParams::SetStepMin(); |
| 110 |
|
TrkParams::SetPFA(); |
| 111 |
|
|
| 112 |
}; |
}; |
| 113 |
//-------------------------------------- |
//-------------------------------------- |
| 114 |
// |
// |
| 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 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 |
* Set the TrkTrack good measurement |
| 496 |
*/ |
*/ |
| 497 |
void TrkTrack::SetGood(int *xg, int *yg){ |
void TrkTrack::SetGood(int *xg, int *yg){ |
| 498 |
// NB! si perdera` l'informazione sul numero del cluster |
|
| 499 |
for(int i=0; i<6; i++) xgood[i]=*xg++; |
for(int i=0; i<6; i++) xgood[i]=*xg++; |
| 500 |
for(int i=0; i<6; i++) ygood[i]=*yg++; |
for(int i=0; i<6; i++) ygood[i]=*yg++; |
| 501 |
} |
} |
| 510 |
// path_.error = 0; |
// path_.error = 0; |
| 511 |
// readb_(); |
// readb_(); |
| 512 |
|
|
| 513 |
|
TrkParams::SetTrackingMode(); |
| 514 |
|
TrkParams::SetPrecisionFactor(); |
| 515 |
|
TrkParams::SetStepMin(); |
| 516 |
|
|
| 517 |
TrkParams::Set(path,1); |
TrkParams::Set(path,1); |
| 518 |
TrkParams::Load(1); |
TrkParams::Load(1); |
| 519 |
|
|
| 527 |
|
|
| 528 |
for(int i=0; i<6; i++){ |
for(int i=0; i<6; i++){ |
| 529 |
|
|
| 530 |
// track.xgood[i]=xgood[i]; |
// cout << i<<" - "<<xgood[i]<<" "<<XGood(i)<<endl; |
| 531 |
// track.ygood[i]=ygood[i]; |
// cout << i<<" - "<<ygood[i]<<" "<<YGood(i)<<endl; |
| 532 |
track.xgood[i]=XGood(i); |
track.xgood[i]=XGood(i); |
| 533 |
track.ygood[i]=YGood(i); |
track.ygood[i]=YGood(i); |
| 534 |
|
|
| 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]; |
| 587 |
|
|
| 588 |
} |
} |
| 589 |
/** |
/** |
| 590 |
* Tracking method. It calls F77 mini routine. |
* \brief Method to re-evaluate coordinates of clusters associated with a track. |
| 591 |
|
* |
| 592 |
|
* The method can be applied only after recovering level1 information |
| 593 |
|
* (either by reprocessing single events from level0 or from |
| 594 |
|
* the TrkLevel1 branch, if present); it calls F77 subroutines that |
| 595 |
|
* read the level1 common and fill the minimization-routine common. |
| 596 |
|
* Some clusters can be excluded or added by means of the methods: |
| 597 |
|
* |
| 598 |
|
* TrkTrack::ResetXGood(int ip) |
| 599 |
|
* TrkTrack::ResetYGood(int ip) |
| 600 |
|
* TrkTrack::SetXGood(int ip, int cid, int is) |
| 601 |
|
* TrkTrack::SetYGood(int ip, int cid, int is) |
| 602 |
|
* |
| 603 |
|
* NB! The method TrkTrack::SetGood(int *xg, int *yg) set the plane-mask (0-1) |
| 604 |
|
* for the minimization-routine common. It deletes the cluster information |
| 605 |
|
* (at least for the moment...) thus cannot be applied before |
| 606 |
|
* TrkTrack::EvaluateClusterPositions(). |
| 607 |
|
* |
| 608 |
|
* Different p.f.a. can be applied by calling (once) the method: |
| 609 |
|
* |
| 610 |
|
* TrkParams::SetPFA(0); //Set ETA p.f.a. |
| 611 |
|
* |
| 612 |
|
* @see TrkParams::SetPFA(int) |
| 613 |
*/ |
*/ |
| 614 |
void TrkTrack::Fit(double pfixed, int& fail, int iprint){ |
void TrkTrack::EvaluateClusterPositions(){ |
| 615 |
|
|
| 616 |
|
// cout << "void TrkTrack::GetClusterPositions() "<<endl; |
| 617 |
|
|
| 618 |
|
TrkParams::Load( ); |
| 619 |
|
if( !TrkParams::IsLoaded() )return; |
| 620 |
|
|
| 621 |
|
for(int ip=0; ip<6; ip++){ |
| 622 |
|
// cout << ip<<" ** "<<xm[ip]<<" / "<<ym[ip]<<endl;; |
| 623 |
|
int icx = GetClusterX_ID(ip)+1; |
| 624 |
|
int icy = GetClusterY_ID(ip)+1; |
| 625 |
|
int sensor = GetSensor(ip)+1;//<< convenzione "Paolo" |
| 626 |
|
if(ip==5 && sensor!=0)sensor=3-sensor;//<< convenzione "Elena" |
| 627 |
|
int ladder = GetLadder(ip)+1; |
| 628 |
|
float ax = axv[ip]; |
| 629 |
|
float ay = ayv[ip]; |
| 630 |
|
float v[3]; |
| 631 |
|
v[0]=xv[ip]; |
| 632 |
|
v[1]=yv[ip]; |
| 633 |
|
v[2]=zv[ip]; |
| 634 |
|
float bfx = 10*TrkParams::GetBX(v);//Tesla |
| 635 |
|
float bfy = 10*TrkParams::GetBY(v);//Tesla |
| 636 |
|
int ipp=ip+1; |
| 637 |
|
xyzpam_(&ipp,&icx,&icy,&ladder,&sensor,&ax,&ay,&bfx,&bfy); |
| 638 |
|
} |
| 639 |
|
} |
| 640 |
|
/** |
| 641 |
|
* \brief Tracking method. It calls F77 mini routine. |
| 642 |
|
* |
| 643 |
|
* @param pfixed Particle momentum. If pfixed=0 the momentum |
| 644 |
|
* is left as a free parameter, otherwise it is fixed to the input value. |
| 645 |
|
* @param fail Output flag (!=0 if the fit failed). |
| 646 |
|
* @param iprint Flag to set debug mode ( 0 = no output; 1 = verbose; 2 = debug). |
| 647 |
|
* @param froml1 Flag to re-evaluate positions (see TrkTrack::GetClusterPositions()). |
| 648 |
|
* |
| 649 |
|
* The option to re-evaluate positions can be used only after recovering |
| 650 |
|
* level1 information, eg. by reprocessing the single event. |
| 651 |
|
* |
| 652 |
|
* Example: |
| 653 |
|
* |
| 654 |
|
* if( !event->GetTrkLevel0() )return false; |
| 655 |
|
* event->GetTrkLevel0()->ProcessEvent(); // re-processing level0->level1 |
| 656 |
|
* int fail=0; |
| 657 |
|
* event->GetTrkLevel2()->GetTrack(0)->Fit(0.,fail,0,1); |
| 658 |
|
* |
| 659 |
|
* @see EvaluateClusterPositions() |
| 660 |
|
* |
| 661 |
|
* The fitting procedure can be varied by changing the tracking mode, |
| 662 |
|
* the fit-precision factor and the minimum number of step. |
| 663 |
|
* @see SetTrackingMode(int) |
| 664 |
|
* @see SetPrecisionFactor(double) |
| 665 |
|
* @see SetStepMin(int) |
| 666 |
|
*/ |
| 667 |
|
void TrkTrack::Fit(double pfixed, int& fail, int iprint, int froml1){ |
| 668 |
|
|
| 669 |
float al_ini[] = {0.,0.,0.,0.,0.}; |
float al_ini[] = {0.,0.,0.,0.,0.}; |
| 670 |
|
|
| 671 |
|
TrkParams::Load( ); |
| 672 |
|
if( !TrkParams::IsLoaded() )return; |
| 673 |
|
|
| 674 |
extern cMini2track track_; |
extern cMini2track track_; |
| 675 |
fail = 0; |
fail = 0; |
| 676 |
FillMiniStruct(track_); |
FillMiniStruct(track_); |
| 677 |
|
|
| 678 |
|
if(froml1!=0)EvaluateClusterPositions(); |
| 679 |
|
|
| 680 |
// if fit variables have been reset, evaluate the initial guess |
// if fit variables have been reset, evaluate the initial guess |
| 681 |
if(al[0]==-9999.&&al[1]==-9999.&&al[2]==-9999.&&al[3]==-9999.&&al[4]==-9999.)guess_(); |
if(al[0]==-9999.&&al[1]==-9999.&&al[2]==-9999.&&al[3]==-9999.&&al[4]==-9999.)guess_(); |
| 682 |
|
|
| 695 |
|
|
| 696 |
// ------------------------------------------ |
// ------------------------------------------ |
| 697 |
// call mini routine |
// call mini routine |
| 698 |
TrkParams::Load(1); |
// TrkParams::Load(1); |
| 699 |
if( !TrkParams::IsLoaded(1) ){ |
// if( !TrkParams::IsLoaded(1) ){ |
| 700 |
cout << "void TrkTrack::Fit(double pfixed, int& fail, int iprint) --- ERROR --- m.field not loaded"<<endl; |
// cout << "void TrkTrack::Fit(double pfixed, int& fail, int iprint) --- ERROR --- m.field not loaded"<<endl; |
| 701 |
return; |
// return; |
| 702 |
} |
// } |
| 703 |
int istep=0; |
int istep=0; |
| 704 |
int ifail=0; |
int ifail=0; |
| 705 |
mini2_(&istep,&ifail, &iprint); |
mini2_(&istep,&ifail, &iprint); |
| 710 |
// ------------------------------------------ |
// ------------------------------------------ |
| 711 |
|
|
| 712 |
SetFromMiniStruct(&track_); |
SetFromMiniStruct(&track_); |
|
// cout << endl << "eta ===> " << track_.al[4] << endl; |
|
|
|
|
|
// for(int i=0; i<5; i++) al[i]=track_.al[i]; |
|
|
// chi2=track_.chi2; |
|
|
// nstep=track_.nstep; |
|
|
// for(int i=0; i<6; i++) xv[i]=track_.xv[i]; |
|
|
// for(int i=0; i<6; i++) yv[i]=track_.yv[i]; |
|
|
// for(int i=0; i<6; i++) zv[i]=track_.zv[i]; |
|
|
// for(int i=0; i<6; i++) axv[i]=track_.axv[i]; |
|
|
// for(int i=0; i<6; i++) ayv[i]=track_.ayv[i]; |
|
|
// for(int i=0; i<5; i++) { |
|
|
// for(int j=0; j<5; j++) coval[i][j]=track_.cov[i][j]; |
|
|
// } |
|
| 713 |
|
|
| 714 |
if(fail){ |
if(fail){ |
| 715 |
if(iprint)cout << " >>>> fit failed >>>> drawing initial par"<<endl; |
if(iprint)cout << " >>>> fit failed "<<endl; |
| 716 |
for(int i=0; i<5; i++) al[i]=al_ini[i]; |
for(int i=0; i<5; i++) al[i]=al_ini[i]; |
| 717 |
} |
} |
| 718 |
|
|
| 719 |
}; |
}; |
| 720 |
/* |
/** |
| 721 |
* Reset the fit parameters |
* Reset the fit parameters |
| 722 |
*/ |
*/ |
| 723 |
void TrkTrack::FitReset(){ |
void TrkTrack::FitReset(){ |
| 724 |
for(int i=0; i<5; i++) al[i]=-9999.; |
for(int i=0; i<5; i++) al[i]=-9999.; |
| 725 |
chi2=0.; |
chi2=0.; |
| 726 |
nstep=0; |
nstep=0; |
| 727 |
for(int i=0; i<6; i++) xv[i]=0.; |
// for(int i=0; i<6; i++) xv[i]=0.; |
| 728 |
for(int i=0; i<6; i++) yv[i]=0.; |
// for(int i=0; i<6; i++) yv[i]=0.; |
| 729 |
for(int i=0; i<6; i++) zv[i]=0.; |
// for(int i=0; i<6; i++) zv[i]=0.; |
| 730 |
for(int i=0; i<6; i++) axv[i]=0.; |
// for(int i=0; i<6; i++) axv[i]=0.; |
| 731 |
for(int i=0; i<6; i++) ayv[i]=0.; |
// for(int i=0; i<6; i++) ayv[i]=0.; |
| 732 |
for(int i=0; i<5; i++) { |
for(int i=0; i<5; i++) { |
| 733 |
for(int j=0; j<5; j++) coval[i][j]=0.; |
for(int j=0; j<5; j++) coval[i][j]=0.; |
| 734 |
} |
} |
| 735 |
} |
} |
| 736 |
/* |
/** |
| 737 |
* Set the tracking mode |
* Set the tracking mode |
| 738 |
*/ |
*/ |
| 739 |
void TrkTrack::SetTrackingMode(int trackmode){ |
void TrkTrack::SetTrackingMode(int trackmode){ |
| 740 |
extern cMini2track track_; |
extern cMini2track track_; |
| 741 |
track_.trackmode = trackmode; |
track_.trackmode = trackmode; |
| 742 |
} |
} |
| 743 |
/* |
/** |
| 744 |
* Set the factor scale for tracking precision |
* Set the factor scale for tracking precision |
| 745 |
*/ |
*/ |
| 746 |
void TrkTrack::SetPrecisionFactor(double fact){ |
void TrkTrack::SetPrecisionFactor(double fact){ |
| 747 |
extern cMini2track track_; |
extern cMini2track track_; |
| 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_; |
| 756 |
} |
} |
| 757 |
|
|
| 758 |
|
|
| 759 |
/* |
/** |
| 760 |
* Method to retrieve ID (0,1,...) of x-cluster (if any) associated to this track. |
* Method to retrieve ID (0,1,...) of x-cluster (if any) associated to this track. |
| 761 |
* If no cluster is associated, ID=-1. |
* If no cluster is associated, ID=-1. |
| 762 |
* @param ip Tracker plane (0-5) |
* @param ip Tracker plane (0-5) |
| 764 |
Int_t TrkTrack::GetClusterX_ID(int ip){ |
Int_t TrkTrack::GetClusterX_ID(int ip){ |
| 765 |
return ((Int_t)fabs(xgood[ip]))%10000000-1; |
return ((Int_t)fabs(xgood[ip]))%10000000-1; |
| 766 |
}; |
}; |
| 767 |
/* |
/** |
| 768 |
* Method to retrieve ID (0-xxx) of y-cluster (if any) associated to this track. |
* Method to retrieve ID (0-xxx) of y-cluster (if any) associated to this track. |
| 769 |
* If no cluster is associated, ID=-1. |
* If no cluster is associated, ID=-1. |
| 770 |
* @param ip Tracker plane (0-5) |
* @param ip Tracker plane (0-5) |
| 772 |
Int_t TrkTrack::GetClusterY_ID(int ip){ |
Int_t TrkTrack::GetClusterY_ID(int ip){ |
| 773 |
return ((Int_t)fabs(ygood[ip]))%10000000-1; |
return ((Int_t)fabs(ygood[ip]))%10000000-1; |
| 774 |
}; |
}; |
| 775 |
/* |
/** |
| 776 |
* Method to retrieve the ladder (0-4, increasing x) traversed by the track on this plane. |
* Method to retrieve the ladder (0-4, increasing x) traversed by the track on this plane. |
| 777 |
* If no ladder is traversed (dead area) the metod retuns -1. |
* If no ladder is traversed (dead area) the metod retuns -1. |
| 778 |
* @param ip Tracker plane (0-5) |
* @param ip Tracker plane (0-5) |
| 782 |
if(YGood(ip))return (Int_t)fabs(ygood[ip]/100000000)-1; |
if(YGood(ip))return (Int_t)fabs(ygood[ip]/100000000)-1; |
| 783 |
return -1; |
return -1; |
| 784 |
}; |
}; |
| 785 |
/* |
/** |
| 786 |
* Method to retrieve the sensor (0-1, increasing y) traversed by the track on this plane. |
* Method to retrieve the sensor (0-1, increasing y) traversed by the track on this plane. |
| 787 |
* If no sensor is traversed (dead area) the metod retuns -1. |
* If no sensor is traversed (dead area) the metod retuns -1. |
| 788 |
* @param ip Tracker plane (0-5) |
* @param ip Tracker plane (0-5) |
| 793 |
return -1; |
return -1; |
| 794 |
}; |
}; |
| 795 |
|
|
| 796 |
|
/** |
| 797 |
|
* \brief Method to include a x-cluster to the track. |
| 798 |
|
* @param ip Tracker plane (0-5) |
| 799 |
|
* @param clid Cluster ID (0,1,...) |
| 800 |
|
* @param is Sensor (0-1, increasing y) |
| 801 |
|
* @see Fit(double pfixed, int& fail, int iprint, int froml1) |
| 802 |
|
*/ |
| 803 |
|
void TrkTrack::SetXGood(int ip, int clid, int is){ |
| 804 |
|
int il=0; //ladder (temporary) |
| 805 |
|
bool bad=false; //ladder (temporary) |
| 806 |
|
xgood[ip]=il*100000000+is*10000000+clid; |
| 807 |
|
if(bad)xgood[ip]=-xgood[ip]; |
| 808 |
|
}; |
| 809 |
|
/** |
| 810 |
|
* \brief Method to include a y-cluster to the track. |
| 811 |
|
* @param ip Tracker plane (0-5) |
| 812 |
|
* @param clid Cluster ID (0,1,...) |
| 813 |
|
* @param is Sensor (0-1) |
| 814 |
|
* @see Fit(double pfixed, int& fail, int iprint, int froml1) |
| 815 |
|
*/ |
| 816 |
|
void TrkTrack::SetYGood(int ip, int clid, int is){ |
| 817 |
|
int il=0; //ladder (temporary) |
| 818 |
|
bool bad=false; //ladder (temporary) |
| 819 |
|
ygood[ip]=il*100000000+is*10000000+clid; |
| 820 |
|
if(bad)ygood[ip]=-ygood[ip]; |
| 821 |
|
}; |
| 822 |
|
|
| 823 |
//-------------------------------------- |
//-------------------------------------- |
| 824 |
// |
// |
| 1439 |
// path_.error = 0; |
// path_.error = 0; |
| 1440 |
// readb_(); |
// readb_(); |
| 1441 |
|
|
| 1442 |
|
TrkParams::SetTrackingMode(); |
| 1443 |
|
TrkParams::SetPrecisionFactor(); |
| 1444 |
|
TrkParams::SetStepMin(); |
| 1445 |
|
|
| 1446 |
TrkParams::Set(path,1); |
TrkParams::Set(path,1); |
| 1447 |
TrkParams::Load(1); |
TrkParams::Load(1); |
| 1448 |
|
|
| 1449 |
// |
// |
| 1450 |
}; |
}; |
| 1451 |
/** |
// /** |
| 1452 |
* Get BY (kGauss) |
// * Get BY (kGauss) |
| 1453 |
* @param v (x,y,z) coordinates in cm |
// * @param v (x,y,z) coordinates in cm |
| 1454 |
*/ |
// */ |
| 1455 |
float TrkLevel2::GetBX(float* v){ |
// float TrkLevel2::GetBX(float* v){ |
| 1456 |
float b[3]; |
// float b[3]; |
| 1457 |
gufld_(v,b); |
// gufld_(v,b); |
| 1458 |
return b[0]/10.; |
// return b[0]/10.; |
| 1459 |
} |
// } |
| 1460 |
/** |
// /** |
| 1461 |
* Get BY (kGauss) |
// * Get BY (kGauss) |
| 1462 |
* @param v (x,y,z) coordinates in cm |
// * @param v (x,y,z) coordinates in cm |
| 1463 |
*/ |
// */ |
| 1464 |
float TrkLevel2::GetBY(float* v){ |
// float TrkLevel2::GetBY(float* v){ |
| 1465 |
float b[3]; |
// float b[3]; |
| 1466 |
gufld_(v,b); |
// gufld_(v,b); |
| 1467 |
return b[1]/10.; |
// return b[1]/10.; |
| 1468 |
} |
// } |
| 1469 |
/** |
// /** |
| 1470 |
* Get BY (kGauss) |
// * Get BY (kGauss) |
| 1471 |
* @param v (x,y,z) coordinates in cm |
// * @param v (x,y,z) coordinates in cm |
| 1472 |
*/ |
// */ |
| 1473 |
float TrkLevel2::GetBZ(float* v){ |
// float TrkLevel2::GetBZ(float* v){ |
| 1474 |
float b[3]; |
// float b[3]; |
| 1475 |
gufld_(v,b); |
// gufld_(v,b); |
| 1476 |
return b[2]/10.; |
// return b[2]/10.; |
| 1477 |
} |
// } |
| 1478 |
//-------------------------------------- |
//-------------------------------------- |
| 1479 |
// |
// |
| 1480 |
// |
// |