35  inline Double_t f1(
const Double_t x)
 
   37    return TMath::Gaus(x, 0.0, 1.0, kTRUE);
 
   47  inline Double_t 
g1(
const Double_t x)
 
   59  inline Double_t 
G1(
const Double_t x)
 
   61    return 0.5 * (1.0 + TMath::Erf(sqrt(0.5)*x));
 
   68  template<
class JFunction1D_t>
 
   69  void test(
const char* title)
 
   76    const double xmin = -3.5;
 
   77    const double xmax = +3.5;
 
   86    TH1D f0(TString(
"f0[") +  title + 
"]", NULL, nx,  xmin, xmax);
 
   87    TH1D g0(TString(
"g0[") +  title + 
"]", NULL, nx,  xmin, xmax);
 
   88    TH1D G0(TString(
"G0[") +  title + 
"]", NULL, nx,  xmin, xmax);
 
   90    for (
int i = 1; i <= f0.GetNbinsX(); ++i) {
 
   92      const Double_t x = f0.GetBinCenter(i);
 
   96        const typename JFunction1D_t::result_type result = buffer(x);
 
   98        f0.SetBinContent(i, result.f);
 
   99        g0.SetBinContent(i, result.fp);
 
  100        G0.SetBinContent(i, result.v);
 
  102      catch(
const std::exception& error) {
 
  128    JParser<> zap(
"Example program to test interpolations for PDF.");
 
  137  catch(
const exception &error) {
 
  138    FATAL(error.what() << endl);
 
  145  const double xmin = -3.5;
 
  146  const double xmax = +3.5;
 
  148  TH1D f0(TString(
"f0[") + 
"true" + 
"]", NULL, nx,  xmin, xmax);
 
  149  TH1D g0(TString(
"g0[") + 
"true" + 
"]", NULL, nx,  xmin, xmax);
 
  150  TH1D G0(TString(
"G0[") + 
"true" + 
"]", NULL, nx,  xmin, xmax);
 
  152  for (
int i = 1; i <= f0.GetNbinsX(); ++i) {
 
  154    const Double_t x = f0.GetBinCenter(i);
 
  156    f0.SetBinContent(i, f1(x));
 
  157    g0.SetBinContent(i, 
g1(x));
 
  158    G0.SetBinContent(i, 
G1(x));
 
  166    test<JFunction1D_t>(
"Polint");
 
  172    test<JFunction1D_t>(
"Spline");
 
 
General purpose messaging.
 
Utility class to parse command line options.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Auxiliary classes for numerical integration.
 
Double_t g1(const Double_t x)
Function.
 
Double_t G1(const Double_t x)
Integral of method g1.
 
int main(int argc, char **argv)
 
Utility class to parse command line options.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).