AliRoot Core  3dc7879 (3dc7879)
AliCheb3D Class Reference

#include <AliCheb3D.h>

Inheritance diagram for AliCheb3D:

Public Member Functions

 AliCheb3D ()
 
 AliCheb3D (const AliCheb3D &src)
 
 AliCheb3D (const char *inpFile)
 
 AliCheb3D (FILE *stream)
 
 AliCheb3D (const char *funName, Int_t DimOut, const Float_t *bmin, const Float_t *bmax, Int_t *npoints, Float_t prec=1E-6, const Float_t *precD=0)
 
 AliCheb3D (void(*ptr)(float *, float *), Int_t DimOut, Float_t *bmin, Float_t *bmax, Int_t *npoints, Float_t prec=1E-6, const Float_t *precD=0)
 
 AliCheb3D (void(*ptr)(float *, float *), int DimOut, Float_t *bmin, Float_t *bmax, Int_t *npX, Int_t *npY, Int_t *npZ, Float_t prec=1E-6, const Float_t *precD=0)
 
 AliCheb3D (void(*ptr)(float *, float *), int DimOut, Float_t *bmin, Float_t *bmax, Float_t prec=1E-6, Bool_t run=kTRUE, const Float_t *precD=0)
 
TObjArrayGetChebCalcArray () const
 
 ~AliCheb3D ()
 
AliCheb3Doperator= (const AliCheb3D &rhs)
 
void Eval (const Float_t *par, Float_t *res)
 
Float_t Eval (const Float_t *par, int idim)
 
void Eval (const Double_t *par, Double_t *res)
 
Double_t Eval (const Double_t *par, int idim)
 
void EvalDeriv (int dimd, const Float_t *par, Float_t *res)
 
void EvalDeriv2 (int dimd1, int dimd2, const Float_t *par, Float_t *res)
 
Float_t EvalDeriv (int dimd, const Float_t *par, int idim)
 
Float_t EvalDeriv2 (int dimd1, int dimd2, const Float_t *par, int idim)
 
void EvalDeriv3D (const Float_t *par, Float_t dbdr[3][3])
 
void EvalDeriv3D2 (const Float_t *par, Float_t dbdrdr[3][3][3])
 
void Print (const Option_t *opt="") const
 
Bool_t IsInside (const Float_t *par) const
 
Bool_t IsInside (const Double_t *par) const
 
AliCheb3DCalcGetChebCalc (int i) const
 
Float_t GetBoundMin (int i) const
 
Float_t GetBoundMax (int i) const
 
Float_t * GetBoundMin () const
 
Float_t * GetBoundMax () const
 
Float_t GetPrecision () const
 
void ShiftBound (int id, float dif)
 
void LoadData (const char *inpFile)
 
void LoadData (FILE *stream)
 
void InvertSign ()
 
int * GetNCNeeded (float xyz[3], int DimVar, float mn, float mx, float prec, Int_t npCheck=30)
 
void EstimateNPoints (float prec, int gridBC[3][3], Int_t npd1=30, Int_t npd2=30, Int_t npd3=30)
 
void SaveData (const char *outfile, Bool_t append=kFALSE) const
 
void SaveData (FILE *stream=stdout) const
 
void SetUsrFunction (const char *name)
 
void SetUsrFunction (void(*ptr)(float *, float *))
 
void EvalUsrFunction (const Float_t *x, Float_t *res)
 
TH1 * TestRMS (int idim, int npoints=1000, TH1 *histo=0)
 
const Float_t * GetBScale () const
 
const Float_t * GetBOffset () const
 
void PrepareBoundaries (const Float_t *bmin, const Float_t *bmax)
 

Static Public Member Functions

static Int_t CalcChebCoefs (const Float_t *funval, int np, Float_t *outCoefs, Float_t prec=-1)
 

Protected Member Functions

void Clear (const Option_t *option="")
 
void SetDimOut (const int d, const float *prec=0)
 
void EvalUsrFunction ()
 
void DefineGrid (Int_t *npoints)
 
Int_t ChebFit ()
 
Int_t ChebFit (int dmOut)
 
void SetPrecision (float prec)
 
Float_t MapToInternal (Float_t x, Int_t d) const
 
Float_t MapToExternal (Float_t x, Int_t d) const
 
Double_t MapToInternal (Double_t x, Int_t d) const
 
Double_t MapToExternal (Double_t x, Int_t d) const
 

Protected Attributes

Int_t fDimOut
 
Float_t fPrec
 
Float_t fBMin [3]
 
Float_t fBMax [3]
 
Float_t fBScale [3]
 
Float_t fBOffset [3]
 
TObjArray fChebCalc
 
Int_t fMaxCoefs
 
Int_t fNPoints [3]
 max possible number of coefs per parameterization More...
 
Float_t fArgsTmp [3]
 number of used points in each dimension More...
 
Float_t * fResTmp
 temporary vector for coefs caluclation More...
 
Float_t * fGrid
 temporary vector for results of user function caluclation More...
 
Int_t fGridOffs [3]
 temporary buffer for Chebyshef roots grid More...
 
TString fUsrFunName
 start of grid for each dimension More...
 
TMethodCall * fUsrMacro
 name of user macro containing the function of "void (*fcn)(float*,float*)" format More...
 

Static Protected Attributes

static const Float_t fgkMinPrec = 1.e-12f
 Pointer to MethodCall for function from user macro. More...
 

Detailed Description

Definition at line 82 of file AliCheb3D.h.

Constructor & Destructor Documentation

AliCheb3D::AliCheb3D ( )

Definition at line 33 of file AliCheb3D.cxx.

Referenced by AliCheb3D().

AliCheb3D::AliCheb3D ( const AliCheb3D src)

Definition at line 52 of file AliCheb3D.cxx.

AliCheb3D::AliCheb3D ( const char *  inpFile)

Definition at line 80 of file AliCheb3D.cxx.

AliCheb3D::AliCheb3D ( FILE *  stream)

Definition at line 101 of file AliCheb3D.cxx.

AliCheb3D::AliCheb3D ( const char *  funName,
Int_t  DimOut,
const Float_t *  bmin,
const Float_t *  bmax,
Int_t *  npoints,
Float_t  prec = 1E-6,
const Float_t *  precD = 0 
)
AliCheb3D::AliCheb3D ( void(*)(float *, float *)  ptr,
Int_t  DimOut,
Float_t *  bmin,
Float_t *  bmax,
Int_t *  npoints,
Float_t  prec = 1E-6,
const Float_t *  precD = 0 
)
AliCheb3D::AliCheb3D ( void(*)(float *, float *)  ptr,
int  DimOut,
Float_t *  bmin,
Float_t *  bmax,
Int_t *  npX,
Int_t *  npY,
Int_t *  npZ,
Float_t  prec = 1E-6,
const Float_t *  precD = 0 
)

Definition at line 198 of file AliCheb3D.cxx.

AliCheb3D::AliCheb3D ( void(*)(float *, float *)  ptr,
int  DimOut,
Float_t *  bmin,
Float_t *  bmax,
Float_t  prec = 1E-6,
Bool_t  run = kTRUE,
const Float_t *  precD = 0 
)

Definition at line 244 of file AliCheb3D.cxx.

AliCheb3D::~AliCheb3D ( )
inline

Definition at line 98 of file AliCheb3D.h.

Member Function Documentation

Int_t AliCheb3D::CalcChebCoefs ( const Float_t *  funval,
int  np,
Float_t *  outCoefs,
Float_t  prec = -1 
)
static

Definition at line 426 of file AliCheb3D.cxx.

Referenced by ChebFit(), GetNCNeeded(), and GetPrecision().

Int_t AliCheb3D::ChebFit ( )
protected

Definition at line 488 of file AliCheb3D.cxx.

Referenced by AliCheb3D(), and GetBOffset().

Int_t AliCheb3D::ChebFit ( int  dmOut)
protected

Definition at line 499 of file AliCheb3D.cxx.

void AliCheb3D::Clear ( const Option_t *  option = "")
protected

Definition at line 319 of file AliCheb3D.cxx.

Referenced by GetBOffset(), LoadData(), operator=(), and ~AliCheb3D().

void AliCheb3D::DefineGrid ( Int_t *  npoints)
protected

Definition at line 457 of file AliCheb3D.cxx.

Referenced by AliCheb3D(), and GetBOffset().

void AliCheb3D::EstimateNPoints ( float  prec,
int  gridBC[3][3],
Int_t  npd1 = 30,
Int_t  npd2 = 30,
Int_t  npd3 = 30 
)

Definition at line 839 of file AliCheb3D.cxx.

Referenced by AliCheb3D(), and GetPrecision().

void AliCheb3D::Eval ( const Float_t *  par,
Float_t *  res 
)
inline
Float_t AliCheb3D::Eval ( const Float_t *  par,
int  idim 
)
inline

Definition at line 227 of file AliCheb3D.h.

void AliCheb3D::Eval ( const Double_t *  par,
Double_t *  res 
)
inline

Definition at line 209 of file AliCheb3D.h.

Double_t AliCheb3D::Eval ( const Double_t *  par,
int  idim 
)
inline

Definition at line 218 of file AliCheb3D.h.

void AliCheb3D::EvalDeriv ( int  dimd,
const Float_t *  par,
Float_t *  res 
)
inline

Definition at line 253 of file AliCheb3D.h.

Referenced by ~AliCheb3D().

Float_t AliCheb3D::EvalDeriv ( int  dimd,
const Float_t *  par,
int  idim 
)
inline

Definition at line 271 of file AliCheb3D.h.

void AliCheb3D::EvalDeriv2 ( int  dimd1,
int  dimd2,
const Float_t *  par,
Float_t *  res 
)
inline

Definition at line 262 of file AliCheb3D.h.

Referenced by ~AliCheb3D().

Float_t AliCheb3D::EvalDeriv2 ( int  dimd1,
int  dimd2,
const Float_t *  par,
int  idim 
)
inline

Definition at line 280 of file AliCheb3D.h.

void AliCheb3D::EvalDeriv3D ( const Float_t *  par,
Float_t  dbdr[3][3] 
)
inline

Definition at line 236 of file AliCheb3D.h.

Referenced by ~AliCheb3D().

void AliCheb3D::EvalDeriv3D2 ( const Float_t *  par,
Float_t  dbdrdr[3][3][3] 
)
inline

Definition at line 244 of file AliCheb3D.h.

Referenced by ~AliCheb3D().

void AliCheb3D::EvalUsrFunction ( const Float_t *  x,
Float_t *  res 
)

Definition at line 413 of file AliCheb3D.cxx.

void AliCheb3D::EvalUsrFunction ( )
protected

Definition at line 368 of file AliCheb3D.cxx.

Referenced by ChebFit(), GetBOffset(), GetNCNeeded(), GetPrecision(), and TestRMS().

const Float_t* AliCheb3D::GetBOffset ( ) const
inline

Definition at line 140 of file AliCheb3D.h.

Float_t AliCheb3D::GetBoundMax ( int  i) const
inline
Float_t* AliCheb3D::GetBoundMax ( ) const
inline

Definition at line 120 of file AliCheb3D.h.

Float_t AliCheb3D::GetBoundMin ( int  i) const
inline

Definition at line 117 of file AliCheb3D.h.

Referenced by AliMagWrapCheb::SegmentDimension().

Float_t* AliCheb3D::GetBoundMin ( ) const
inline

Definition at line 119 of file AliCheb3D.h.

const Float_t* AliCheb3D::GetBScale ( ) const
inline

Definition at line 139 of file AliCheb3D.h.

AliCheb3DCalc* AliCheb3D::GetChebCalc ( int  i) const
inline
TObjArray* AliCheb3D::GetChebCalcArray ( ) const
inline

Definition at line 97 of file AliCheb3D.h.

int * AliCheb3D::GetNCNeeded ( float  xyz[3],
int  DimVar,
float  mn,
float  mx,
float  prec,
Int_t  npCheck = 30 
)

Definition at line 950 of file AliCheb3D.cxx.

Referenced by EstimateNPoints(), and GetPrecision().

Float_t AliCheb3D::GetPrecision ( ) const
inline

Definition at line 121 of file AliCheb3D.h.

void AliCheb3D::InvertSign ( )

Definition at line 713 of file AliCheb3D.cxx.

Referenced by GetPrecision().

Bool_t AliCheb3D::IsInside ( const Double_t *  par) const
inline

Definition at line 193 of file AliCheb3D.h.

void AliCheb3D::LoadData ( const char *  inpFile)

Definition at line 727 of file AliCheb3D.cxx.

Referenced by AliCheb3D(), GetPrecision(), and AliMagWrapCheb::LoadData().

void AliCheb3D::LoadData ( FILE *  stream)

Definition at line 740 of file AliCheb3D.cxx.

Float_t AliCheb3D::MapToExternal ( Float_t  x,
Int_t  d 
) const
inlineprotected

Definition at line 157 of file AliCheb3D.h.

Referenced by DefineGrid().

Double_t AliCheb3D::MapToExternal ( Double_t  x,
Int_t  d 
) const
inlineprotected

Definition at line 159 of file AliCheb3D.h.

Float_t AliCheb3D::MapToInternal ( Float_t  x,
Int_t  d 
) const
inlineprotected
Double_t AliCheb3D::MapToInternal ( Double_t  x,
Int_t  d 
) const
inlineprotected

Definition at line 303 of file AliCheb3D.h.

AliCheb3D & AliCheb3D::operator= ( const AliCheb3D rhs)

Definition at line 291 of file AliCheb3D.cxx.

Referenced by ~AliCheb3D().

void AliCheb3D::PrepareBoundaries ( const Float_t *  bmin,
const Float_t *  bmax 
)

Definition at line 344 of file AliCheb3D.cxx.

Referenced by AliCheb3D(), GetBOffset(), and LoadData().

void AliCheb3D::Print ( const Option_t *  opt = "") const

Definition at line 332 of file AliCheb3D.cxx.

Referenced by AliMagWrapCheb::Print(), and ~AliCheb3D().

void AliCheb3D::SaveData ( const char *  outfile,
Bool_t  append = kFALSE 
) const

Definition at line 676 of file AliCheb3D.cxx.

Referenced by GetPrecision(), and AliMagWrapCheb::SaveData().

void AliCheb3D::SaveData ( FILE *  stream = stdout) const

Definition at line 690 of file AliCheb3D.cxx.

void AliCheb3D::SetDimOut ( const int  d,
const float *  prec = 0 
)
protected

Definition at line 783 of file AliCheb3D.cxx.

Referenced by AliCheb3D(), GetBOffset(), and LoadData().

void AliCheb3D::SetPrecision ( float  prec)
inlineprotected

Definition at line 153 of file AliCheb3D.h.

void AliCheb3D::SetUsrFunction ( const char *  name)

Definition at line 375 of file AliCheb3D.cxx.

Referenced by AliCheb3D(), and GetPrecision().

void AliCheb3D::SetUsrFunction ( void(*)(float *, float *)  ptr)

Definition at line 400 of file AliCheb3D.cxx.

void AliCheb3D::ShiftBound ( int  id,
float  dif 
)

Definition at line 798 of file AliCheb3D.cxx.

Referenced by GetPrecision().

TH1 * AliCheb3D::TestRMS ( int  idim,
int  npoints = 1000,
TH1 *  histo = 0 
)

Definition at line 810 of file AliCheb3D.cxx.

Referenced by GetPrecision().

Member Data Documentation

Float_t AliCheb3D::fArgsTmp[3]
protected

number of used points in each dimension

Definition at line 172 of file AliCheb3D.h.

Referenced by AliCheb3D(), ChebFit(), Eval(), EvalDeriv(), EvalDeriv2(), EvalDeriv3D(), EvalDeriv3D2(), EvalUsrFunction(), GetNCNeeded(), SetUsrFunction(), and TestRMS().

Float_t AliCheb3D::fBMax[3]
protected
Float_t AliCheb3D::fBMin[3]
protected
Float_t AliCheb3D::fBOffset[3]
protected
Float_t AliCheb3D::fBScale[3]
protected
TObjArray AliCheb3D::fChebCalc
protected

Definition at line 168 of file AliCheb3D.h.

Referenced by AliCheb3D(), Clear(), GetChebCalc(), GetChebCalcArray(), operator=(), and SetDimOut().

Int_t AliCheb3D::fDimOut
protected
const Float_t AliCheb3D::fgkMinPrec = 1.e-12f
staticprotected

Pointer to MethodCall for function from user macro.

Definition at line 179 of file AliCheb3D.h.

Referenced by AliCheb3D(), ChebFit(), SetDimOut(), and TestRMS().

Float_t* AliCheb3D::fGrid
protected

temporary vector for results of user function caluclation

Definition at line 174 of file AliCheb3D.h.

Referenced by AliCheb3D(), ChebFit(), Clear(), and DefineGrid().

Int_t AliCheb3D::fGridOffs[3]
protected

temporary buffer for Chebyshef roots grid

Definition at line 175 of file AliCheb3D.h.

Referenced by AliCheb3D(), ChebFit(), and DefineGrid().

Int_t AliCheb3D::fMaxCoefs
protected

Definition at line 170 of file AliCheb3D.h.

Referenced by AliCheb3D(), ChebFit(), DefineGrid(), and operator=().

Int_t AliCheb3D::fNPoints[3]
protected

max possible number of coefs per parameterization

Definition at line 171 of file AliCheb3D.h.

Referenced by AliCheb3D(), ChebFit(), DefineGrid(), and operator=().

Float_t AliCheb3D::fPrec
protected
Float_t* AliCheb3D::fResTmp
protected

temporary vector for coefs caluclation

Definition at line 173 of file AliCheb3D.h.

Referenced by AliCheb3D(), ChebFit(), Clear(), EvalUsrFunction(), GetNCNeeded(), SetDimOut(), SetUsrFunction(), and TestRMS().

TString AliCheb3D::fUsrFunName
protected

start of grid for each dimension

Definition at line 176 of file AliCheb3D.h.

Referenced by AliCheb3D(), operator=(), and SetUsrFunction().

TMethodCall* AliCheb3D::fUsrMacro
protected

name of user macro containing the function of "void (*fcn)(float*,float*)" format

Definition at line 177 of file AliCheb3D.h.

Referenced by AliCheb3D(), Clear(), EvalUsrFunction(), operator=(), SetUsrFunction(), and TestRMS().


The documentation for this class was generated from the following files: