921 |
if(chi2>0)def=al[4]; |
if(chi2>0)def=al[4]; |
922 |
return def; |
return def; |
923 |
}; |
}; |
924 |
|
|
925 |
|
|
926 |
|
// |
927 |
|
// all that follows: EM porting from TrkLevel2 |
928 |
|
// |
929 |
|
Bool_t ExtTrack::IsInsideAcceptance(float toll){ |
930 |
|
int ngf = TrkParams::nGF; |
931 |
|
for(int i=0; i<ngf; i++){ |
932 |
|
// |
933 |
|
// cout << endl << TrkParams::GF_element[i]; |
934 |
|
if( |
935 |
|
TrkParams::GF_element[i].CompareTo("S11") && |
936 |
|
TrkParams::GF_element[i].CompareTo("S12") && |
937 |
|
TrkParams::GF_element[i].CompareTo("S21") && |
938 |
|
TrkParams::GF_element[i].CompareTo("S22") && |
939 |
|
TrkParams::GF_element[i].CompareTo("T1") && |
940 |
|
TrkParams::GF_element[i].CompareTo("CUF") && |
941 |
|
TrkParams::GF_element[i].CompareTo("T2") && |
942 |
|
TrkParams::GF_element[i].CompareTo("T3") && |
943 |
|
TrkParams::GF_element[i].CompareTo("T4") && |
944 |
|
TrkParams::GF_element[i].CompareTo("T5") && |
945 |
|
TrkParams::GF_element[i].CompareTo("CLF") && |
946 |
|
TrkParams::GF_element[i].CompareTo("T6") && |
947 |
|
TrkParams::GF_element[i].CompareTo("S31") && |
948 |
|
TrkParams::GF_element[i].CompareTo("S32") && |
949 |
|
true)continue; |
950 |
|
// apply condition only within the cavity |
951 |
|
// cout << " -- "<<xGF[i]<<" "<<yGF[i]; |
952 |
|
if( |
953 |
|
xGF[i] <= TrkParams::xGF_min[i] + toll || |
954 |
|
xGF[i] >= TrkParams::xGF_max[i] - toll || |
955 |
|
yGF[i] <= TrkParams::yGF_min[i] + toll || |
956 |
|
yGF[i] >= TrkParams::yGF_max[i] - toll || |
957 |
|
false){ |
958 |
|
|
959 |
|
return false; |
960 |
|
} |
961 |
|
} |
962 |
|
return true; |
963 |
|
} |
964 |
|
|
965 |
|
/** |
966 |
|
* Returns the reduced chi-square of track x-projection |
967 |
|
*/ |
968 |
|
Float_t ExtTrack::GetChi2X(){ |
969 |
|
float chiq=0; |
970 |
|
for(int ip=0; ip<nplanes; ip++)if(XGood(ip))chiq+= pow((xv[ip]-xm[ip])/resx[ip],2.); |
971 |
|
if(GetNX()>3)chiq=chiq/(GetNX()-3); |
972 |
|
else chiq=0; |
973 |
|
if(chiq==0)cout << " Float_t ExtTrack::GetChi2X() -- WARNING -- value not defined "<<chiq<<endl; |
974 |
|
return chiq; |
975 |
|
} |
976 |
|
/** |
977 |
|
* Returns the reduced chi-square of track y-projection |
978 |
|
*/ |
979 |
|
Float_t ExtTrack::GetChi2Y(){ |
980 |
|
float chiq=0; |
981 |
|
for(int ip=0; ip<nplanes; ip++)if(YGood(ip))chiq+= pow((yv[ip]-ym[ip])/resy[ip],2.); |
982 |
|
if(GetNY()>2)chiq=chiq/(GetNY()-2); |
983 |
|
else chiq=0; |
984 |
|
if(chiq==0)cout << " Float_t ExtTrack::GetChi2Y() -- WARNING -- value not defined "<<chiq<<endl; |
985 |
|
return chiq; |
986 |
|
} |
987 |
|
|
988 |
ClassImp(ExtTrack); |
ClassImp(ExtTrack); |