15#include "TVirtualPad.h"
21PMesh::PMesh(Int_t psize,
const Char_t* name) : TF1(name,
"0", 0, 1)
32#if (ROOT_VERSION_CODE >= ROOT_VERSION(6, 12, 0))
33 fType =
static_cast<TF1::EFType
>(0);
42 cout <<
"PMesh::PMesh: size " << psize <<
" not allowed" << endl;
45 td =
new Double_t[psize];
62 if ((node >=
size) || (node < 0))
return;
68 if ((node >=
size) || (node < 0))
return 0;
74 cout <<
"Min: " << min << endl;
75 cout <<
"Max: " << max << endl;
76 cout <<
"Size: " <<
size << endl;
82 if ((m > min) && (m < max)) {
83 Double_t dm = (max -
min) / (
size - 1.);
85 int bin = int((m - min) / dm);
87 double mlow = min + bin * dm, mup = mlow + dm, wlow =
td[bin], wup =
td[bin + 1];
88 return ((mup * wlow - mlow * wup) + m * (wup - wlow)) / dm;
Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Double_t GetNode(Int_t node)
void SetNode(Int_t node, Double_t v)
void Print(const Option_t *) const
PMesh(Int_t size, const Char_t *name)
Double_t GetLinearIP(Double_t m) const
Double_t EvalPar(const Double_t *x, const Double_t *params)