DAS  3.0
Das Analysis System
Polynomial< T, Log, Exp >

Description

template<double(*)(double, int) T = Basis::Chebyshev, double(*)(double) Log = identity, double(*)(double) Exp = identity>
struct Step::Polynomial< T, Log, Exp >

A class to define a polynomial of a certain degree.

mi(n) and ma(x) arguments are used to transform the variable into [-1,1]

#include <Step.h>

+ Inheritance diagram for Polynomial< T, Log, Exp >:
+ Collaboration diagram for Polynomial< T, Log, Exp >:

Public Member Functions

 Polynomial (unsigned int d, double mi, double Ma, std::ostream &Stream=std::cout)
 
virtual ~Polynomial ()=default
 
double operator() (const double *x, const double *p) const override
 

Additional Inherited Members

- Public Attributes inherited from FunctionalForm
unsigned int npars
 
const double m
 
const double M
 
std::ostream & stream
 
- Protected Member Functions inherited from FunctionalForm
 FunctionalForm (const char *classname, unsigned int Npars, double mi, double Ma, std::ostream &Stream=std::cout)
 
virtual ~FunctionalForm ()=default
 

Constructor & Destructor Documentation

◆ Polynomial()

Polynomial ( unsigned int  d,
double  mi,
double  Ma,
std::ostream &  Stream = std::cout 
)
inline

Constructor.

258  :
259  FunctionalForm(__func__, d+1, mi, Ma, Stream) { }

◆ ~Polynomial()

virtual ~Polynomial ( )
virtualdefault

Member Function Documentation

◆ operator()()

double operator() ( const double *  x,
const double *  p 
) const
inlineoverridevirtual

operator overloading for the functor to be used with ROOT TF1

Implements FunctionalForm.

266  {
267  double nx = -1 + 2* (Log(*x) - Log(m)) / (Log(M) - Log(m));
268  double result = 0;
269  for (unsigned int i = 0; i < npars; ++i)
270  result += p[i]*T(nx,i);
271  return Exp(result);
272  }

The documentation for this struct was generated from the following file:
Ntupliser_cfg.p
p
Definition: Ntupliser_cfg.py:358
Step::FunctionalForm::m
const double m
lower edge
Definition: Step.h:195
Step::FunctionalForm::FunctionalForm
FunctionalForm(const char *classname, unsigned int Npars, double mi, double Ma, std::ostream &Stream=std::cout)
Constructor.
Definition: Step.h:203
Step::FunctionalForm::npars
unsigned int npars
number of parameters
Definition: Step.h:194
Step::FunctionalForm::M
const double M
upper edge
Definition: Step.h:196