64 x(
"x",
"x", this, _x),
65 k(
"k",
"k", this, _k),
66 lambda(
"lambda",
"lambda", this, _lambda),
73 ccoutD(InputArguments) <<
"RooNonCentralChiSquare::ctor(" <<
GetName() <<
74 "MathMore Available, will use Bessel function expressions unless SetForceSum(true) "<< std::endl ;
81 x(
"x", this, other.
x),
82 k(
"k", this, other.
k),
90 ccoutD(InputArguments) <<
"RooNonCentralChiSquare::ctor(" <<
GetName() <<
91 "MathMore Available, will use Bessel function expressions unless SetForceSum(true) "<< std::endl ;
109 double xmin =
x.min();
110 double xmax =
x.max();
131 coutI(InputArguments) <<
"RooNonCentralChiSquare sum being forced" << std::endl ;
138 int iDominant = (
int) std::floor(
lambda/2);
143 for(
int i = iDominant; ; ++i){
147 if(ithTerm/
sum < errorTol)
150 if( i>iDominant+MaxIters){
153 coutW(Eval) <<
"RooNonCentralChiSquare did not converge: for x=" <<
x <<
" k="<<
k
154 <<
", lambda="<<
lambda <<
" fractional error = " << ithTerm/
sum
155 <<
"\n either adjust tolerance with SetErrorTolerance(tol) or max_iter with SetMaxIter(max_it)"
162 for(
int i = iDominant - 1; i >= 0; --i){
191 double xmin =
x.min(rangeName);
192 double xmax =
x.max(rangeName);
212 int iDominant = (
int) std::floor(
lambda/2);
215 for(
int i = iDominant; ; ++i){
221 if(ithTerm/
sum < errorTol)
224 if( i>iDominant+MaxIters){
227 coutW(Eval) <<
"RooNonCentralChiSquare Normalization did not converge: for k="<<
k
228 <<
", lambda="<<
lambda <<
" fractional error = " << ithTerm/
sum
229 <<
"\n either adjust tolerance with SetErrorTolerance(tol) or max_iter with SetMaxIter(max_it)"
236 for(
int i = iDominant - 1; i >= 0; --i){
int Int_t
Signed integer 4 bytes (int).
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
RooAbsPdf()
Default constructor.
bool matchArgs(const RooArgSet &allDeps, RooArgSet &analDeps, const RooArgProxy &a, const Proxies &... proxies) const
RooArgSet is a container object that can hold multiple RooAbsArg objects.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
bool fHasIssuedConvWarning
void SetForceSum(bool flag)
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
bool fHasIssuedSumWarning
const char * GetName() const override
Returns name of object.
double chisquared_pdf(double x, double r, double x0=0)
Probability density function of the distribution with degrees of freedom.
double noncentral_chisquared_pdf(double x, double r, double lambda)
Probability density function of the non central distribution with degrees of freedom and the noon-c...
double chisquared_cdf(double x, double r, double x0=0)
Cumulative distribution function of the distribution with degrees of freedom (lower tail).
Double_t Gamma(Double_t z)
Computation of gamma(z) for all z.
static uint64_t sum(uint64_t i)