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