| 190 |
Clear();//deallocate vectors |
Clear();//deallocate vectors |
| 191 |
cout << "SetDimension("<<t.GetNhit()<<")"<<endl; |
cout << "SetDimension("<<t.GetNhit()<<")"<<endl; |
| 192 |
SetDimension(t.GetNhit()); //allocate vectors |
SetDimension(t.GetNhit()); //allocate vectors |
| 193 |
|
// }else{ |
| 194 |
|
// SetDimension(6+index); |
| 195 |
} |
} |
| 196 |
// default fit settings (the same as TrkTrack) |
// default fit settings (the same as TrkTrack) |
| 197 |
SetMiniDefault(); |
SetMiniDefault(); |
| 818 |
}; |
}; |
| 819 |
|
|
| 820 |
/** |
/** |
| 821 |
|
* Method to retrieve the dE/dx measured on a tracker view. |
| 822 |
|
* @param ip plane (0-5) |
| 823 |
|
* @param iv view (0=x 1=y) |
| 824 |
|
*/ |
| 825 |
|
Float_t ExtTrack::GetDEDX(int ip, int iv){ |
| 826 |
|
if(iv==0 && ip>=0 && ip<6)return fabs(dedx_x[ip]); |
| 827 |
|
else if(iv==1 && ip>=0 && ip<6)return fabs(dedx_y[ip]); |
| 828 |
|
else { |
| 829 |
|
cout << "TrkTrack::GetDEDX(int ip, int iv) -- wrong input parameters "<<ip<<iv<<endl; |
| 830 |
|
return 0.; |
| 831 |
|
} |
| 832 |
|
} |
| 833 |
|
/** |
| 834 |
|
* Method to evaluate the dE/dx measured on a tracker plane. |
| 835 |
|
* The two measurements on x- and y-view are averaged. |
| 836 |
|
* @param ip plane (0-5) |
| 837 |
|
*/ |
| 838 |
|
Float_t ExtTrack::GetDEDX(int ip){ |
| 839 |
|
if( (Int_t)XGood(ip)+(Int_t)YGood(ip) == 0 ) return 0; |
| 840 |
|
return (GetDEDX(ip,0)+GetDEDX(ip,1))/((Int_t)XGood(ip)+(Int_t)YGood(ip)); |
| 841 |
|
}; |
| 842 |
|
|
| 843 |
|
/** |
| 844 |
|
* Method to evaluate the dE/dx averaged over all planes. |
| 845 |
|
*/ |
| 846 |
|
Float_t ExtTrack::GetDEDX(){ |
| 847 |
|
Float_t dedx=0; |
| 848 |
|
for(Int_t ip=0; ip<6; ip++)dedx+=GetDEDX(ip,0)*XGood(ip)+GetDEDX(ip,1)*YGood(ip); |
| 849 |
|
dedx = dedx/(GetNX()+GetNY()); |
| 850 |
|
return dedx; |
| 851 |
|
}; |
| 852 |
|
|
| 853 |
|
/** |
| 854 |
* Method to retrieve the ladder, if assigned |
* Method to retrieve the ladder, if assigned |
| 855 |
*/ |
*/ |
| 856 |
int ExtTrack::GetLadder(int ip){ |
int ExtTrack::GetLadder(int ip){ |
| 915 |
if(rig<0) rig=-rig; |
if(rig<0) rig=-rig; |
| 916 |
return rig; |
return rig; |
| 917 |
}; |
}; |
| 918 |
|
// |
| 919 |
|
Float_t ExtTrack::GetDeflection(){ |
| 920 |
|
Float_t def=0; |
| 921 |
|
if(chi2>0)def=al[4]; |
| 922 |
|
return def; |
| 923 |
|
}; |
| 924 |
ClassImp(ExtTrack); |
ClassImp(ExtTrack); |