]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added few getters/setters
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Mar 2009 09:03:32 +0000 (09:03 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Mar 2009 09:03:32 +0000 (09:03 +0000)
STEER/AliCheb3D.cxx
STEER/AliCheb3D.h
STEER/AliCheb3DCalc.cxx
STEER/AliCheb3DCalc.h

index 6d93b1f305307c53c1066d35a5fec6061477daf2..58acf2457523f346f894dffdde5e53a18fb32345 100644 (file)
@@ -785,7 +785,7 @@ void AliCheb3D::EstimateNPoints(float Prec, int gridBC[3][3])
       xyz[ id2 ] = fBMin[id2] + sclB[it]*( fBMax[id2]-fBMin[id2] );
       //
       int* npt = GetNCNeeded(xyz,idim, dimMN,dimMX, Prec); // npoints for Bx,By,Bz
-      for (int ib=0;ib<3;ib++) if (npt[ib]>gridBC[ib][idim]) gridBC[ib][idim] = npt[ib]+2;
+      for (int ib=0;ib<3;ib++) if (npt[ib]>gridBC[ib][idim]) gridBC[ib][idim] = npt[ib];//+2;
       //
     }
   }
@@ -794,7 +794,7 @@ void AliCheb3D::EstimateNPoints(float Prec, int gridBC[3][3])
 
 int* AliCheb3D::GetNCNeeded(float xyz[3],int DimVar, float mn,float mx, float prec)
 {
-  // estimate needed number of chebyshev coefs for given function desctiption in DimVar dimension
+  // estimate needed number of chebyshev coefs for given function description in DimVar dimension
   // The values for two other dimensions must be set beforehand
   //
   static int curNC[3];
@@ -813,7 +813,7 @@ int* AliCheb3D::GetNCNeeded(float xyz[3],int DimVar, float mn,float mx, float pr
   for (int i=0;i<3;i++) retNC[i] = -1;
   for (int i=0;i<3;i++) fArgsTmp[i] = xyz[i];
   //
-  for (curNP=5; curNP<kMaxPoint; curNP+=5) { 
+  for (curNP=3; curNP<kMaxPoint; curNP+=3) { 
     maxNCPrev = maxNC;
     //
     for (int i=0;i<curNP;i++) { // get function values on Cheb. nodes
index 513995dfce33c9395ba555f9d08830aeb6275bec..e5200b5cc87848eaaedcaef3597e5dc99f114e15 100644 (file)
@@ -146,6 +146,7 @@ class AliCheb3D: public TNamed
   void         DefineGrid(Int_t* npoints);
   Int_t        ChebFit();                                                                 // fit all output dimensions
   Int_t        ChebFit(int dmOut);
+  void         SetPrecision(float prec)                      {fPrec = prec;}
 #endif
   //
   template <class T>
index 43159b51d8f0b4206bdc3216663b6d3bcc7c7c5a..73814b3832cd5b6283f9dc592a5c4d7e07bbebe7 100644 (file)
@@ -417,3 +417,11 @@ Float_t AliCheb3DCalc::ChebEval1Deriv2(Float_t  x, const Float_t * array, int nc
   //
   return b0 - x*b1 - ddcf0/2;
 }
+
+//__________________________________________________________________________________________
+Int_t AliCheb3DCalc::GetMaxColsAtRow() const
+{
+  int nmax3d = 0; 
+  for (int i=fNElemBound2D;i--;) if (fCoefBound2D0[i]>nmax3d) nmax3d = fCoefBound2D0[i];
+  return nmax3d;
+}
index c6f54b284bae56584283d232bdd6284fc43977a5..b06d303375873f95b65ba6ef5c73d90a12ce685d 100644 (file)
@@ -42,6 +42,10 @@ class AliCheb3DCalc: public TNamed
   //
   void       InitRows(int nr);
   void       InitCols(int nc);
+  Int_t      GetNCoefs()                                                const {return fNCoefs;}
+  Int_t      GetNCols()                                                 const {return fNCols;}
+  Int_t      GetNRows()                                                 const {return fNRows;}
+  Int_t      GetMaxColsAtRow()                                          const;
   Int_t*     GetNColsAtRow()                                            const {return fNColsAtRow;}
   Int_t*     GetColAtRowBg()                                            const {return fColAtRowBg;}
   void       InitElemBound2D(int ne);