89 _integrate(integrate),
90 _intConfig(*defaultIntegratorConfig()),
117 _integrate(integrate),
118 _intConfig(*defaultIntegratorConfig()),
148 _integrate(integrate),
149 _intConfig(*defaultIntegratorConfig()),
153 throw std::runtime_error(
Form(
"RooXYChi2Var::RooXYChi2Var(%s) ERROR: Input p.d.f. must be extendible",
GetName()));
182 _integrate(integrate),
183 _intConfig(*defaultIntegratorConfig()),
187 throw std::runtime_error(
Form(
"RooXYChi2Var::ctor(%s) ERROR: Input p.d.f. must be an extendible",
GetName()));
201 _extended(other._extended),
202 _integrate(other._integrate),
203 _intConfig(other._intConfig),
238#ifdef R__HAS_MATHMORE
300 var->
setVal(cxval - xerr/100) ;
304 var->
setVal(cxval + xerr/100) ;
308 Double_t slope = (fxmax-fxmin)/(2*xerr/100.) ;
313 if ((ydata>cxval && fxmax>fxmin) || (ydata<=cxval && fxmax<=fxmin)) {
315 ret +=
pow(xerrHi*slope,2) ;
318 ret +=
pow(xerrLo*slope,2) ;
328 var->
setVal(cxval - xerr/100) ;
332 var->
setVal(cxval + xerr/100) ;
336 Double_t slope = (fxmax-fxmin)/(2*xerr/100.) ;
344 ret +=
pow(xerr*slope,2) ;
373 for (list<RooAbsBinning*>::const_iterator iter =
_binList.begin() ; iter !=
_binList.end() ; ++iter) {
382 return ret / volume ;
406 for (
auto i=firstEvent ; i<lastEvent ; i+=stepSize) {
411 if (!xydata->
valid()) {
430 ydata = xydata->
weight() ;
447 coutE(
Eval) <<
"RooXYChi2Var::RooXYChi2Var(" <<
GetName() <<
") INFINITY ERROR: data point " << i
448 <<
" has zero error, but function is not zero (f=" << yfunc <<
")" << endl ;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
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...
RooAbsReal * _funcClone
Pointer to internal clone of input function.
RooArgSet * _funcObsSet
List of observables in the pdf expression.
RooAbsData * _dataClone
Pointer to internal clone if input data.
RooArgSet * _projDeps
Set of projected observable.
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 to be used in calculation of extended likelihood.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
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 getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Double_t _evalCarry
! carry of Kahan sum in evaluatePartition
RooArgSet is a container object that can hold multiple RooAbsArg objects.
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.
const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
void weightError(double &lo, double &hi, ErrorType etype=SumW2) const override
Return the asymmetric errors on the current weight.
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
void setVal(Double_t value) override
Set value of variable to 'value'.
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
RooXYChi2Var implements a simple chi^2 calculation from an unbinned dataset with values x,...
RooAbsReal * _funcInt
! Function integral
std::list< RooAbsBinning * > _binList
! Bin ranges
Bool_t _extended
Is the input function and extended p.d.f.
void initIntegrator()
Initialize bin content integrator.
RooRealVar * _yvar
Y variable if so designated.
RooXYChi2Var()
coverity[UNINIT_CTOR]
RooArgSet requiredExtraObservables() const override
TIterator * _rrvIter
! Iterator over set of real-valued observables
RooArgSet _rrvArgs
Set of real-valued observables.
Double_t fy() const
Return function value requested bu present configuration.
Double_t evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const override
Calculate chi^2 in partition from firstEvent to lastEvent using given stepSize.
void initialize()
Common constructor initialization.
Bool_t _integrate
Is integration over the bin volume requested.
RooNumIntConfig _intConfig
Numeric integrator configuration for integration of function over bin.
~RooXYChi2Var() override
Destructor.
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
const char * GetName() const override
Returns name of object.
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)