]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSymBDMatrix.cxx
updating UE leading track analysis (Sara & Jan Fiete)
[u/mrichter/AliRoot.git] / STEER / AliSymBDMatrix.cxx
index ed7f78599b9b10ccce9a3a9ac88ba8d406a9e3c9..be6fe5749c2f84c1c028aabcdb2665d98ca5bb18 100644 (file)
@@ -113,7 +113,7 @@ Float_t AliSymBDMatrix::GetDensity() const
   // get fraction of non-zero elements
   if (!fNelems) return 0;
   Int_t nel = 0;
-  for (int i=fNelems;i--;) if (TMath::Abs(fElems[i])>DBL_MIN) nel++;
+  for (int i=fNelems;i--;) if (!IsZero(fElems[i])) nel++;
   return nel/fNelems;
 }
 
@@ -134,7 +134,7 @@ void AliSymBDMatrix::Print(Option_t* option) const
 }
 
 //___________________________________________________________
-void AliSymBDMatrix::MultiplyByVec(Double_t *vecIn,Double_t *vecOut) const
+void AliSymBDMatrix::MultiplyByVec(const Double_t *vecIn,Double_t *vecOut) const
 {
   // fill vecOut by matrix*vecIn
   // vector should be of the same size as the matrix
@@ -169,6 +169,7 @@ void AliSymBDMatrix::Reset()
 {
   // set all elems to 0
   if (fElems) memset(fElems,0,fNcols*fRowLwb*sizeof(Double_t));
+  SetDecomposed(kFALSE);
   //
 }
 
@@ -224,8 +225,8 @@ void AliSymBDMatrix::DecomposeLDLT()
       theta = TMath::Max(theta, TMath::Abs(dtmp));
       //
       if (jr!=kr) {
-       if (TMath::Abs(QueryDiag(jr))>DBL_MIN) (*this)(kr,jr) /= QueryDiag(jr);
-       else                    (*this)(kr,jr) = 0.0;
+       if (!IsZero(QueryDiag(jr))) (*this)(kr,jr) /= QueryDiag(jr);
+       else                        (*this)(kr,jr) = 0.0;
       }
       else if (kr<iDiag) {
        dtmp = theta/beta;
@@ -238,7 +239,7 @@ void AliSymBDMatrix::DecomposeLDLT()
   //
   for (int i=0;i<GetSize();i++) {
     dtmp = QueryDiag(i);
-    if (TMath::Abs(dtmp)>DBL_MIN) DiagElem(i) = 1./dtmp;
+    if (!IsZero(dtmp)) DiagElem(i) = 1./dtmp;
   }
   //
   SetDecomposed();