66 lambda("lambda","lambda",this,_lambda),
69 fHasIssuedConvWarning(
false),
70 fHasIssuedSumWarning(false)
72 #ifdef R__HAS_MATHMORE
74 "MathMore Available, will use Bessel function expressions unless SetForceSum(true) "<< endl ;
85 lambda(
"lambda",this,other.lambda),
86 fErrorTol(other.fErrorTol),
87 fMaxIters(other.fMaxIters),
88 fHasIssuedConvWarning(
false),
89 fHasIssuedSumWarning(
false)
91 #ifdef R__HAS_MATHMORE
93 "MathMore Available, will use Bessel function expressions unless SetForceSum(true) "<< endl ;
103 #ifndef R__HAS_MATHMORE
106 "MathMore is not available- ForceSum must be on "<< endl ;
128 _x = xmin + 1e-3*(xmax-
xmin);
155 for(
int i = iDominant; ; ++i){
159 if(ithTerm/sum < errorTol)
162 if( i>iDominant+MaxIters){
165 coutW(
Eval) <<
"RooNonCentralChiSquare did not converge: for x=" <<
x <<
" k="<<
k
166 <<
", lambda="<<
lambda <<
" fractional error = " << ithTerm/sum
167 <<
"\n either adjust tolerance with SetErrorTolerance(tol) or max_iter with SetMaxIter(max_it)"
174 for(
int i = iDominant - 1; i >= 0; --i){
186 #ifdef R__HAS_MATHMORE
189 coutF(
Eval) <<
"RooNonCentralChisquare: ForceSum must be set" << endl;
235 for(
int i = iDominant; ; ++i){
241 if(ithTerm/sum < errorTol)
244 if( i>iDominant+MaxIters){
247 coutW(
Eval) <<
"RooNonCentralChiSquare Normalization did not converge: for k="<<
k
248 <<
", lambda="<<
lambda <<
" fractional error = " << ithTerm/sum
249 <<
"\n either adjust tolerance with SetErrorTolerance(tol) or max_iter with SetMaxIter(max_it)"
256 for(
int i = iDominant - 1; i >= 0; --i){
Bool_t fHasIssuedConvWarning
Double_t Floor(Double_t x)
double chisquared_pdf(double x, double r, double x0=0)
Probability density function of the distribution with degrees of freedom.
Double_t evaluate() const
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported...
Double_t Gamma(Double_t z)
Computation of gamma(z) for all z.
Bool_t fHasIssuedSumWarning
ClassImp(TIterator) Bool_t TIterator return false
Compare two iterator objects.
The PDF of the Non-Central Chi Square distribution for n degrees of freedom.
double pow(double, double)
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
ClassImp(RooNonCentralChiSquare) RooNonCentralChiSquare
virtual const char * GetName() const
Returns name of object.
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...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
void SetForceSum(Bool_t flag)
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Double_t min(const char *rname=0) const
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
double chisquared_cdf(double x, double r, double x0=0)
Cumulative distribution function of the distribution with degrees of freedom (lower tail)...
Double_t max(const char *rname=0) const