Int_t AliHMPIDReconHTA::fgDB[500][150]={{75000*0}};
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AliHMPIDReconHTA::AliHMPIDReconHTA():
- TTask("RichRec","RichPat"),
+ TNamed("RichRec","RichPat"),
fMipX(-999),
fMipY(-999),
fMipQ(-999),
dMean2+=dist[indphi[i]]*dist[indphi[i]];
np++;
}
-
- dMean /=(Double_t)np;
- dMean2 /=(Double_t)np;
+
+ if(np>0){
+ dMean /=(Double_t)np;
+ dMean2 /=(Double_t)np;}
Double_t rms = TMath::Sqrt(dMean2 - dMean*dMean);
for(Int_t i=0;i<fNClu;i++) {
x1=x2=-b/(2*a);
return 1;
}
+ if(a==0) {
+ x1 = -c/b;
+ return 1;
+ }
// delta>0
x1 = (-b+TMath::Sqrt(delta))/(2*a);
x2 = (-b-TMath::Sqrt(delta))/(2*a);
//_____calc. met min quadr using effective distance _________________________________________________
- coeff2ord = xy-xrotsumm*yrotsumm/np;
- coeff1ord = yrotsumm*yrotsumm/np - xrotsumm*xrotsumm/np - yy + xx;
+ if(np>0){
+ coeff2ord = xy-xrotsumm*yrotsumm/np;
+ coeff1ord = yrotsumm*yrotsumm/np - xrotsumm*xrotsumm/np - yy + xx;
+ }
coeff0ord = -coeff2ord;
AliDebug(1,Form(" a = %f b = %f c = %f",coeff2ord,coeff1ord,coeff0ord));
r2(coeff,m1,m2);
- n1=(yrotsumm-m1*xrotsumm)/np;
- n2=(yrotsumm-m2*xrotsumm)/np;
+ if(np>0){
+ n1=(yrotsumm-m1*xrotsumm)/np;
+ n2=(yrotsumm-m2*xrotsumm)/np;}
// 2 solutions.................
// negative angles solved...
Double_t chi2 = 0;
for(Int_t i=0;i<nPhiBins;i++) {
Double_t theo = (Double_t)npeff/(Double_t)nPhiBins;
+ if(theo==0) continue;
chi2+= (iPhiBin[i] - theo)*(iPhiBin[i] - theo)/theo;
}