2 // Small linear mesh to substitute the array from PData
17 #include "TVirtualPad.h"
22 PMesh::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];
65 if ((node >=
size) || (node < 0))
return;
70 if ((node >=
size) || (node < 0))
return 0;
75 cout <<
"Min: " <<
min << endl;
76 cout <<
"Max: " <<
max << endl;
77 cout <<
"Size: " <<
size << endl;
85 int bin = int((
m -
min) / dm);
87 double mlow =
min + bin * dm, mup = mlow + dm, wlow =
td[bin],
89 return ((mup * wlow - mlow * wup) +
m * (wup - wlow)) / dm;