400 |
return (last_plane-first_plane+1); |
return (last_plane-first_plane+1); |
401 |
} |
} |
402 |
/** |
/** |
403 |
|
* Returns the track "lever-arm" on the x+y view, defined as the distance (in planes) between |
404 |
|
* the upper and lower x,y (couple) measurements (the maximum value of lever-arm is 6). |
405 |
|
*/ |
406 |
|
Int_t TrkTrack::GetLeverArmXY(){ |
407 |
|
int first_plane = -1; |
408 |
|
int last_plane = -1; |
409 |
|
for(Int_t ip=0; ip<6; ip++){ |
410 |
|
if( XGood(ip)*YGood(ip) && first_plane == -1 )first_plane = ip; |
411 |
|
if( XGood(ip)*YGood(ip) && first_plane != -1 )last_plane = ip; |
412 |
|
} |
413 |
|
if( first_plane == -1 || last_plane == -1){ |
414 |
|
cout<< "Int_t TrkTrack::GetLeverArmXY() -- XGood(ip)*YGood(ip) always false ??? "<<endl; |
415 |
|
return 0; |
416 |
|
} |
417 |
|
return (last_plane-first_plane+1); |
418 |
|
} |
419 |
|
/** |
420 |
* Returns the reduced chi-square of track x-projection |
* Returns the reduced chi-square of track x-projection |
421 |
*/ |
*/ |
422 |
Float_t TrkTrack::GetChi2X(){ |
Float_t TrkTrack::GetChi2X(){ |
627 |
4.52043, |
4.52043, |
628 |
4.29926}; |
4.29926}; |
629 |
int index; |
int index; |
630 |
float fact; |
float fact=0.; |
631 |
for(int i=0; i<6; i++) { |
for(int i=0; i<6; i++) { |
632 |
index = int((fabs(axv[i])+1.)/2.); |
index = int((fabs(axv[i])+1.)/2.); |
633 |
if(index>10) index=10; |
if(index>10) index=10; |
741 |
if( XGood(i) && !YGood(i) ){ |
if( XGood(i) && !YGood(i) ){ |
742 |
track.xm_a[i] = xm[i] - omega * segment; |
track.xm_a[i] = xm[i] - omega * segment; |
743 |
track.ym_a[i] = ym[i] + segment; |
track.ym_a[i] = ym[i] + segment; |
744 |
track.zm_a[i] = zm[i] + beta * segment; |
// track.zm_a[i] = zm[i] + beta * segment;//not used yet |
745 |
track.xm_b[i] = xm[i] + omega * segment; |
track.xm_b[i] = xm[i] + omega * segment; |
746 |
track.ym_b[i] = ym[i] - segment; |
track.ym_b[i] = ym[i] - segment; |
747 |
track.zm_b[i] = zm[i] - beta * segment; |
// track.zm_b[i] = zm[i] - beta * segment;//not used yet |
748 |
}else if( !XGood(i) && YGood(i) ){ |
}else if( !XGood(i) && YGood(i) ){ |
749 |
track.xm_a[i] = xm[i] + segment; |
track.xm_a[i] = xm[i] + segment; |
750 |
track.ym_a[i] = ym[i] + omega * segment; |
track.ym_a[i] = ym[i] + omega * segment; |
751 |
track.zm_a[i] = zm[i] - gamma * segment; |
// track.zm_a[i] = zm[i] - gamma * segment;//not used yet |
752 |
track.xm_b[i] = xm[i] - segment; |
track.xm_b[i] = xm[i] - segment; |
753 |
track.ym_b[i] = ym[i] - omega * segment; |
track.ym_b[i] = ym[i] - omega * segment; |
754 |
track.zm_b[i] = zm[i] + gamma * segment; |
// track.zm_b[i] = zm[i] + gamma * segment;//not used yet |
755 |
} |
} |
756 |
} |
} |
757 |
|
|
1276 |
|
|
1277 |
}; |
}; |
1278 |
/** |
/** |
1279 |
* \brief Give the average spatial residual |
* \brief Give the anerage spatial residual |
1280 |
*/ |
*/ |
1281 |
Float_t TrkTrack::GetResidual_av(int ip, int iv){ |
Float_t TrkTrack::GetResidual_av(int ip, int iv){ |
1282 |
// |
// |
1848 |
|
|
1849 |
if(!Track)return 0; |
if(!Track)return 0; |
1850 |
|
|
1851 |
TRefArray *sorted = new TRefArray(); |
// TRefArray *sorted = new TRefArray(); |
1852 |
|
TRefArray *sorted = NULL; |
1853 |
|
|
1854 |
TClonesArray &t = *Track; |
TClonesArray &t = *Track; |
1855 |
// TClonesArray &ts = *PhysicalTrack; |
// TClonesArray &ts = *PhysicalTrack; |
1887 |
|
|
1888 |
// cout << "i** "<< ((TrkTrack *)t[indi])->image << " " << nfiti <<" "<<chi2i<<endl; |
// cout << "i** "<< ((TrkTrack *)t[indi])->image << " " << nfiti <<" "<<chi2i<<endl; |
1889 |
}; |
}; |
1890 |
|
if(!sorted)sorted = new TRefArray( TProcessID::GetProcessWithUID(t[indi])); |
1891 |
sorted->Add( (TrkTrack*)t[indi] ); |
sorted->Add( (TrkTrack*)t[indi] ); |
1892 |
|
|
1893 |
m[indi] = 0; |
m[indi] = 0; |