59 _rrvIter = _rrvArgs.createIterator() ;
79 RooAbsOptTestStatistic(name,title,func,xydata,
RooArgSet(),0,0,1,
RooFit::
Interleave,0,0),
81 _integrate(integrate),
82 _intConfig(*defaultIntegratorConfig()),
107 RooAbsOptTestStatistic(name,title,func,xydata,
RooArgSet(),0,0,1,
RooFit::
Interleave,0,0),
138 RooAbsOptTestStatistic(name,title,extPdf,xydata,
RooArgSet(),0,0,1,
RooFit::
Interleave,0,0),
145 throw(
string(
Form(
"RooXYChi2Var::ctor(%s) ERROR: Input p.d.f. must be an extendible",
GetName()))) ;
172 RooAbsOptTestStatistic(name,title,extPdf,xydata,
RooArgSet(),0,0,1,
RooFit::
Interleave,0,0),
179 throw(
string(
Form(
"RooXYChi2Var::ctor(%s) ERROR: Input p.d.f. must be an extendible",
GetName()))) ;
290 var->
setVal(cxval - xerr/100) ;
294 var->
setVal(cxval + xerr/100) ;
298 Double_t slope = (fxmax-fxmin)/(2*xerr/100.) ;
303 if ((ydata>cxval && fxmax>fxmin) || (ydata<=cxval && fxmax<=fxmin)) {
305 ret +=
pow(xerrHi*slope,2) ;
308 ret +=
pow(xerrLo*slope,2) ;
318 var->
setVal(cxval - xerr/100) ;
322 var->
setVal(cxval + xerr/100) ;
326 Double_t slope = (fxmax-fxmin)/(2*xerr/100.) ;
334 ret +=
pow(xerr*slope,2) ;
363 for (list<RooAbsBinning*>::const_iterator iter =
_binList.begin() ; iter !=
_binList.end() ; ++iter) {
367 (*iter)->setRange(xmin,xmax) ;
369 volume *= (xmax -
xmin) ;
372 return ret / volume ;
396 for (
Int_t i=firstEvent ; i<lastEvent ; i+=stepSize) {
401 if (!xydata->
valid()) {
420 ydata = xydata->
weight() ;
437 coutE(
Eval) <<
"RooXYChi2Var::RooXYChi2Var(" <<
GetName() <<
") INFINITY ERROR: data point " << i
438 <<
" has zero error, but function is not zero (f=" << yfunc <<
")" << endl ;
443 Double_t term = eExt*eExt/(eInt*eInt+ eIntX2);
446 carry = (t - result) - y;
virtual const char * GetName() const
Returns name of object.
TIterator * createIterator(Bool_t dir=kIterForward) const
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
static RooNumIntConfig * defaultIntegratorConfig()
Returns the default numeric integration configuration for all RooAbsReals.
RooArgSet requiredExtraObservables() const
virtual const RooArgSet * get() const
Double_t getVal(const RooArgSet *set=0) const
const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const
Return binning definition with name.
virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int_t stepSize) const
Calculate chi^2 in partition from firstEvent to lastEvent using given stepSize.
void initialize()
Iterator over set of real-valued observables.
Iterator abstract base class.
virtual Bool_t setLabel(const char *label, Bool_t printError=kTRUE)
Set value by specifying the name of the desired state If printError is set, a message will be printed...
RooXYChi2Var()
coverity[UNINIT_CTOR]
Double_t getErrorLo() const
Bool_t hasAsymError(Bool_t allowZero=kTRUE) const
Double_t _evalCarry
avoids loss of precision
double pow(double, double)
std::list< RooAbsBinning * > _binList
Function integral.
Bool_t hasError(Bool_t allowZero=kTRUE) const
virtual void weightError(Double_t &lo, Double_t &hi, ErrorType etype=SumW2) const
Return asymmetric error on weight. (Dummy implementation returning zero)
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
virtual Double_t weight() const
Return event weight of current event.
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void setVal(Double_t value)
Set value of variable to 'value'.
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 ...
RooNumIntConfig _intConfig
Double_t getAsymErrorHi() const
virtual ~RooXYChi2Var()
Destructor.
void initIntegrator()
Initialize bin content integrator.
char * Form(const char *fmt,...)
RooAbsDataStore * store()
RooDataSet is a container class to hold unbinned data.
Bool_t canBeExtended() const
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual Bool_t valid() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Double_t xErrorContribution(Double_t ydata) const
Calculate contribution to internal error due to error on 'x' coordinates at point i...
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
void setShapeDirty() const
virtual TObject * Next()=0
Double_t fy() const
Return function value requested bu present configuration.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual void recalculateCache(const RooArgSet *, Int_t, Int_t, Int_t, Bool_t)
void setEpsAbs(Double_t newEpsAbs)
Set absolute convergence criteria (convergence if abs(Err)<newEpsAbs)
Double_t getError() const
Double_t getAsymErrorLo() const
Double_t getErrorHi() const
void setEpsRel(Double_t newEpsRel)
Set relative convergence criteria (convergence if abs(Err)/abs(Int)<newEpsRel)
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...