69 lambda(
"lambda",
"lambda",this,_lambda),
72 fHasIssuedConvWarning(false),
73 fHasIssuedSumWarning(false)
75 ccoutD(InputArguments) <<
"RooNonCentralChiSquare::ctor(" <<
GetName() <<
76 "MathMore Available, will use Bessel function expressions unless SetForceSum(true) "<< endl ;
86 lambda(
"lambda",this,other.lambda),
87 fErrorTol(other.fErrorTol),
88 fMaxIters(other.fMaxIters),
89 fHasIssuedConvWarning(false),
90 fHasIssuedSumWarning(false)
92 ccoutD(InputArguments) <<
"RooNonCentralChiSquare::ctor(" <<
GetName() <<
93 "MathMore Available, will use Bessel function expressions unless SetForceSum(true) "<< endl ;
134 coutI(InputArguments) <<
"RooNonCentralChiSquare sum being forced" << endl ;
146 for(
int i = iDominant; ; ++i){
150 if(ithTerm/
sum < errorTol)
153 if( i>iDominant+MaxIters){
156 coutW(Eval) <<
"RooNonCentralChiSquare did not converge: for x=" <<
x <<
" k="<<
k
157 <<
", lambda="<<
lambda <<
" fractional error = " << ithTerm/
sum
158 <<
"\n either adjust tolerance with SetErrorTolerance(tol) or max_iter with SetMaxIter(max_it)"
165 for(
int i = iDominant - 1; i >= 0; --i){
218 for(
int i = iDominant; ; ++i){
224 if(ithTerm/
sum < errorTol)
227 if( i>iDominant+MaxIters){
230 coutW(Eval) <<
"RooNonCentralChiSquare Normalization did not converge: for k="<<
k
231 <<
", lambda="<<
lambda <<
" fractional error = " << ithTerm/
sum
232 <<
"\n either adjust tolerance with SetErrorTolerance(tol) or max_iter with SetMaxIter(max_it)"
239 for(
int i = iDominant - 1; i >= 0; --i){
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
bool matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
RooArgSet is a container object that can hold multiple RooAbsArg objects.
The PDF of the Non-Central Chi Square distribution for n degrees of freedom.
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
double max(const char *rname=nullptr) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
double min(const char *rname=nullptr) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
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 Floor(Double_t x)
Rounds x downward, returning the largest integral value that is not greater than x.
Double_t Gamma(Double_t z)
Computation of gamma(z) for all z.
static uint64_t sum(uint64_t i)