]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDReconHTA.cxx
Added protection in AliHMPIDReconHTA.cxx and setter methods for charge values in...
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDReconHTA.cxx
index cd53af9aeef99af0e7db8c5fb6c9b46ce76ee84a..0048322c809feef893b5ed8f372c2bdb74807137 100644 (file)
@@ -703,6 +703,10 @@ Int_t AliHMPIDReconHTA::r2(Double_t *coef, Double_t &x1, Double_t &x2)
     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);
@@ -855,6 +859,7 @@ Bool_t AliHMPIDReconHTA::UniformDistrib()
    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;
    }