103 double normFactor(1) ;
105 case Function: normFactor=1 ; break ;
112 for (
auto i=firstEvent ; i<lastEvent ; i+=stepSize) {
117 const double nData = hdata->
weight() ;
121 const double eExt = nPdf-nData ;
129 eInt = (eExt > 0) ? eIntHi : eIntLo;
135 if (0. == eInt * eInt && 0. == nData * nData && 0. == nPdf * nPdf) continue ;
138 if (0. == eInt * eInt) {
139 coutE(Eval) <<
"RooChi2Var::RooChi2Var(" <<
GetName() <<
") INFINITY ERROR: bin " << i
140 <<
" has zero error" << std::endl;
146 double term = eExt*eExt/(eInt*eInt) ;
147 double y = term - carry;
FuncMode _funcMode
Function, P.d.f. or extended p.d.f?
RooDataHist::ErrorType _etype
Error type store in associated RooDataHist.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
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
Double_t(* Function)(Double_t)
Abstract base class for binned and unbinned datasets.
virtual double sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
virtual const RooArgSet * get() const
Abstract base class for test statistics objects that evaluate a function or PDF at each point of a gi...
RooAbsReal * _funcClone
Pointer to internal clone of input function.
RooArgSet * _normSet
Pointer to set with observables used for normalization.
RooAbsData * _dataClone
Pointer to internal clone if input data.
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
double _evalCarry
! carry of Kahan sum in evaluatePartition
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Simple calculation from a binned dataset and a PDF.
double 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 Throughout the calcula...
RooDataHist::ErrorType _etype
Error type store in associated RooDataHist.
FuncMode _funcMode
Function, P.d.f. or extended p.d.f?
RooChi2Var(const char *name, const char *title, RooAbsReal &func, RooDataHist &data, bool extended, RooDataHist::ErrorType etype, RooAbsTestStatistic::Configuration const &cfg=RooAbsTestStatistic::Configuration{})
Container class to hold N-dimensional binned data.
double weight(std::size_t i) const
Return weight of i-th bin.
void weightError(double &lo, double &hi, ErrorType etype=Poisson) const override
Return the asymmetric errors on the current weight.
double binVolume(std::size_t i) const
Return bin volume of i-th bin.
const RooArgSet * get() const override
Get bin centre of current bin.
const char * GetName() const override
Returns name of object.