]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added protection in AliHMPIDReconHTA.cxx and setter methods for charge values in...
authorgvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 31 Jul 2011 11:14:21 +0000 (11:14 +0000)
committergvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 31 Jul 2011 11:14:21 +0000 (11:14 +0000)
HMPID/AliHMPIDCluster.h
HMPID/AliHMPIDReconHTA.cxx

index 337a89ed13185023733fda72e3b3734c2859885d..b4dac8e0104a86172f9376e2c72505f29a259660 100644 (file)
@@ -61,7 +61,12 @@ public:
          void           DoCorrSin(Bool_t doCorrSin                         ){fgDoCorrSin=doCorrSin;}                               // Set sinoidal correction
          void           SetX     (Double_t x                               ){fXX=x;}                                               // Setter
          void           SetY     (Double_t y                               ){fYY=y;}                                               // Setter
+         void           SetQ     (Double_t q                               ){fQ=q;if(fQ>4095)fQ=4095;}                             // Setter         
+         void           SetQRaw  (Double_t qRaw                            ){fQRaw=qRaw;if(fQRaw>4095)fQRaw=4095;}                 // Setter         
          void           SetSize  (Int_t size                               ){fSi=size;}                                            // Setter
+         void           SetCh    (Int_t chamber                              ){fCh=chamber;}                                         // Setter
+         void           SetChi2  (Double_t chi2                            ){fChi2=chi2;}                                          // Setter
+         void           SetSt    (Double_t st                                ){fSt=st;}                                              // Setter
          void           FindClusterSize(Int_t i,Int_t *pSigmaCut);                                                                 //Find the clusterSize of deconvoluted clusters 
  virtual void          Clear(const Option_t*) { delete [] fDigs; fDigs=0; delete [] fParam; fParam=0; }
          
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;
    }