81 RooAbsOptTestStatistic(
name,title,func,xydata,
RooArgSet(),0,0,1,
RooFit::Interleave,0,0),
83 _integrate(integrate),
84 _intConfig(*defaultIntegratorConfig()),
109 RooAbsOptTestStatistic(
name,title,func,xydata,
RooArgSet(),0,0,1,
RooFit::Interleave,0,0),
111 _integrate(integrate),
112 _intConfig(*defaultIntegratorConfig()),
140 RooAbsOptTestStatistic(
name,title,extPdf,xydata,
RooArgSet(),0,0,1,
RooFit::Interleave,0,0),
142 _integrate(integrate),
143 _intConfig(*defaultIntegratorConfig()),
147 throw std::runtime_error(
Form(
"RooXYChi2Var::RooXYChi2Var(%s) ERROR: Input p.d.f. must be extendible",
GetName()));
174 RooAbsOptTestStatistic(
name,title,extPdf,xydata,
RooArgSet(),0,0,1,
RooFit::Interleave,0,0),
176 _integrate(integrate),
177 _intConfig(*defaultIntegratorConfig()),
181 throw std::runtime_error(
Form(
"RooXYChi2Var::ctor(%s) ERROR: Input p.d.f. must be an extendible",
GetName()));
195 _extended(other._extended),
196 _integrate(other._integrate),
197 _intConfig(other._intConfig),
232#ifdef R__HAS_MATHMORE
294 var->
setVal(cxval - xerr/100) ;
298 var->
setVal(cxval + xerr/100) ;
302 Double_t slope = (fxmax-fxmin)/(2*xerr/100.) ;
307 if ((ydata>cxval && fxmax>fxmin) || (ydata<=cxval && fxmax<=fxmin)) {
309 ret +=
pow(xerrHi*slope,2) ;
312 ret +=
pow(xerrLo*slope,2) ;
322 var->
setVal(cxval - xerr/100) ;
326 var->
setVal(cxval + xerr/100) ;
330 Double_t slope = (fxmax-fxmin)/(2*xerr/100.) ;
338 ret +=
pow(xerr*slope,2) ;
367 for (list<RooAbsBinning*>::const_iterator iter =
_binList.begin() ; iter !=
_binList.end() ; ++iter) {
376 return ret / volume ;
400 for (
auto i=firstEvent ; i<lastEvent ; i+=stepSize) {
405 if (!xydata->
valid()) {
424 ydata = xydata->
weight() ;
432 Double_t eInt = (eExt>0) ? eyhi : eylo ;
441 coutE(Eval) <<
"RooXYChi2Var::RooXYChi2Var(" <<
GetName() <<
") INFINITY ERROR: data point " << i
442 <<
" has zero error, but function is not zero (f=" << yfunc <<
")" << endl ;
447 Double_t term = eExt*eExt/(eInt*eInt+ eIntX2);
450 carry = (t - result) -
y;
double pow(double, double)
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual void recalculateCache(const RooArgSet *, Int_t, Int_t, Int_t, Bool_t)
virtual const RooArgSet * get() const
RooAbsDataStore * store()
virtual Bool_t valid() const
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
Bool_t canBeExtended() const
If true, PDF can provide extended likelihood term.
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooAbsReal * createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Create an object that represents the integral of the function over one or more observables listed in ...
Double_t _evalCarry
avoids loss of precision
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Add element to non-owning set.
virtual Bool_t setLabel(const char *label, bool printError=true) override
Set value by specifying the name of the desired state.
RooDataSet is a container class to hold unbinned data.
virtual void weightError(Double_t &lo, Double_t &hi, ErrorType etype=SumW2) const override
Return asymmetric error on weight. (Dummy implementation returning zero)
virtual const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
virtual Double_t weight() const override
Return event weight of current event.
void setEpsAbs(Double_t newEpsAbs)
Set absolute convergence criteria (convergence if abs(Err)<newEpsAbs)
void setEpsRel(Double_t newEpsRel)
Set relative convergence criteria (convergence if abs(Err)/abs(Int)<newEpsRel)
RooRealVar represents a variable that can be changed from the outside.
Double_t getAsymErrorLo() const
Double_t getErrorHi() const
Bool_t hasAsymError(Bool_t allowZero=kTRUE) const
Double_t getErrorLo() const
Double_t getAsymErrorHi() const
Bool_t hasError(Bool_t allowZero=kTRUE) const
Double_t getError() const
virtual void setVal(Double_t value)
Set value of variable to 'value'.
RooXYChi2Var implements a simple chi^2 calculation from an unbinned dataset with values x,...
RooArgSet requiredExtraObservables() const
std::list< RooAbsBinning * > _binList
Function integral.
void initIntegrator()
Initialize bin content integrator.
RooXYChi2Var()
coverity[UNINIT_CTOR]
virtual ~RooXYChi2Var()
Destructor.
virtual Double_t evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const
Calculate chi^2 in partition from firstEvent to lastEvent using given stepSize.
Double_t fy() const
Return function value requested bu present configuration.
void initialize()
Iterator over set of real-valued observables.
RooNumIntConfig _intConfig
Double_t xErrorContribution(Double_t ydata) const
Calculate contribution to internal error due to error on 'x' coordinates at point i.
Iterator abstract base class.
virtual TObject * Next()=0
virtual const char * GetName() const
Returns name of object.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...