60 Double_t mu(xvec[0]),result(1),factorial(1);
63 result+=
pow(mu,k)/factorial;
65 return exp(-mu)*result;
87 Double_t p1(0.5*(1+xvec[0])),p2(1-p1),result(0),fact1(1),fact2(1);
89 if(k > 0) { fact2*= k; fact1*=
_N1-k+1; }
90 result+= fact1/fact2*
pow(p1,k)*
pow(p2,
_N1-k);
118 Double_t p1(xvec[0]),p2(1-p1),result(0),fact1(1),fact2(1);
120 if(k > 0) { fact2*= k; fact1*=
_N1-k+1; }
121 result+= fact1/fact2*
pow(p1,k)*
pow(p2,
_N1-k);
#define ClassDef(name, id)
float type_of_call hi(const int &, const int &)
double pow(double, double)
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Double_t getMaxLimit(UInt_t) const
Double_t getMinLimit(UInt_t) const
Double_t operator()(const Double_t xvec[]) const
BinomialSumAsym(Int_t n, Int_t m)
BinomialSumEff(Int_t n, Int_t m)
Double_t getMaxLimit(UInt_t) const
Double_t getMinLimit(UInt_t) const
Double_t operator()(const Double_t xvec[]) const
Double_t getMinLimit(UInt_t) const
Double_t getMaxLimit(UInt_t) const
Double_t operator()(const Double_t xvec[]) const
RooHistError is a singleton class used to calculate the error bars for each bin of a RooHist object.
Bool_t getPoissonInterval(Int_t n, Double_t &mu1, Double_t &mu2, Double_t nSigma=1) const
Return a confidence interval for the expected number of events given n observed (unweighted) events.
Bool_t getBinomialIntervalEff(Int_t n, Int_t m, Double_t &a1, Double_t &a2, Double_t nSigma=1) const
Return 'nSigma' binomial confidence interval for (n,m).
static const RooHistError & instance()
Return a reference to a singleton object that is created the first time this method is called.
static RooAbsFunc * createBinomialSum(Int_t n, Int_t m, Bool_t eff)
Create and return a BinomialSum function binding.
Bool_t getBinomialIntervalAsym(Int_t n, Int_t m, Double_t &a1, Double_t &a2, Double_t nSigma=1) const
Return 'nSigma' binomial confidence interval for (n,m).
Double_t _poissonLoLUT[1000]
Double_t seek(const RooAbsFunc &f, Double_t startAt, Double_t step, Double_t value) const
Scan f(x)-value until it changes sign.
static RooAbsFunc * createPoissonSum(Int_t n)
Create and return a PoissonSum function binding.
Bool_t getInterval(const RooAbsFunc *Qu, const RooAbsFunc *Ql, Double_t pointEstimate, Double_t stepSize, Double_t &lo, Double_t &hi, Double_t nSigma) const
Calculate a confidence interval using the cumulative functions provided.
RooHistError()
Construct our singleton object.
Double_t _poissonHiLUT[1000]
Bool_t getPoissonIntervalCalc(Int_t n, Double_t &mu1, Double_t &mu2, Double_t nSigma=1) const
Calculate a confidence interval for the expected number of events given n observed (unweighted) event...
static Double_t infinity()
Return internal infinity representation.