5 void TF1F::Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax) {
6 fXmin = xmin; fXmax = xmax; fStep = 20, fdX = 1./fStep; fNpx = TMath::Nint((fXmax - fXmin)/fdX);
7 TF1::Save(xmin,xmax,ymin,ymax,zmin,zmax);
10 Double_t TF1F::GetSaveL(Double_t *xx) {
12 if (xx[0] < fXmin || xx[0] > fXmax || fdX <= 0)
return 0.;
13 Int_t bin = TMath::Nint((xx[0]-fXmin)/fdX);
17 Double_t xlow = fXmin + bin*fdX;
18 Double_t xup = xlow + fdX;
19 Double_t ylow = fSave[bin];
20 Double_t yup = fSave[bin+1];
21 Double_t y = ((xup*ylow-xlow*yup) + xx[0]*(yup-ylow))/fdX;
26 Double_t TF1F::GetSaveL(Int_t N, Double_t x, Double_t *y) {
29 Int_t bin = TMath::Nint((x-fXmin)/fdX);
31 while (bin < 0) {i1++; bin += fStep;}
32 for (Int_t i = i1; i < N && bin < GetNpx() - 3; i++, bin += fStep) {
38 Double_t TF1F::GetSaveL(Int_t N, Double_t *x, Double_t *y) {
40 memset(y, 0, N*
sizeof(Double_t));
41 if (GetNpx() <= 0)
return 0.;
42 for (Int_t i = 0; i < N; i++) {
44 Int_t bin = Int_t((x[i]-fXmin)/fdX);
45 if (bin < GetNpx() - 3) y[i] = fSave[bin];
50 #if ROOT_VERSION_CODE >= 393216
51 TF1F::TF1F(): TF1(){fNpx = 200;}
52 TF1F::TF1F(
const char *name,
const char *formula, Double_t xmin, Double_t xmax)
53 :TF1(name,formula,xmax,xmin) {fNpx = 200;}
54 TF1F::TF1F(
const char *name, Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin, Double_t xmax, Int_t npar, Int_t ndim)
55 : TF1(name, fcn, xmin, xmax, npar,ndim) {fNpx = 200;}
57 TF1F::TF1F(
const char *name, ROOT::Math::ParamFunctor f, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, Int_t ndim)
58 : TF1(name, f, xmin, xmax, npar,ndim) {fNpx = 200;}