72 _funcMode{dynamic_cast<
RooAbsPdf *>(&func) ? (extended ? ExtendedPdf : Pdf) :
Function}
83 _funcMode(other._funcMode)
101 double normFactor(1) ;
103 case Function: normFactor=1 ; break ;
110 for (
auto i=firstEvent ; i<lastEvent ; i+=stepSize) {
115 const double nData = hdata->
weight() ;
119 const double eExt = nPdf-nData ;
127 eInt = (eExt > 0) ? eIntHi : eIntLo;
133 if (0. == eInt * eInt && 0. == nData * nData && 0. == nPdf * nPdf) continue ;
136 if (0. == eInt * eInt) {
137 coutE(Eval) <<
"RooChi2Var::RooChi2Var(" <<
GetName() <<
") INFINITY ERROR: bin " << i
138 <<
" has zero error" << std::endl;
144 double term = eExt*eExt/(eInt*eInt) ;
145 double y = term - carry;
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.