ROOT logo
// @(#)root/hist:$Id$
// Author: Rene Brun   27/10/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TROOT.h"
#include "TF3.h"
#include "TMath.h"
#include "TH3.h"
#include "TVirtualPad.h"
#include "TRandom.h"
#include "TVectorD.h"
#include "Riostream.h"
#include "TColor.h"
#include "TVirtualFitter.h"
#include "TVirtualHistPainter.h"
#include "TClass.h"

ClassImp(TF3)

//______________________________________________________________________________
//
// a 3-Dim function with parameters
//

//______________________________________________________________________________
TF3::TF3(): TF2()
{
//*-*-*-*-*-*-*-*-*-*-*F3 default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                  ======================

   fNpz  = 0;
   fZmin = 0;
   fZmax = 1;
}


//______________________________________________________________________________
TF3::TF3(const char *name,const char *formula, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax)
      :TF2(name,formula,xmin,xmax,ymax,ymin)
{
//*-*-*-*-*-*-*F3 constructor using a formula definition*-*-*-*-*-*-*-*-*-*-*
//*-*          =========================================
//*-*
//*-*  See TFormula constructor for explanation of the formula syntax.
//*-*
//*-*
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

   fZmin   = zmin;
   fZmax   = zmax;
   fNpz    = 30;
   if (fNdim != 3 && xmin < xmax) {
      Error("TF3","function: %s/%s has %d parameters instead of 3",name,formula,fNdim);
      MakeZombie();
   }
}


//______________________________________________________________________________
TF3::TF3(const char *name,void *fcn, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar)
      :TF2(name,fcn,xmin,xmax,ymin,ymax,npar)
{
//*-*-*-*-*-*-*F3 constructor using a pointer to an interpreted function*-*-*
//*-*          =========================================================
//*-*
//*-*   npar is the number of free parameters used by the function
//*-*
//*-*  Creates a function of type C between xmin and xmax and ymin,ymax.
//*-*  The function is defined with npar parameters
//*-*  fcn must be a function of type:
//*-*     Double_t fcn(Double_t *x, Double_t *params)
//*-*
//*-*  This constructor is called for functions of type C by CINT.
//*-*
//*-* WARNING! A function created with this constructor cannot be Cloned.
//*-*
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

   fZmin   = zmin;
   fZmax   = zmax;
   fNpz    = 30;
   fNdim   = 3;
}

//______________________________________________________________________________
TF3::TF3(const char *name,Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar)
      :TF2(name,fcn,xmin,xmax,ymin,ymax,npar)
{
//*-*-*-*-*-*-*F3 constructor using a pointer to real function*-*-*-*-*-*-*-*
//*-*          ===============================================
//*-*
//*-*   npar is the number of free parameters used by the function
//*-*
//*-*  For example, for a 3-dim function with 3 parameters, the user function
//*-*      looks like:
//*-*    Double_t fun1(Double_t *x, Double_t *par)
//*-*        return par[0]*x[2] + par[1]*exp(par[2]*x[0]*x[1]);
//*-*
//*-* WARNING! A function created with this constructor cannot be Cloned.
//*-*
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

   fZmin   = zmin;
   fZmax   = zmax;
   fNpz    = 30;
   fNdim   = 3;
}

//______________________________________________________________________________
TF3::TF3(const char *name,Double_t (*fcn)(const Double_t *, const Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar)
   : TF2(name,fcn,xmin,xmax,ymin,ymax,npar),
   fZmin(zmin), 
   fZmax(zmax), 
   fNpz(30) 
{
//*-*-*-*-*-*-*F3 constructor using a pointer to real function*-*-*-*-*-*-*-*
//*-*          ===============================================
//*-*
//*-*   npar is the number of free parameters used by the function
//*-*
//*-*  For example, for a 3-dim function with 3 parameters, the user function
//*-*      looks like:
//*-*    Double_t fun1(Double_t *x, Double_t *par)
//*-*        return par[0]*x[2] + par[1]*exp(par[2]*x[0]*x[1]);
//*-*
//*-* WARNING! A function created with this constructor cannot be Cloned.
//*-*
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

   fNdim   = 3;
}

//______________________________________________________________________________
TF3::TF3(const char *name, ROOT::Math::ParamFunctor f, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar)
   : TF2(name, f, xmin, xmax, ymin, ymax,  npar), 
   fZmin(zmin), 
   fZmax(zmax), 
   fNpz(30) 
{
//*-*-*-*-*-*-*F3 constructor using a ParamFunctor, 
//*-*          a functor class implementing operator() (double *, double *)  
//*-*
//*-*   npar is the number of free parameters used by the function
//*-*
//*-* WARNING! A function created with this constructor cannot be Cloned.
//*-*

   fNdim   = 3;
}

//______________________________________________________________________________
TF3::TF3(const char *name, void * ptr, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, const char *className)
   : TF2(name, ptr, xmin, xmax, ymin, ymax,  npar, className), 
   fZmin(zmin), 
   fZmax(zmax), 
   fNpz(30) 
{
//*-*-*-*-*-*-*F2 constructor used by CINT for interpreted function objects
//*-*          Used for having same syntax as the template constructor from callable C++ objects 
//*-*          which can be used only in compile C++ mode.   
//*-*          
//*-*   npar is the number of free parameters used by the function
//*-*
//*-* WARNING! A function created with this constructor cannot be Cloned.
//*-*

   fNdim   = 3;
}

//______________________________________________________________________________
TF3::TF3(const char *name, void * ptr, void *,Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, const char *className, const char * methodName)
   : TF2(name, ptr, (void*)0,xmin, xmax, ymin, ymax, npar,className, methodName), 
   fZmin(zmin), 
   fZmax(zmax), 
   fNpz(30) 
{
//*-*-*-*-*-*-*F2 constructor used by CINT for member functions of interpreted classes
//*-*          Used for having same syntax as the template constructor from a generic 
//*-*          class pointer and a member function type 
//*-*          which can be used only in compile C++ mode  
//*-*
//*-*   npar is the number of free parameters used by the function
//*-*
//*-* WARNING! A function created with this constructor cannot be Cloned.
//*-*

   fNdim   = 3;
}


//______________________________________________________________________________
TF3& TF3::operator=(const TF3 &rhs) 
{
   // Operator =

   if (this != &rhs) {
      rhs.Copy(*this);
   }
   return *this;
}

//______________________________________________________________________________
TF3::~TF3()
{
//*-*-*-*-*-*-*-*-*-*-*F3 default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                  =====================

}

//______________________________________________________________________________
TF3::TF3(const TF3 &f3) : TF2()
{
   // Copy constructor.

   ((TF3&)f3).Copy(*this);
}

//______________________________________________________________________________
void TF3::Copy(TObject &obj) const
{
//*-*-*-*-*-*-*-*-*-*-*Copy this F3 to a new F3*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                  ========================

   TF2::Copy(obj);
   ((TF3&)obj).fZmin = fZmin;
   ((TF3&)obj).fZmax = fZmax;
   ((TF3&)obj).fNpz  = fNpz;
}

//______________________________________________________________________________
Int_t TF3::DistancetoPrimitive(Int_t px, Int_t py)
{
//*-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to a function*-*-*-*-*
//*-*                  ===============================================
//*-*  Compute the closest distance of approach from point px,py to this function.
//*-*  The distance is computed in pixels units.
//*-*
//*-*  Algorithm:
//*-*
//*-*
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

   return TF1::DistancetoPrimitive(px, py);

}

//______________________________________________________________________________
void TF3::Draw(Option_t *option)
{
//*-*-*-*-*-*-*-*-*-*-*Draw this function with its current attributes*-*-*-*-*
//*-*                  ==============================================

   TString opt = option;
   opt.ToLower();
   if (gPad && !opt.Contains("same")) gPad->Clear();

   AppendPad(option);

}

//______________________________________________________________________________
void TF3::ExecuteEvent(Int_t event, Int_t px, Int_t py)
{
//*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
//*-*                  =========================================
//*-*  This member function is called when a F3 is clicked with the locator
//*-*
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

   TF1::ExecuteEvent(event, px, py);
}

//______________________________________________________________________________
void TF3::GetMinimumXYZ(Double_t &x, Double_t &y, Double_t &z)
{
// Return the X, Y and Z values corresponding to the minimum value of the function
// on its range. To find the minimum on a subrange, use the SetRange() function first.
// Method:
//   First, a grid search is performed to find the initial estimate of the 
//   minimum location. The range of the function is divided 
//   into fNpx,fNpy and fNpz sub-ranges. If the function is "good" (or "bad"), 
//   these values can be changed by SetNpx(), SetNpy() and SetNpz() functions.
//   Then, Minuit minimization is used with starting values found by the grid search


   //First do a grid search with step size fNpx adn fNpy
   Double_t xx, yy, zz, tt;
   Double_t dx = (fXmax - fXmin)/fNpx;
   Double_t dy = (fYmax - fYmin)/fNpy;
   Double_t dz = (fZmax - fZmin)/fNpz;

   Double_t xxmin = fXmin;
   Double_t yymin = fYmin;
   Double_t zzmin = fZmin;
   Double_t ttmin = Eval(xxmin, yymin, zzmin+dz);
   for (Int_t i=0; i<fNpx; i++){
      xx=fXmin + (i+0.5)*dx;
      for (Int_t j=0; j<fNpy; j++){
         yy=fYmin+(j+0.5)*dy;
         for (Int_t k=0; k<fNpz; k++){
            zz = fZmin+(k+0.5)*dz;
            tt = Eval(xx, yy, zz);
            if (tt<ttmin) {xxmin = xx, yymin = yy; zzmin = zz; ttmin=tt;}
         }
      }
   }

   x = TMath::Min(fXmax, xxmin);
   y = TMath::Min(fYmax, yymin);
   z = TMath::Min(fZmax, zzmin);

   //go to minuit for the final minimization
   char f[]="TFitter";

   Int_t strdiff = 0;
   if (TVirtualFitter::GetFitter()){
      //If the fitter is already set and it's not minuit, delete it and 
      //create a minuit fitter
      strdiff = strcmp(TVirtualFitter::GetFitter()->IsA()->GetName(), f);
      if (strdiff!=0) 
         delete TVirtualFitter::GetFitter();
   }

   TVirtualFitter *minuit = TVirtualFitter::Fitter(this, 3);
   if (!minuit) { 
      Error("GetMinimumXYZ", "Cannot create fitter");
      return;
   }
   minuit->Clear();
   minuit->SetFitMethod("F3Minimizer");
   Double_t arglist[10];
   arglist[0]=-1;
   minuit->ExecuteCommand("SET PRINT", arglist, 1);

   minuit->SetParameter(0, "x", x, 0.1, 0, 0);
   minuit->SetParameter(1, "y", y, 0.1, 0, 0);
   minuit->SetParameter(2, "z", z, 0.1, 0, 0);
   arglist[0] = 5;
   arglist[1] = 1e-5;
   // minuit->ExecuteCommand("CALL FCN", arglist, 1);

   Int_t fitResult = minuit->ExecuteCommand("MIGRAD", arglist, 0);
   if (fitResult!=0){
      //migrad might have not converged
      Warning("GetMinimumXYZ", "Abnormal termination of minimization");
   }
   Double_t xtemp = minuit->GetParameter(0);
   Double_t ytemp = minuit->GetParameter(1);
   Double_t ztemp = minuit->GetParameter(2);
   if (xtemp>fXmax || xtemp<fXmin || ytemp>fYmax || ytemp<fYmin || ztemp>fZmax || ztemp<fZmin){
      //converged to something outside limits, redo with bounds 
      minuit->SetParameter(0, "x", x, 0.1, fXmin, fXmax);
      minuit->SetParameter(1, "y", y, 0.1, fYmin, fYmax);
      minuit->SetParameter(2, "z", z, 0.1, fZmin, fZmax);
      fitResult = minuit->ExecuteCommand("MIGRAD", arglist, 0);
      if (fitResult!=0){
         //migrad might have not converged
         Warning("GetMinimumXYZ", "Abnormal termination of minimization");
      }
   }
   x = minuit->GetParameter(0);
   y = minuit->GetParameter(1);
   z = minuit->GetParameter(2);
}

//______________________________________________________________________________
void TF3::GetRandom3(Double_t &xrandom, Double_t &yrandom, Double_t &zrandom)
{
//*-*-*-*-*-*Return 3 random numbers following this function shape*-*-*-*-*-*
//*-*        =====================================================
//*-*
//*-*   The distribution contained in this TF3 function is integrated
//*-*   over the cell contents.
//*-*   It is normalized to 1.
//*-*   Getting the three random numbers implies:
//*-*     - Generating a random number between 0 and 1 (say r1)
//*-*     - Look in which cell in the normalized integral r1 corresponds to
//*-*     - make a linear interpolation in the returned cell
//*-*
//*-*
//*-*  IMPORTANT NOTE
//*-*  The integral of the function is computed at fNpx * fNpy * fNpz points. 
//*-*  If the function has sharp peaks, you should increase the number of 
//*-*  points (SetNpx, SetNpy, SetNpz) such that the peak is correctly tabulated 
//*-*  at several points.

   //  Check if integral array must be build
   Int_t i,j,k,cell;
   Double_t dx   = (fXmax-fXmin)/fNpx;
   Double_t dy   = (fYmax-fYmin)/fNpy;
   Double_t dz   = (fZmax-fZmin)/fNpz;
   Int_t ncells = fNpx*fNpy*fNpz;
   Double_t xx[3];
   InitArgs(xx,fParams);
   if (fIntegral == 0) {
      fIntegral = new Double_t[ncells+1];
      fIntegral[0] = 0;
      Double_t integ;
      Int_t intNegative = 0;
      cell = 0;
      for (k=0;k<fNpz;k++) {
         xx[2] = fZmin+(k+0.5)*dz;
         for (j=0;j<fNpy;j++) {
            xx[1] = fYmin+(j+0.5)*dy;
            for (i=0;i<fNpx;i++) {
               xx[0] = fXmin+(i+0.5)*dx;
               integ = EvalPar(xx,fParams);
               if (integ < 0) {intNegative++; integ = -integ;}
               fIntegral[cell+1] = fIntegral[cell] + integ;
               cell++;
            }
         }
      }
      if (intNegative > 0) {
         Warning("GetRandom3","function:%s has %d negative values: abs assumed",GetName(),intNegative);
      }
      if (fIntegral[ncells] == 0) {
         Error("GetRandom3","Integral of function is zero");
         return;
      }
      for (i=1;i<=ncells;i++) {  // normalize integral to 1
         fIntegral[i] /= fIntegral[ncells];
      }
   }

// return random numbers
   Double_t r;
   r    = gRandom->Rndm();
   cell = TMath::BinarySearch(ncells,fIntegral,r);
   k    = cell/(fNpx*fNpy);
   j    = (cell -k*fNpx*fNpy)/fNpx;
   i    = cell -fNpx*(j +fNpy*k);
   xrandom = fXmin +dx*i +dx*gRandom->Rndm();
   yrandom = fYmin +dy*j +dy*gRandom->Rndm();
   zrandom = fZmin +dz*k +dz*gRandom->Rndm();
}

//______________________________________________________________________________
void TF3::GetRange(Double_t &xmin, Double_t &ymin, Double_t &zmin, Double_t &xmax, Double_t &ymax, Double_t &zmax) const
{
//*-*-*-*-*-*-*-*-*-*-*Return range of function*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                  ========================

   xmin = fXmin;
   xmax = fXmax;
   ymin = fYmin;
   ymax = fYmax;
   zmin = fZmin;
   zmax = fZmax;
}


//______________________________________________________________________________
Double_t TF3::GetSave(const Double_t *xx)
{
    // Get value corresponding to X in array of fSave values

   if (fNsave <= 0) return 0;
   if (fSave == 0) return 0;
   Int_t np = fNsave - 9;
   Double_t xmin = Double_t(fSave[np+0]);
   Double_t xmax = Double_t(fSave[np+1]);
   Double_t ymin = Double_t(fSave[np+2]);
   Double_t ymax = Double_t(fSave[np+3]);
   Double_t zmin = Double_t(fSave[np+4]);
   Double_t zmax = Double_t(fSave[np+5]);
   Int_t npx     = Int_t(fSave[np+6]);
   Int_t npy     = Int_t(fSave[np+7]);
   Int_t npz     = Int_t(fSave[np+8]);
   Double_t x    = Double_t(xx[0]);
   Double_t dx   = (xmax-xmin)/npx;
   if (x < xmin || x > xmax) return 0;
   if (dx <= 0) return 0;
   Double_t y    = Double_t(xx[1]);
   Double_t dy   = (ymax-ymin)/npy;
   if (y < ymin || y > ymax) return 0;
   if (dy <= 0) return 0;
   Double_t z    = Double_t(xx[2]);
   Double_t dz   = (zmax-zmin)/npz;
   if (z < zmin || z > zmax) return 0;
   if (dz <= 0) return 0;

   //we make a trilinear interpolation using the 8 points surrounding x,y,z
   Int_t ibin    = Int_t((x-xmin)/dx);
   Int_t jbin    = Int_t((y-ymin)/dy);
   Int_t kbin    = Int_t((z-zmin)/dz);
   Double_t xlow = xmin + ibin*dx;
   Double_t ylow = ymin + jbin*dy;
   Double_t zlow = zmin + kbin*dz;
   Double_t t    = (x-xlow)/dx;
   Double_t u    = (y-ylow)/dy;
   Double_t v    = (z-zlow)/dz;
   Int_t k1      = (ibin  ) + (npx+1)*((jbin  ) + (npy+1)*(kbin  ));
   Int_t k2      = (ibin+1) + (npx+1)*((jbin  ) + (npy+1)*(kbin  ));
   Int_t k3      = (ibin+1) + (npx+1)*((jbin+1) + (npy+1)*(kbin  ));
   Int_t k4      = (ibin  ) + (npx+1)*((jbin+1) + (npy+1)*(kbin  ));
   Int_t k5      = (ibin  ) + (npx+1)*((jbin  ) + (npy+1)*(kbin+1));
   Int_t k6      = (ibin+1) + (npx+1)*((jbin  ) + (npy+1)*(kbin+1));
   Int_t k7      = (ibin+1) + (npx+1)*((jbin+1) + (npy+1)*(kbin+1));
   Int_t k8      = (ibin  ) + (npx+1)*((jbin+1) + (npy+1)*(kbin+1));
   Double_t r    = (1-t)*(1-u)*(1-v)*fSave[k1] + t*(1-u)*(1-v)*fSave[k2] + t*u*(1-v)*fSave[k3] + (1-t)*u*(1-v)*fSave[k4] +
                   (1-t)*(1-u)*v*fSave[k5] + t*(1-u)*v*fSave[k6] + t*u*v*fSave[k7] + (1-t)*u*v*fSave[k8];
   return r;
}

//______________________________________________________________________________
Double_t TF3::Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon)
{
// Return Integral of a 3d function in range [ax,bx],[ay,by],[az,bz]
//
   Double_t a[3], b[3];
   a[0] = ax;
   b[0] = bx;
   a[1] = ay;
   b[1] = by;
   a[2] = az;
   b[2] = bz;
   Double_t relerr  = 0;
   Int_t n = 3;
   Int_t minpts = 2*2*2+2*n*(n+1)+1;  // ie 33
   Int_t maxpts = 20*fNpx*fNpy*fNpz;
   Int_t nfnevl,ifail;
   Double_t result = IntegralMultiple(n,a,b,minpts,maxpts,epsilon,relerr,nfnevl,ifail);
   if (ifail > 0) {
      Warning("Integral","failed code=%d, minpts=%d, maxpts=%d, epsilon=%g, nfnevl=%d, relerr=%g ",ifail,minpts,maxpts,epsilon,nfnevl,relerr);
   }
   return result;
}

//______________________________________________________________________________
Bool_t TF3::IsInside(const Double_t *x) const
{
// Return kTRUE is the point is inside the function range
   
   if (x[0] < fXmin || x[0] > fXmax) return kFALSE;
   if (x[1] < fYmin || x[1] > fYmax) return kFALSE;
   if (x[2] < fZmin || x[2] > fZmax) return kFALSE;
   return kTRUE;
}

//______________________________________________________________________________
TH1* TF3::CreateHistogram()
{
// Create a histogram for axis range.

   TH1* h = new TH3F("R__TF3",(char*)GetTitle(),fNpx,fXmin,fXmax
                         ,fNpy,fYmin,fYmax
                         ,fNpz,fZmin,fZmax);
   h->SetDirectory(0);
   return h;
}

//______________________________________________________________________________
void TF3::Paint(Option_t *option)
{
//*-*-*-*-*-*-*-*-*Paint this 3-D function with its current attributes*-*-*-*-*
//*-*              ===================================================


   TString opt = option;
   opt.ToLower();

//*-*-  Create a temporary histogram and fill each channel with the function value
   if (!fHistogram) {
      fHistogram = new TH3F("R__TF3",(char*)GetTitle(),fNpx,fXmin,fXmax
                                                      ,fNpy,fYmin,fYmax
                                                      ,fNpz,fZmin,fZmax);
      fHistogram->SetDirectory(0);
   }

   fHistogram->GetPainter(option)->ProcessMessage("SetF3",this);
   if (opt.Length() == 0 ) {
      fHistogram->Paint("tf3");
   } else {
      opt += "tf3";
      fHistogram->Paint(opt.Data());
   }
}

//______________________________________________________________________________
void TF3::SetClippingBoxOff()
{
   // Set the function clipping box (for drawing) "off".

   if (!fHistogram) {
      fHistogram = new TH3F("R__TF3",(char*)GetTitle(),fNpx,fXmin,fXmax
                                                    ,fNpy,fYmin,fYmax
                                                    ,fNpz,fZmin,fZmax);
      fHistogram->SetDirectory(0);
   }
   fHistogram->GetPainter()->ProcessMessage("SetF3ClippingBoxOff",0);
}

//______________________________________________________________________________
void TF3::Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax)
{
    // Save values of function in array fSave

   if (fSave != 0) {delete [] fSave; fSave = 0;}
   Int_t nsave = (fNpx+1)*(fNpy+1)*(fNpz+1);
   fNsave = nsave+9;
   if (fNsave <= 9) {fNsave=0; return;}
   fSave  = new Double_t[fNsave];
   Int_t i,j,k,l=0;
   Double_t dx = (xmax-xmin)/fNpx;
   Double_t dy = (ymax-ymin)/fNpy;
   Double_t dz = (zmax-zmin)/fNpz;
   if (dx <= 0) {
      dx = (fXmax-fXmin)/fNpx;
      xmin = fXmin +0.5*dx;
      xmax = fXmax -0.5*dx;
   }
   if (dy <= 0) {
      dy = (fYmax-fYmin)/fNpy;
      ymin = fYmin +0.5*dy;
      ymax = fYmax -0.5*dy;
   }
   if (dz <= 0) {
      dz = (fZmax-fZmin)/fNpz;
      zmin = fZmin +0.5*dz;
      zmax = fZmax -0.5*dz;
   }
   Double_t xv[3];
   InitArgs(xv,fParams);
   for (k=0;k<=fNpz;k++) {
      xv[2]    = zmin + dz*k;
      for (j=0;j<=fNpy;j++) {
         xv[1]    = ymin + dy*j;
         for (i=0;i<=fNpx;i++) {
            xv[0]    = xmin + dx*i;
            fSave[l] = EvalPar(xv,fParams);
            l++;
         }
      }
   }
   fSave[nsave+0] = xmin;
   fSave[nsave+1] = xmax;
   fSave[nsave+2] = ymin;
   fSave[nsave+3] = ymax;
   fSave[nsave+4] = zmin;
   fSave[nsave+5] = zmax;
   fSave[nsave+6] = fNpx;
   fSave[nsave+7] = fNpy;
   fSave[nsave+8] = fNpz;
}

//______________________________________________________________________________
void TF3::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
{
    // Save primitive as a C++ statement(s) on output stream out

   char quote = '"';
   out<<"   "<<endl;
   if (gROOT->ClassSaved(TF3::Class())) {
      out<<"   ";
   } else {
      out<<"   TF3 *";
   }
   if (!fMethodCall) {
      out<<GetName()<<" = new TF3("<<quote<<GetName()<<quote<<","<<quote<<GetTitle()<<quote<<","<<fXmin<<","<<fXmax<<","<<fYmin<<","<<fYmax<<","<<fZmin<<","<<fZmax<<");"<<endl;
   } else {
      out<<GetName()<<" = new TF3("<<quote<<GetName()<<quote<<","<<GetTitle()<<","<<fXmin<<","<<fXmax<<","<<fYmin<<","<<fYmax<<","<<fZmin<<","<<fZmax<<","<<GetNpar()<<");"<<endl;
   }

   if (GetFillColor() != 0) {
      if (GetFillColor() > 228) {
         TColor::SaveColor(out, GetFillColor());
         out<<"   "<<GetName()<<"->SetFillColor(ci);" << endl;
      } else 
         out<<"   "<<GetName()<<"->SetFillColor("<<GetFillColor()<<");"<<endl;
   }
   if (GetLineColor() != 1) {
      if (GetLineColor() > 228) {
         TColor::SaveColor(out, GetLineColor());
         out<<"   "<<GetName()<<"->SetLineColor(ci);" << endl;
      } else 
         out<<"   "<<GetName()<<"->SetLineColor("<<GetLineColor()<<");"<<endl;
   }
   if (GetNpz() != 100) {
      out<<"   "<<GetName()<<"->SetNpz("<<GetNpz()<<");"<<endl;
   }
   if (GetChisquare() != 0) {
      out<<"   "<<GetName()<<"->SetChisquare("<<GetChisquare()<<");"<<endl;
   }
   Double_t parmin, parmax;
   for (Int_t i=0;i<fNpar;i++) {
      out<<"   "<<GetName()<<"->SetParameter("<<i<<","<<GetParameter(i)<<");"<<endl;
      out<<"   "<<GetName()<<"->SetParError("<<i<<","<<GetParError(i)<<");"<<endl;
      GetParLimits(i,parmin,parmax);
      out<<"   "<<GetName()<<"->SetParLimits("<<i<<","<<parmin<<","<<parmax<<");"<<endl;
   }
   out<<"   "<<GetName()<<"->Draw("
      <<quote<<option<<quote<<");"<<endl;
}

//______________________________________________________________________________
void TF3::SetClippingBoxOn(Double_t xclip, Double_t yclip, Double_t zclip)
{
   // Set the function clipping box (for drawing) "on" and define the clipping box.
   // xclip, yclip and zclip is a point within the function range. All the
   // function values having x<=xclip and y<=yclip and z>=zclip are clipped.
   
   if (!fHistogram) {
      fHistogram = new TH3F("R__TF3",(char*)GetTitle(),fNpx,fXmin,fXmax
                                                    ,fNpy,fYmin,fYmax
                                                    ,fNpz,fZmin,fZmax);
      fHistogram->SetDirectory(0);
   }
   
   TVectorD v(3);
   v(0) = xclip;
   v(1) = yclip;
   v(2) = zclip;
   fHistogram->GetPainter()->ProcessMessage("SetF3ClippingBoxOn",&v);
}

//______________________________________________________________________________
void TF3::SetNpz(Int_t npz)
{
// Set the number of points used to draw the function
//
// The default number of points along x is 30 for 2-d/3-d functions.
// You can increase this value to get a better resolution when drawing
// pictures with sharp peaks or to get a better result when using TF3::GetRandom2   
// the minimum number of points is 4, the maximum is 10000 for 2-d/3-d functions

   if (npz < 4) {
      Warning("SetNpz","Number of points must be >=4 && <= 10000, fNpz set to 4");
      fNpz = 4;
   } else if(npz > 10000) {
      Warning("SetNpz","Number of points must be >=4 && <= 10000, fNpz set to 10000");
      fNpz = 10000;
   } else {
      fNpz = npz;
   }
   Update();
}

//______________________________________________________________________________
void TF3::SetRange(Double_t xmin, Double_t ymin, Double_t zmin, Double_t xmax, Double_t ymax, Double_t zmax)
{
//*-*-*-*-*-*Initialize the upper and lower bounds to draw the function*-*-*-*
//*-*        ==========================================================

   fXmin = xmin;
   fXmax = xmax;
   fYmin = ymin;
   fYmax = ymax;
   fZmin = zmin;
   fZmax = zmax;
   Update();
}

//______________________________________________________________________________
void TF3::Streamer(TBuffer &R__b)
{
   // Stream an object of class TF3.

   if (R__b.IsReading()) {
      UInt_t R__s, R__c;
      Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
      if (R__v > 0) {
         R__b.ReadClassBuffer(TF3::Class(), this, R__v, R__s, R__c);
         return;
      }

   } else {
      Int_t saved = 0;
      if (fType > 0 && fNsave <= 0) { saved = 1; Save(fXmin,fXmax,fYmin,fYmax,fZmin,fZmax);}

      R__b.WriteClassBuffer(TF3::Class(),this);

      if (saved) {delete [] fSave; fSave = 0; fNsave = 0;}
   }
}

//______________________________________________________________________________
Double_t TF3::Moment3(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t nz, Double_t az, Double_t bz, Double_t epsilon)
{
// Return x^nx * y^ny * z^nz moment of a 3d function in range [ax,bx],[ay,by],[az,bz]
//   Author: Gene Van Buren <gene@bnl.gov>

   Double_t norm = Integral(ax,bx,ay,by,az,bz,epsilon);
   if (norm == 0) {
      Error("Moment3", "Integral zero over range");
      return 0;
   }

   TF3 fnc("TF3_ExpValHelper",Form("%s*pow(x,%f)*pow(y,%f)*pow(z,%f)",GetName(),nx,ny,nz));
   return fnc.Integral(ax,bx,ay,by,az,bz,epsilon)/norm;
}

//______________________________________________________________________________
Double_t TF3::CentralMoment3(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t nz, Double_t az, Double_t bz, Double_t epsilon)
{
// Return x^nx * y^ny * z^nz central moment of a 3d function in range [ax,bx],[ay,by],[az,bz]
//   Author: Gene Van Buren <gene@bnl.gov>
   
   Double_t norm = Integral(ax,bx,ay,by,az,bz,epsilon);
   if (norm == 0) {
      Error("CentralMoment3", "Integral zero over range");
      return 0;
   }

   Double_t xbar = 0;
   Double_t ybar = 0;
   Double_t zbar = 0;
   if (nx!=0) {
      TF3 fncx("TF3_ExpValHelperx",Form("%s*x",GetName()));
      xbar = fncx.Integral(ax,bx,ay,by,az,bz,epsilon)/norm;
   }
   if (ny!=0) {
      TF3 fncy("TF3_ExpValHelpery",Form("%s*y",GetName()));
      ybar = fncy.Integral(ax,bx,ay,by,az,bz,epsilon)/norm;
   }
   if (nz!=0) {
      TF3 fncz("TF3_ExpValHelperz",Form("%s*z",GetName()));
      zbar = fncz.Integral(ax,bx,ay,by,az,bz,epsilon)/norm;
   }
   TF3 fnc("TF3_ExpValHelper",Form("%s*pow(x-%f,%f)*pow(y-%f,%f)*pow(z-%f,%f)",GetName(),xbar,nx,ybar,ny,zbar,nz));
   return fnc.Integral(ax,bx,ay,by,az,bz,epsilon)/norm;
}

 TF3.cxx:1
 TF3.cxx:2
 TF3.cxx:3
 TF3.cxx:4
 TF3.cxx:5
 TF3.cxx:6
 TF3.cxx:7
 TF3.cxx:8
 TF3.cxx:9
 TF3.cxx:10
 TF3.cxx:11
 TF3.cxx:12
 TF3.cxx:13
 TF3.cxx:14
 TF3.cxx:15
 TF3.cxx:16
 TF3.cxx:17
 TF3.cxx:18
 TF3.cxx:19
 TF3.cxx:20
 TF3.cxx:21
 TF3.cxx:22
 TF3.cxx:23
 TF3.cxx:24
 TF3.cxx:25
 TF3.cxx:26
 TF3.cxx:27
 TF3.cxx:28
 TF3.cxx:29
 TF3.cxx:30
 TF3.cxx:31
 TF3.cxx:32
 TF3.cxx:33
 TF3.cxx:34
 TF3.cxx:35
 TF3.cxx:36
 TF3.cxx:37
 TF3.cxx:38
 TF3.cxx:39
 TF3.cxx:40
 TF3.cxx:41
 TF3.cxx:42
 TF3.cxx:43
 TF3.cxx:44
 TF3.cxx:45
 TF3.cxx:46
 TF3.cxx:47
 TF3.cxx:48
 TF3.cxx:49
 TF3.cxx:50
 TF3.cxx:51
 TF3.cxx:52
 TF3.cxx:53
 TF3.cxx:54
 TF3.cxx:55
 TF3.cxx:56
 TF3.cxx:57
 TF3.cxx:58
 TF3.cxx:59
 TF3.cxx:60
 TF3.cxx:61
 TF3.cxx:62
 TF3.cxx:63
 TF3.cxx:64
 TF3.cxx:65
 TF3.cxx:66
 TF3.cxx:67
 TF3.cxx:68
 TF3.cxx:69
 TF3.cxx:70
 TF3.cxx:71
 TF3.cxx:72
 TF3.cxx:73
 TF3.cxx:74
 TF3.cxx:75
 TF3.cxx:76
 TF3.cxx:77
 TF3.cxx:78
 TF3.cxx:79
 TF3.cxx:80
 TF3.cxx:81
 TF3.cxx:82
 TF3.cxx:83
 TF3.cxx:84
 TF3.cxx:85
 TF3.cxx:86
 TF3.cxx:87
 TF3.cxx:88
 TF3.cxx:89
 TF3.cxx:90
 TF3.cxx:91
 TF3.cxx:92
 TF3.cxx:93
 TF3.cxx:94
 TF3.cxx:95
 TF3.cxx:96
 TF3.cxx:97
 TF3.cxx:98
 TF3.cxx:99
 TF3.cxx:100
 TF3.cxx:101
 TF3.cxx:102
 TF3.cxx:103
 TF3.cxx:104
 TF3.cxx:105
 TF3.cxx:106
 TF3.cxx:107
 TF3.cxx:108
 TF3.cxx:109
 TF3.cxx:110
 TF3.cxx:111
 TF3.cxx:112
 TF3.cxx:113
 TF3.cxx:114
 TF3.cxx:115
 TF3.cxx:116
 TF3.cxx:117
 TF3.cxx:118
 TF3.cxx:119
 TF3.cxx:120
 TF3.cxx:121
 TF3.cxx:122
 TF3.cxx:123
 TF3.cxx:124
 TF3.cxx:125
 TF3.cxx:126
 TF3.cxx:127
 TF3.cxx:128
 TF3.cxx:129
 TF3.cxx:130
 TF3.cxx:131
 TF3.cxx:132
 TF3.cxx:133
 TF3.cxx:134
 TF3.cxx:135
 TF3.cxx:136
 TF3.cxx:137
 TF3.cxx:138
 TF3.cxx:139
 TF3.cxx:140
 TF3.cxx:141
 TF3.cxx:142
 TF3.cxx:143
 TF3.cxx:144
 TF3.cxx:145
 TF3.cxx:146
 TF3.cxx:147
 TF3.cxx:148
 TF3.cxx:149
 TF3.cxx:150
 TF3.cxx:151
 TF3.cxx:152
 TF3.cxx:153
 TF3.cxx:154
 TF3.cxx:155
 TF3.cxx:156
 TF3.cxx:157
 TF3.cxx:158
 TF3.cxx:159
 TF3.cxx:160
 TF3.cxx:161
 TF3.cxx:162
 TF3.cxx:163
 TF3.cxx:164
 TF3.cxx:165
 TF3.cxx:166
 TF3.cxx:167
 TF3.cxx:168
 TF3.cxx:169
 TF3.cxx:170
 TF3.cxx:171
 TF3.cxx:172
 TF3.cxx:173
 TF3.cxx:174
 TF3.cxx:175
 TF3.cxx:176
 TF3.cxx:177
 TF3.cxx:178
 TF3.cxx:179
 TF3.cxx:180
 TF3.cxx:181
 TF3.cxx:182
 TF3.cxx:183
 TF3.cxx:184
 TF3.cxx:185
 TF3.cxx:186
 TF3.cxx:187
 TF3.cxx:188
 TF3.cxx:189
 TF3.cxx:190
 TF3.cxx:191
 TF3.cxx:192
 TF3.cxx:193
 TF3.cxx:194
 TF3.cxx:195
 TF3.cxx:196
 TF3.cxx:197
 TF3.cxx:198
 TF3.cxx:199
 TF3.cxx:200
 TF3.cxx:201
 TF3.cxx:202
 TF3.cxx:203
 TF3.cxx:204
 TF3.cxx:205
 TF3.cxx:206
 TF3.cxx:207
 TF3.cxx:208
 TF3.cxx:209
 TF3.cxx:210
 TF3.cxx:211
 TF3.cxx:212
 TF3.cxx:213
 TF3.cxx:214
 TF3.cxx:215
 TF3.cxx:216
 TF3.cxx:217
 TF3.cxx:218
 TF3.cxx:219
 TF3.cxx:220
 TF3.cxx:221
 TF3.cxx:222
 TF3.cxx:223
 TF3.cxx:224
 TF3.cxx:225
 TF3.cxx:226
 TF3.cxx:227
 TF3.cxx:228
 TF3.cxx:229
 TF3.cxx:230
 TF3.cxx:231
 TF3.cxx:232
 TF3.cxx:233
 TF3.cxx:234
 TF3.cxx:235
 TF3.cxx:236
 TF3.cxx:237
 TF3.cxx:238
 TF3.cxx:239
 TF3.cxx:240
 TF3.cxx:241
 TF3.cxx:242
 TF3.cxx:243
 TF3.cxx:244
 TF3.cxx:245
 TF3.cxx:246
 TF3.cxx:247
 TF3.cxx:248
 TF3.cxx:249
 TF3.cxx:250
 TF3.cxx:251
 TF3.cxx:252
 TF3.cxx:253
 TF3.cxx:254
 TF3.cxx:255
 TF3.cxx:256
 TF3.cxx:257
 TF3.cxx:258
 TF3.cxx:259
 TF3.cxx:260
 TF3.cxx:261
 TF3.cxx:262
 TF3.cxx:263
 TF3.cxx:264
 TF3.cxx:265
 TF3.cxx:266
 TF3.cxx:267
 TF3.cxx:268
 TF3.cxx:269
 TF3.cxx:270
 TF3.cxx:271
 TF3.cxx:272
 TF3.cxx:273
 TF3.cxx:274
 TF3.cxx:275
 TF3.cxx:276
 TF3.cxx:277
 TF3.cxx:278
 TF3.cxx:279
 TF3.cxx:280
 TF3.cxx:281
 TF3.cxx:282
 TF3.cxx:283
 TF3.cxx:284
 TF3.cxx:285
 TF3.cxx:286
 TF3.cxx:287
 TF3.cxx:288
 TF3.cxx:289
 TF3.cxx:290
 TF3.cxx:291
 TF3.cxx:292
 TF3.cxx:293
 TF3.cxx:294
 TF3.cxx:295
 TF3.cxx:296
 TF3.cxx:297
 TF3.cxx:298
 TF3.cxx:299
 TF3.cxx:300
 TF3.cxx:301
 TF3.cxx:302
 TF3.cxx:303
 TF3.cxx:304
 TF3.cxx:305
 TF3.cxx:306
 TF3.cxx:307
 TF3.cxx:308
 TF3.cxx:309
 TF3.cxx:310
 TF3.cxx:311
 TF3.cxx:312
 TF3.cxx:313
 TF3.cxx:314
 TF3.cxx:315
 TF3.cxx:316
 TF3.cxx:317
 TF3.cxx:318
 TF3.cxx:319
 TF3.cxx:320
 TF3.cxx:321
 TF3.cxx:322
 TF3.cxx:323
 TF3.cxx:324
 TF3.cxx:325
 TF3.cxx:326
 TF3.cxx:327
 TF3.cxx:328
 TF3.cxx:329
 TF3.cxx:330
 TF3.cxx:331
 TF3.cxx:332
 TF3.cxx:333
 TF3.cxx:334
 TF3.cxx:335
 TF3.cxx:336
 TF3.cxx:337
 TF3.cxx:338
 TF3.cxx:339
 TF3.cxx:340
 TF3.cxx:341
 TF3.cxx:342
 TF3.cxx:343
 TF3.cxx:344
 TF3.cxx:345
 TF3.cxx:346
 TF3.cxx:347
 TF3.cxx:348
 TF3.cxx:349
 TF3.cxx:350
 TF3.cxx:351
 TF3.cxx:352
 TF3.cxx:353
 TF3.cxx:354
 TF3.cxx:355
 TF3.cxx:356
 TF3.cxx:357
 TF3.cxx:358
 TF3.cxx:359
 TF3.cxx:360
 TF3.cxx:361
 TF3.cxx:362
 TF3.cxx:363
 TF3.cxx:364
 TF3.cxx:365
 TF3.cxx:366
 TF3.cxx:367
 TF3.cxx:368
 TF3.cxx:369
 TF3.cxx:370
 TF3.cxx:371
 TF3.cxx:372
 TF3.cxx:373
 TF3.cxx:374
 TF3.cxx:375
 TF3.cxx:376
 TF3.cxx:377
 TF3.cxx:378
 TF3.cxx:379
 TF3.cxx:380
 TF3.cxx:381
 TF3.cxx:382
 TF3.cxx:383
 TF3.cxx:384
 TF3.cxx:385
 TF3.cxx:386
 TF3.cxx:387
 TF3.cxx:388
 TF3.cxx:389
 TF3.cxx:390
 TF3.cxx:391
 TF3.cxx:392
 TF3.cxx:393
 TF3.cxx:394
 TF3.cxx:395
 TF3.cxx:396
 TF3.cxx:397
 TF3.cxx:398
 TF3.cxx:399
 TF3.cxx:400
 TF3.cxx:401
 TF3.cxx:402
 TF3.cxx:403
 TF3.cxx:404
 TF3.cxx:405
 TF3.cxx:406
 TF3.cxx:407
 TF3.cxx:408
 TF3.cxx:409
 TF3.cxx:410
 TF3.cxx:411
 TF3.cxx:412
 TF3.cxx:413
 TF3.cxx:414
 TF3.cxx:415
 TF3.cxx:416
 TF3.cxx:417
 TF3.cxx:418
 TF3.cxx:419
 TF3.cxx:420
 TF3.cxx:421
 TF3.cxx:422
 TF3.cxx:423
 TF3.cxx:424
 TF3.cxx:425
 TF3.cxx:426
 TF3.cxx:427
 TF3.cxx:428
 TF3.cxx:429
 TF3.cxx:430
 TF3.cxx:431
 TF3.cxx:432
 TF3.cxx:433
 TF3.cxx:434
 TF3.cxx:435
 TF3.cxx:436
 TF3.cxx:437
 TF3.cxx:438
 TF3.cxx:439
 TF3.cxx:440
 TF3.cxx:441
 TF3.cxx:442
 TF3.cxx:443
 TF3.cxx:444
 TF3.cxx:445
 TF3.cxx:446
 TF3.cxx:447
 TF3.cxx:448
 TF3.cxx:449
 TF3.cxx:450
 TF3.cxx:451
 TF3.cxx:452
 TF3.cxx:453
 TF3.cxx:454
 TF3.cxx:455
 TF3.cxx:456
 TF3.cxx:457
 TF3.cxx:458
 TF3.cxx:459
 TF3.cxx:460
 TF3.cxx:461
 TF3.cxx:462
 TF3.cxx:463
 TF3.cxx:464
 TF3.cxx:465
 TF3.cxx:466
 TF3.cxx:467
 TF3.cxx:468
 TF3.cxx:469
 TF3.cxx:470
 TF3.cxx:471
 TF3.cxx:472
 TF3.cxx:473
 TF3.cxx:474
 TF3.cxx:475
 TF3.cxx:476
 TF3.cxx:477
 TF3.cxx:478
 TF3.cxx:479
 TF3.cxx:480
 TF3.cxx:481
 TF3.cxx:482
 TF3.cxx:483
 TF3.cxx:484
 TF3.cxx:485
 TF3.cxx:486
 TF3.cxx:487
 TF3.cxx:488
 TF3.cxx:489
 TF3.cxx:490
 TF3.cxx:491
 TF3.cxx:492
 TF3.cxx:493
 TF3.cxx:494
 TF3.cxx:495
 TF3.cxx:496
 TF3.cxx:497
 TF3.cxx:498
 TF3.cxx:499
 TF3.cxx:500
 TF3.cxx:501
 TF3.cxx:502
 TF3.cxx:503
 TF3.cxx:504
 TF3.cxx:505
 TF3.cxx:506
 TF3.cxx:507
 TF3.cxx:508
 TF3.cxx:509
 TF3.cxx:510
 TF3.cxx:511
 TF3.cxx:512
 TF3.cxx:513
 TF3.cxx:514
 TF3.cxx:515
 TF3.cxx:516
 TF3.cxx:517
 TF3.cxx:518
 TF3.cxx:519
 TF3.cxx:520
 TF3.cxx:521
 TF3.cxx:522
 TF3.cxx:523
 TF3.cxx:524
 TF3.cxx:525
 TF3.cxx:526
 TF3.cxx:527
 TF3.cxx:528
 TF3.cxx:529
 TF3.cxx:530
 TF3.cxx:531
 TF3.cxx:532
 TF3.cxx:533
 TF3.cxx:534
 TF3.cxx:535
 TF3.cxx:536
 TF3.cxx:537
 TF3.cxx:538
 TF3.cxx:539
 TF3.cxx:540
 TF3.cxx:541
 TF3.cxx:542
 TF3.cxx:543
 TF3.cxx:544
 TF3.cxx:545
 TF3.cxx:546
 TF3.cxx:547
 TF3.cxx:548
 TF3.cxx:549
 TF3.cxx:550
 TF3.cxx:551
 TF3.cxx:552
 TF3.cxx:553
 TF3.cxx:554
 TF3.cxx:555
 TF3.cxx:556
 TF3.cxx:557
 TF3.cxx:558
 TF3.cxx:559
 TF3.cxx:560
 TF3.cxx:561
 TF3.cxx:562
 TF3.cxx:563
 TF3.cxx:564
 TF3.cxx:565
 TF3.cxx:566
 TF3.cxx:567
 TF3.cxx:568
 TF3.cxx:569
 TF3.cxx:570
 TF3.cxx:571
 TF3.cxx:572
 TF3.cxx:573
 TF3.cxx:574
 TF3.cxx:575
 TF3.cxx:576
 TF3.cxx:577
 TF3.cxx:578
 TF3.cxx:579
 TF3.cxx:580
 TF3.cxx:581
 TF3.cxx:582
 TF3.cxx:583
 TF3.cxx:584
 TF3.cxx:585
 TF3.cxx:586
 TF3.cxx:587
 TF3.cxx:588
 TF3.cxx:589
 TF3.cxx:590
 TF3.cxx:591
 TF3.cxx:592
 TF3.cxx:593
 TF3.cxx:594
 TF3.cxx:595
 TF3.cxx:596
 TF3.cxx:597
 TF3.cxx:598
 TF3.cxx:599
 TF3.cxx:600
 TF3.cxx:601
 TF3.cxx:602
 TF3.cxx:603
 TF3.cxx:604
 TF3.cxx:605
 TF3.cxx:606
 TF3.cxx:607
 TF3.cxx:608
 TF3.cxx:609
 TF3.cxx:610
 TF3.cxx:611
 TF3.cxx:612
 TF3.cxx:613
 TF3.cxx:614
 TF3.cxx:615
 TF3.cxx:616
 TF3.cxx:617
 TF3.cxx:618
 TF3.cxx:619
 TF3.cxx:620
 TF3.cxx:621
 TF3.cxx:622
 TF3.cxx:623
 TF3.cxx:624
 TF3.cxx:625
 TF3.cxx:626
 TF3.cxx:627
 TF3.cxx:628
 TF3.cxx:629
 TF3.cxx:630
 TF3.cxx:631
 TF3.cxx:632
 TF3.cxx:633
 TF3.cxx:634
 TF3.cxx:635
 TF3.cxx:636
 TF3.cxx:637
 TF3.cxx:638
 TF3.cxx:639
 TF3.cxx:640
 TF3.cxx:641
 TF3.cxx:642
 TF3.cxx:643
 TF3.cxx:644
 TF3.cxx:645
 TF3.cxx:646
 TF3.cxx:647
 TF3.cxx:648
 TF3.cxx:649
 TF3.cxx:650
 TF3.cxx:651
 TF3.cxx:652
 TF3.cxx:653
 TF3.cxx:654
 TF3.cxx:655
 TF3.cxx:656
 TF3.cxx:657
 TF3.cxx:658
 TF3.cxx:659
 TF3.cxx:660
 TF3.cxx:661
 TF3.cxx:662
 TF3.cxx:663
 TF3.cxx:664
 TF3.cxx:665
 TF3.cxx:666
 TF3.cxx:667
 TF3.cxx:668
 TF3.cxx:669
 TF3.cxx:670
 TF3.cxx:671
 TF3.cxx:672
 TF3.cxx:673
 TF3.cxx:674
 TF3.cxx:675
 TF3.cxx:676
 TF3.cxx:677
 TF3.cxx:678
 TF3.cxx:679
 TF3.cxx:680
 TF3.cxx:681
 TF3.cxx:682
 TF3.cxx:683
 TF3.cxx:684
 TF3.cxx:685
 TF3.cxx:686
 TF3.cxx:687
 TF3.cxx:688
 TF3.cxx:689
 TF3.cxx:690
 TF3.cxx:691
 TF3.cxx:692
 TF3.cxx:693
 TF3.cxx:694
 TF3.cxx:695
 TF3.cxx:696
 TF3.cxx:697
 TF3.cxx:698
 TF3.cxx:699
 TF3.cxx:700
 TF3.cxx:701
 TF3.cxx:702
 TF3.cxx:703
 TF3.cxx:704
 TF3.cxx:705
 TF3.cxx:706
 TF3.cxx:707
 TF3.cxx:708
 TF3.cxx:709
 TF3.cxx:710
 TF3.cxx:711
 TF3.cxx:712
 TF3.cxx:713
 TF3.cxx:714
 TF3.cxx:715
 TF3.cxx:716
 TF3.cxx:717
 TF3.cxx:718
 TF3.cxx:719
 TF3.cxx:720
 TF3.cxx:721
 TF3.cxx:722
 TF3.cxx:723
 TF3.cxx:724
 TF3.cxx:725
 TF3.cxx:726
 TF3.cxx:727
 TF3.cxx:728
 TF3.cxx:729
 TF3.cxx:730
 TF3.cxx:731
 TF3.cxx:732
 TF3.cxx:733
 TF3.cxx:734
 TF3.cxx:735
 TF3.cxx:736
 TF3.cxx:737
 TF3.cxx:738
 TF3.cxx:739
 TF3.cxx:740
 TF3.cxx:741
 TF3.cxx:742
 TF3.cxx:743
 TF3.cxx:744
 TF3.cxx:745
 TF3.cxx:746
 TF3.cxx:747
 TF3.cxx:748
 TF3.cxx:749
 TF3.cxx:750
 TF3.cxx:751
 TF3.cxx:752
 TF3.cxx:753
 TF3.cxx:754
 TF3.cxx:755
 TF3.cxx:756
 TF3.cxx:757
 TF3.cxx:758
 TF3.cxx:759
 TF3.cxx:760
 TF3.cxx:761
 TF3.cxx:762
 TF3.cxx:763
 TF3.cxx:764
 TF3.cxx:765
 TF3.cxx:766
 TF3.cxx:767
 TF3.cxx:768
 TF3.cxx:769
 TF3.cxx:770
 TF3.cxx:771
 TF3.cxx:772
 TF3.cxx:773
 TF3.cxx:774
 TF3.cxx:775
 TF3.cxx:776
 TF3.cxx:777
 TF3.cxx:778
 TF3.cxx:779
 TF3.cxx:780
 TF3.cxx:781
 TF3.cxx:782
 TF3.cxx:783
 TF3.cxx:784
 TF3.cxx:785
 TF3.cxx:786
 TF3.cxx:787
 TF3.cxx:788
 TF3.cxx:789
 TF3.cxx:790
 TF3.cxx:791
 TF3.cxx:792
 TF3.cxx:793
 TF3.cxx:794
 TF3.cxx:795
 TF3.cxx:796
 TF3.cxx:797
 TF3.cxx:798
 TF3.cxx:799
 TF3.cxx:800
 TF3.cxx:801
 TF3.cxx:802
 TF3.cxx:803
 TF3.cxx:804
 TF3.cxx:805
 TF3.cxx:806
 TF3.cxx:807
 TF3.cxx:808
 TF3.cxx:809
 TF3.cxx:810
 TF3.cxx:811
 TF3.cxx:812
 TF3.cxx:813
 TF3.cxx:814
 TF3.cxx:815
 TF3.cxx:816
 TF3.cxx:817
 TF3.cxx:818
 TF3.cxx:819
 TF3.cxx:820
 TF3.cxx:821
 TF3.cxx:822
 TF3.cxx:823
 TF3.cxx:824
 TF3.cxx:825
 TF3.cxx:826
 TF3.cxx:827
 TF3.cxx:828
 TF3.cxx:829
 TF3.cxx:830