TFormulaPrimitive.cxx

Go to the documentation of this file.
00001 // @(#)root/hist:$Id: TFormulaPrimitive.cxx 37531 2010-12-10 20:38:06Z pcanal $
00002 // Author: Marian Ivanov, 2005
00003 
00004 /*************************************************************************
00005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006 * All rights reserved.                                                  *
00007 *                                                                       *
00008 * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010 *************************************************************************/
00011 
00012 #include <math.h>
00013 
00014 #include "TFormulaPrimitive.h"
00015 #include "TMath.h"
00016 #ifdef WIN32
00017 #pragma optimize("",off)
00018 #endif
00019 
00020 void TMath_GenerInterface();
00021 
00022 ClassImp(TFormulaPrimitive)
00023 
00024 //______________________________________________________________________________
00025 // The Formula Primitive class
00026 //
00027 //    Helper class for TFormula to speed up TFormula evaluation  
00028 //    TFormula can use all functions registered in the list of TFormulaPrimitives 
00029 //    User can add new function to the list of primitives
00030 //    if FormulaPrimitive with given name is already defined new primitive is ignored  
00031 //    Example:
00032 //      TFormulaPrimitive::AddFormula(new TFormulaPrimitive("Pow2","Pow2",TFastFun::Pow2));
00033 //      TF1 f1("f1","Pow2(x)");
00034 //      
00035 //    
00036 //
00037 //    TFormulaPrimitive is used to get direct acces to the function pointers
00038 //    GenFunc     -  pointers  to the static function
00039 //    TFunc       -  pointers  to the data member functions
00040 //
00041 //    The following sufixes are currently used, to describe function arguments:
00042 //    ------------------------------------------------------------------------
00043 //    G     - generic layout - pointer to double (arguments), pointer to double (parameters)
00044 //    10    - double
00045 //    110   - double, double
00046 //    1110  - double, double, double
00047 
00048 
00049 //______________________________________________________________________________
00050 // TFormula primitive
00051 //
00052 TObjArray * TFormulaPrimitive::fgListOfFunction = 0;
00053 #ifdef R__COMPLETE_MEM_TERMINATION
00054 namespace {
00055    class TFormulaPrimitiveCleanup {
00056       TObjArray **fListOfFunctions;
00057    public:
00058       TFormulaPrimitiveCleanup(TObjArray **functions) : fListOfFunctions(functions) {}
00059       ~TFormulaPrimitiveCleanup() {
00060          delete *fListOfFunctions;
00061       }
00062    };
00063 
00064 }
00065 #endif
00066 
00067 //______________________________________________________________________________
00068 TFormulaPrimitive::TFormulaPrimitive() : TNamed(),
00069                                          fFuncG(0),
00070                                          fType(0),fNArguments(0),fNParameters(0),fIsStatic(kTRUE)
00071 {
00072    // Default constructor.
00073 
00074 }
00075 
00076 
00077 //______________________________________________________________________________
00078 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula,
00079                                      GenFunc0 fpointer) : TNamed(name,formula),
00080                                                           fFunc0(fpointer),
00081                                                           fType(0),fNArguments(0),fNParameters(0),fIsStatic(kTRUE)
00082 {
00083    // Constructor.
00084 
00085 }
00086 
00087 
00088 //______________________________________________________________________________
00089 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula, 
00090                                      GenFunc10 fpointer) : TNamed(name,formula),
00091                                                            fFunc10(fpointer),
00092                                                            fType(10),fNArguments(1),fNParameters(0),fIsStatic(kTRUE)
00093 {
00094    // Constructor.
00095 
00096 }
00097 
00098 
00099 //______________________________________________________________________________
00100 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula,
00101                                      GenFunc110 fpointer) : TNamed(name,formula),
00102                                                             fFunc110(fpointer),
00103                                                             fType(110),fNArguments(2),fNParameters(0),fIsStatic(kTRUE)
00104 {
00105    // Constructor.
00106 
00107 }
00108 
00109 
00110 //______________________________________________________________________________
00111 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula, 
00112                                      GenFunc1110 fpointer) : TNamed(name,formula),
00113                                                              fFunc1110(fpointer),
00114                                                              fType(1110),fNArguments(3),fNParameters(0),fIsStatic(kTRUE)
00115 {
00116    // Constructor.
00117 
00118 }
00119 
00120 
00121 //______________________________________________________________________________
00122 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula, 
00123                                      GenFuncG fpointer,Int_t npar) : TNamed(name,formula),
00124                                                                      fFuncG(fpointer),
00125                                                                      fType(-1),fNArguments(2),fNParameters(npar),fIsStatic(kTRUE)
00126 {
00127    // Constructor.
00128 
00129 }
00130 
00131 
00132 //______________________________________________________________________________
00133 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula,
00134                                      TFuncG fpointer) : TNamed(name,formula),
00135                                                         fTFuncG(fpointer),
00136                                                         fType(0),fNArguments(0),fNParameters(0),fIsStatic(kFALSE)
00137 {
00138    // Constructor.
00139 
00140 }
00141 
00142 
00143 //______________________________________________________________________________
00144 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula,
00145                                      TFunc0 fpointer) : TNamed(name,formula),
00146                                                         fTFunc0(fpointer),
00147                                                         fType(0),fNArguments(0),fNParameters(0),fIsStatic(kFALSE)
00148 {
00149    // Constructor.
00150 
00151 }
00152 
00153 
00154 //______________________________________________________________________________
00155 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula,
00156                                      TFunc10 fpointer) : TNamed(name,formula),
00157                                                          fTFunc10(fpointer),
00158                                                          fType(-10),fNArguments(1),fNParameters(0),fIsStatic(kFALSE)
00159 {
00160    // Constructor.
00161 
00162 }
00163 
00164 
00165 //______________________________________________________________________________
00166 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula,
00167                                      TFunc110 fpointer) : TNamed(name,formula),
00168                                                           fTFunc110(fpointer),
00169                                                           fType(-110),fNArguments(2),fNParameters(0),fIsStatic(kFALSE)
00170 {
00171    // Constructor.
00172 
00173 }
00174 
00175 
00176 //______________________________________________________________________________
00177 TFormulaPrimitive::TFormulaPrimitive(const char *name,const char *formula,
00178                                      TFunc1110 fpointer) :TNamed(name,formula),
00179                                                           fTFunc1110(fpointer),
00180                                                           fType(-1110),fNArguments(3),fNParameters(0),fIsStatic(kFALSE)
00181 {
00182    // Constructor.
00183 
00184 }
00185 
00186 
00187 //______________________________________________________________________________
00188 Int_t TFormulaPrimitive::AddFormula(TFormulaPrimitive * formula)
00189 {
00190    // Add formula to the list of primitive formulas.
00191    // If primitive formula already defined do nothing.
00192 
00193    if (fgListOfFunction == 0) BuildBasicFormulas();
00194    if (FindFormula(formula->GetName(),formula->fNArguments)){
00195       delete formula;
00196       return 0;
00197    }
00198    fgListOfFunction->AddLast(formula);
00199    return 1;
00200 }
00201 
00202 
00203 //______________________________________________________________________________
00204 Double_t TFormulaPrimitive::Eval(Double_t* x)
00205 {
00206    // Eval primitive function at point x.
00207 
00208    if (fIsStatic == kFALSE) return 0;
00209 
00210    if (fType==0) return  fFunc0();
00211    if (fType==10) {
00212       return fFunc10(x[0]);
00213    }
00214    if (fType==110) {
00215       return fFunc110(x[0],x[1]);
00216    }
00217    if (fType==1110) {
00218       return fFunc1110(x[0],x[1],x[2]);
00219    }
00220    return 0;
00221 } 
00222 
00223 
00224 //______________________________________________________________________________
00225 Double_t  TFormulaPrimitive::Eval(TObject *o, Double_t *x)
00226 {
00227    // Eval member function of object o at point x.
00228 
00229    if (fIsStatic == kTRUE) return 0;
00230    if (fType== 0)    return (*o.*fTFunc0)();
00231    if (fType==-10)   return (*o.*fTFunc10)(*x);
00232    if (fType==-110)  return (*o.*fTFunc110)(x[0],x[1]);
00233    if (fType==-1110) return (*o.*fTFunc1110)(x[0],x[1],x[2]);
00234    return 0;
00235 }
00236 
00237 
00238 //______________________________________________________________________________
00239 Double_t TFormulaPrimitive::Eval(Double_t *x, Double_t *param)
00240 {
00241    // Eval primitive parametric function.
00242 
00243    return fFuncG(x,param);
00244 }
00245 
00246 
00247 #define RTFastFun__POLY(var)                                          \
00248 {                                                                     \
00249    Double_t res= param[var-1]+param[var]*x[0];                        \
00250    for (Int_t j=var-1 ;j>0;j--) res      = param[j-1]+x[0]*res;       \
00251    return res;                                                        \
00252 }
00253 
00254 namespace TFastFun {
00255    //
00256    // Namespace with basic primitive functions registered by TFormulaPrimitive
00257    // all function registerd by TFormulaPrimitive can be used in TFormula
00258    //
00259    Double_t Pow2(Double_t x){return x*x;}
00260    Double_t Pow3(Double_t x){return x*x*x;}
00261    Double_t Pow4(Double_t x){return x*x*x*x;}
00262    Double_t Pow5(Double_t x){return x*x*x*x*x;}
00263    inline   Double_t FPoln(Double_t *x, Double_t *param, Int_t npar);
00264    Double_t FPol0(Double_t * /*x*/, Double_t *param){ return param[0];}
00265    Double_t FPol1(Double_t *x, Double_t *param){ return param[0]+param[1]*x[0];}
00266    Double_t FPol2(Double_t *x, Double_t *param){ return param[0]+x[0]*(param[1]+param[2]*x[0]);} 
00267    Double_t FPol3(Double_t *x, Double_t *param){ return param[0]+x[0]*(param[1]+x[0]*(param[2]+param[3]*x[0]));}
00268    Double_t FPol4(Double_t *x, Double_t *param){ RTFastFun__POLY(4)}
00269    Double_t FPol5(Double_t *x, Double_t *param){ RTFastFun__POLY(5)}
00270    Double_t FPol6(Double_t *x, Double_t *param){ RTFastFun__POLY(6)}
00271    Double_t FPol7(Double_t *x, Double_t *param){ RTFastFun__POLY(7)}
00272    Double_t FPol8(Double_t *x, Double_t *param){ RTFastFun__POLY(8)}
00273    Double_t FPol9(Double_t *x, Double_t *param){ RTFastFun__POLY(9)}
00274    Double_t FPol10(Double_t *x, Double_t *param){ RTFastFun__POLY(10)}
00275    //
00276    //
00277    Double_t PlusXY(Double_t x,Double_t y){return x+y;}
00278    Double_t MinusXY(Double_t x,Double_t y){return x-y;}
00279    Double_t MultXY(Double_t x,Double_t y){return x*y;}
00280    Double_t DivXY(Double_t x, Double_t y){return TMath::Abs(y)>0 ? x/y:0;} 
00281    Double_t XpYpZ(Double_t x, Double_t y, Double_t z){ return x+y+z;}
00282    Double_t XxYxZ(Double_t x, Double_t y, Double_t z){ return x*y*z;}
00283    Double_t XxYpZ(Double_t x, Double_t y, Double_t z){ return x*(y+z);}
00284    Double_t XpYxZ(Double_t x, Double_t y, Double_t z){ return x+(y*z);}
00285    Double_t Gaus(Double_t x, Double_t mean, Double_t sigma);
00286    Double_t Gausn(Double_t x, Double_t mean, Double_t sigma);
00287    Double_t Landau(Double_t x, Double_t mean, Double_t sigma){return TMath::Landau(x,mean,sigma,kFALSE);}
00288    Double_t Landaun(Double_t x, Double_t mean, Double_t sigma){return TMath::Landau(x,mean,sigma,kTRUE);}
00289    Double_t Sqrt(Double_t x) {return x>0?sqrt(x):0;}
00290    //  
00291    Double_t Sign(Double_t x){return (x<0)? -1:1;}
00292    Double_t Nint(Double_t x){return TMath::Nint(x);}
00293    Double_t Abs(Double_t x){return TMath::Abs(x);}
00294    //logical
00295    Double_t XandY(Double_t x, Double_t y){ return (x*y>0.1);}
00296    Double_t XorY(Double_t x, Double_t y) { return (x+y>0.1);}
00297    Double_t XgY(Double_t x, Double_t y) {return (x>y);}
00298    Double_t XgeY(Double_t x, Double_t y) {return (x>=y);}
00299    Double_t XlY(Double_t x, Double_t y) {return (x<y);}
00300    Double_t XleY(Double_t x, Double_t y) {return (x<=y);}
00301    Double_t XeY(Double_t x,Double_t y) {return (x==y);}
00302    Double_t XneY(Double_t x,Double_t y) {return (x!=y);}
00303    Double_t XNot(Double_t x){ return (x<0.1);}
00304 };
00305 
00306 
00307 //______________________________________________________________________________
00308 TFormulaPrimitive* TFormulaPrimitive::FindFormula(const char* name)
00309 {
00310    // Find the formula in the list of formulas.
00311    if (!fgListOfFunction) {
00312       BuildBasicFormulas();
00313    }      
00314    Int_t nobjects = fgListOfFunction->GetEntries();
00315    for (Int_t i = 0; i < nobjects; ++i) {
00316       TFormulaPrimitive *formula = (TFormulaPrimitive*)fgListOfFunction->At(i);
00317       if (formula && 0==strcmp(name, formula->GetName())) return formula;
00318    }
00319    return 0;
00320 }
00321 
00322 
00323 //______________________________________________________________________________
00324 TFormulaPrimitive* TFormulaPrimitive::FindFormula(const char* name, UInt_t nargs)
00325 {
00326    // Find the formula in the list of formulas.
00327    
00328    if (!fgListOfFunction) {
00329       BuildBasicFormulas();
00330    }
00331    Int_t nobjects = fgListOfFunction->GetEntries();
00332    for (Int_t i = 0; i < nobjects; ++i) {
00333       TFormulaPrimitive *prim = (TFormulaPrimitive*)fgListOfFunction->At(i);
00334       if (prim) {
00335          bool match = ( ((UInt_t)prim->fNArguments) == nargs );
00336          if (match && 0==strcmp(name, prim->GetName())) return prim;
00337       }
00338    }
00339    return 0;
00340 }
00341 
00342 
00343 //______________________________________________________________________________
00344 TFormulaPrimitive* TFormulaPrimitive::FindFormula(const char* name, const char *args)
00345 {
00346    // Find the formula in the list of formulas.
00347    
00348    // let's count the argument(s)
00349    if (args) {
00350       Int_t nargs = 0;
00351       if (args[0]!=')') {
00352          nargs = 1;
00353          int nest = 0;
00354          for(UInt_t c = 0; c < strlen(args); ++c ) {
00355             switch (args[c]) {
00356                case '(': ++nest; break;
00357                case ')': --nest; break;
00358                case '<': ++nest; break;
00359                case '>': --nest; break;
00360                case ',': nargs += (nest==0); break;
00361             }
00362          }
00363       }
00364       return FindFormula(name,nargs);
00365    } else {
00366       return FindFormula(name);
00367    }
00368    return 0;
00369 }
00370 
00371 
00372 //______________________________________________________________________________
00373 Double_t TFastFun::FPoln(Double_t *x, Double_t *param, Int_t npar)
00374 {
00375    // FPoln.
00376 
00377    Double_t res = 0; Double_t temp=1;                                  
00378    for (Int_t j=npar ;j>=0;j--) {                                            
00379       res  += temp*param[j];                                           
00380       temp *= *x;                                                  
00381    }                                                                   
00382    return res;
00383 }
00384 
00385 
00386 //______________________________________________________________________________
00387 Double_t TFastFun::Gaus(Double_t x, Double_t mean, Double_t sigma)
00388 {
00389    // Gauss.
00390 
00391    if (sigma == 0) return 1.e30;
00392    Double_t arg = (x-mean)/sigma;
00393    return TMath::Exp(-0.5*arg*arg);
00394 }
00395 
00396 
00397 //______________________________________________________________________________
00398 Double_t TFastFun::Gausn(Double_t x, Double_t mean, Double_t sigma)
00399 { 
00400    // Normalize gauss.
00401 
00402    if (sigma == 0)  return 0;
00403    Double_t arg = (x-mean)/sigma;
00404    return TMath::Exp(-0.5*arg*arg)/(2.50662827463100024*sigma);  //sqrt(2*Pi)=2.50662827463100024
00405 }
00406 
00407 
00408 //______________________________________________________________________________
00409 Int_t TFormulaPrimitive::BuildBasicFormulas()
00410 {
00411    // Built-in functions.
00412 
00413    if (fgListOfFunction==0) {
00414       fgListOfFunction = new TObjArray(1000);
00415       fgListOfFunction->SetOwner(kTRUE);
00416    }
00417 #ifdef R__COMPLETE_MEM_TERMINATION
00418    static TFormulaPrimitiveCleanup gCleanup(&fgListOfFunction);
00419 #endif
00420    
00421    //
00422    // logical
00423    //
00424    AddFormula(new TFormulaPrimitive("XandY","XandY",TFastFun::XandY));
00425    AddFormula(new TFormulaPrimitive("XorY","XorY",TFastFun::XorY));
00426    AddFormula(new TFormulaPrimitive("XNot","XNot",TFastFun::XNot));
00427    AddFormula(new TFormulaPrimitive("XlY","XlY",TFastFun::XlY));
00428    AddFormula(new TFormulaPrimitive("XleY","XleY",TFastFun::XleY));
00429    AddFormula(new TFormulaPrimitive("XgY","XgY",TFastFun::XgY));
00430    AddFormula(new TFormulaPrimitive("XgeY","XgeY",TFastFun::XgeY));
00431    AddFormula(new TFormulaPrimitive("XeY","XeY",TFastFun::XeY));
00432    AddFormula(new TFormulaPrimitive("XneY","XneY",TFastFun::XneY));
00433    // addition  + multiplication
00434    AddFormula(new TFormulaPrimitive("PlusXY","PlusXY",TFastFun::PlusXY));
00435    AddFormula(new TFormulaPrimitive("MinusXY","MinusXY",TFastFun::MinusXY));
00436    AddFormula(new TFormulaPrimitive("MultXY","MultXY",TFastFun::MultXY));
00437    AddFormula(new TFormulaPrimitive("DivXY","DivXY",TFastFun::DivXY));
00438    AddFormula(new TFormulaPrimitive("XpYpZ","XpYpZ",TFastFun::XpYpZ));
00439    AddFormula(new TFormulaPrimitive("XxYxZ","XxYxZ",TFastFun::XxYxZ));
00440    AddFormula(new TFormulaPrimitive("XxYpZ","XxYpZ",TFastFun::XxYpZ));
00441    AddFormula(new TFormulaPrimitive("XpYxZ","XpYxZ",TFastFun::XpYxZ));
00442    //
00443    //
00444    AddFormula(new TFormulaPrimitive("Gaus","Gaus",TFastFun::Gaus));
00445    AddFormula(new TFormulaPrimitive("Gausn","Gausn",TFastFun::Gausn));
00446    AddFormula(new TFormulaPrimitive("Landau","Landau",TFastFun::Landau));
00447    AddFormula(new TFormulaPrimitive("Landaun","Landaun",TFastFun::Landaun));
00448    //
00449    //
00450    // polynoms
00451    //
00452    //
00453    AddFormula(new TFormulaPrimitive("Pol0","Pol0",(GenFuncG)TFastFun::FPol0,1)); 
00454    AddFormula(new TFormulaPrimitive("Pol1","Pol1",(GenFuncG)TFastFun::FPol1,2)); 
00455    AddFormula(new TFormulaPrimitive("Pol2","Pol2",(GenFuncG)TFastFun::FPol2,3));                   
00456    AddFormula(new TFormulaPrimitive("Pol3","Pol3",(GenFuncG)TFastFun::FPol3,4));                       
00457    AddFormula(new TFormulaPrimitive("Pol4","Pol4",(GenFuncG)TFastFun::FPol4,5));   
00458    AddFormula(new TFormulaPrimitive("Pol5","Pol5",(GenFuncG)TFastFun::FPol5,6));
00459    AddFormula(new TFormulaPrimitive("Pol6","Pol6",(GenFuncG)TFastFun::FPol6,7));
00460    AddFormula(new TFormulaPrimitive("Pol7","Pol7",(GenFuncG)TFastFun::FPol7,8));
00461    AddFormula(new TFormulaPrimitive("Pol8","Pol8",(GenFuncG)TFastFun::FPol8,9));
00462    AddFormula(new TFormulaPrimitive("Pol9","Pol9",(GenFuncG)TFastFun::FPol9,10));
00463    AddFormula(new TFormulaPrimitive("Pol10","Pol10",(GenFuncG)TFastFun::FPol10,11));
00464    //
00465    // pows
00466    AddFormula(new TFormulaPrimitive("Pow2","Pow2",TFastFun::Pow2));                        
00467    AddFormula(new TFormulaPrimitive("Pow3","Pow3",TFastFun::Pow3));                   
00468    AddFormula(new TFormulaPrimitive("Pow4","Pow4",TFastFun::Pow4));                        
00469    AddFormula(new TFormulaPrimitive("Pow5","Pow5",TFastFun::Pow5));                         
00470    //
00471    //
00472    AddFormula(new TFormulaPrimitive("TMath::Cos","TMath::Cos",cos));              // 10
00473    AddFormula(new TFormulaPrimitive("cos","cos",cos));                            // 10
00474    AddFormula(new TFormulaPrimitive("TMath::Sin","TMath::Sin",sin));              // 11
00475    AddFormula(new TFormulaPrimitive("sin","sin",sin));                            // 11
00476    AddFormula(new TFormulaPrimitive("TMath::Tan","TMath::Tan",tan));              // 12
00477    AddFormula(new TFormulaPrimitive("tan","tan",tan));                            // 12
00478    AddFormula(new TFormulaPrimitive("TMath::ACos","TMath::ACos",acos));           // 13
00479    AddFormula(new TFormulaPrimitive("acos","acos",acos));                         // 13
00480    AddFormula(new TFormulaPrimitive("TMath::ASin","TMath::ASin",asin));           // 14
00481    AddFormula(new TFormulaPrimitive("asin","asin",asin));                         // 14
00482    AddFormula(new TFormulaPrimitive("TMath::ATan","TMath::ATan",atan));           // 15
00483    AddFormula(new TFormulaPrimitive("atan","atan",atan));                         // 15
00484    AddFormula(new TFormulaPrimitive("TMath::ATan2","TMath::ATan2",atan2));        // 16
00485    AddFormula(new TFormulaPrimitive("atan2","atan2",atan2));                      // 16
00486    //   kpow      = 20, ksq = 21, ksqrt     = 22, 
00487    AddFormula(new TFormulaPrimitive("pow","pow",TMath::Power));                 //20
00488    AddFormula(new TFormulaPrimitive("sq","sq",TFastFun::Pow2));                 //21
00489    AddFormula(new TFormulaPrimitive("sqrt","sqrt",TFastFun::Sqrt));             //22
00490    // kmin      = 24, kmax = 25,
00491    AddFormula(new TFormulaPrimitive("min","min",(GenFunc110)TMath::Min));       //24
00492    AddFormula(new TFormulaPrimitive("max","max",(GenFunc110)TMath::Max));       //25
00493    // klog      = 30, kexp = 31, klog10 = 32,
00494    AddFormula(new TFormulaPrimitive("log","log",TMath::Log));                           //30
00495    AddFormula(new TFormulaPrimitive("exp","exp",TMath::Exp));                           //31
00496    AddFormula(new TFormulaPrimitive("log10","log10",TMath::Log10));                     //32
00497    //  
00498    //    cosh        70                  acosh        73
00499    //    sinh        71                  asinh        74
00500    //    tanh        72                  atanh        75
00501    //
00502    AddFormula(new TFormulaPrimitive("TMath::CosH","TMath::Cosh",cosh));                     // 70
00503    AddFormula(new TFormulaPrimitive("cosh","cosh",cosh));                                   // 70
00504    AddFormula(new TFormulaPrimitive("TMath::SinH","TMath::SinH",sinh));                     // 71
00505    AddFormula(new TFormulaPrimitive("sinh","sinh",sinh));                                   // 71
00506    AddFormula(new TFormulaPrimitive("TMath::TanH","TMath::Tanh",tanh));                     // 72
00507    AddFormula(new TFormulaPrimitive("tanh","tanh",tanh));                                   // 72
00508    AddFormula(new TFormulaPrimitive("TMath::ACosH","TMath::ACosh",TMath::ACosH));           // 73
00509    AddFormula(new TFormulaPrimitive("acosh","acosH",TMath::ACosH));                         // 73
00510    AddFormula(new TFormulaPrimitive("TMath::ASinH","TMath::ASinh",TMath::ASinH));           // 74
00511    AddFormula(new TFormulaPrimitive("acosh","acosH",TMath::ASinH));                         // 74
00512    AddFormula(new TFormulaPrimitive("TMath::ATanH","TMath::ATanh",TMath::ATanH));           // 75
00513    AddFormula(new TFormulaPrimitive("atanh","atanh",TMath::ATanH));                         // 75
00514    //  
00515    AddFormula(new TFormulaPrimitive("TMath::Abs","TMath::Abs",TMath::Abs));
00516    AddFormula(new TFormulaPrimitive("TMath::BreitWigner","TMath::BreitWigner",TMath::BreitWigner));
00517 
00518    //Disable direct access to TMath::Landau for now because of the default parameter.
00519    //AddFormula(new TFormulaPrimitive("TMath::Landau","TMath::Landau",(TFormulaPrimitive::GenFunc1110)TMath::Landau));
00520 
00521    TMath_GenerInterface();
00522    return 1;
00523 }

Generated on Tue Jul 5 14:24:17 2011 for ROOT_528-00b_version by  doxygen 1.5.1