98 RooCmdConfig::decodeStringOnTheFly(
"RooChi2Var::RooChi2Var",
"RangeWithName",0,
"",arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9).c_str(),
100 RooCmdConfig::decodeIntOnTheFly(
"RooChi2Var::RooChi2Var",
"NumCPU",0,1,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
102 RooCmdConfig::decodeIntOnTheFly(
"RooChi2Var::RooChi2Var",
"Verbose",0,1,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
105 RooCmdConfig::decodeDoubleOnTheFly(
"RooChi2Var::RooChi2Var",
"IntegrateBins", 0, -1., {arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9}))
109 pc.defineInt(
"extended",
"Extended",0,
kFALSE) ;
110 pc.allowUndefined() ;
112 pc.process(arg1) ; pc.process(arg2) ; pc.process(arg3) ;
113 pc.process(arg4) ; pc.process(arg5) ; pc.process(arg6) ;
114 pc.process(arg7) ; pc.process(arg8) ; pc.process(arg9) ;
116 if (func.IsA()->InheritsFrom(RooAbsPdf::Class())) {
164 *(const
RooArgSet*)
RooCmdConfig::decodeObjOnTheFly(
"RooChi2Var::RooChi2Var",
"ProjectedObservables",0,&_emptySet
165 ,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
166 RooCmdConfig::decodeStringOnTheFly(
"RooChi2Var::RooChi2Var",
"RangeWithName",0,
"",arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9).c_str(),
167 RooCmdConfig::decodeStringOnTheFly(
"RooChi2Var::RooChi2Var",
"AddCoefRange",0,
"",arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9).c_str(),
168 RooCmdConfig::decodeIntOnTheFly(
"RooChi2Var::RooChi2Var",
"NumCPU",0,1,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
170 RooCmdConfig::decodeIntOnTheFly(
"RooChi2Var::RooChi2Var",
"Verbose",0,1,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
171 RooCmdConfig::decodeIntOnTheFly(
"RooChi2Var::RooChi2Var",
"SplitRange",0,0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
173 RooCmdConfig::decodeDoubleOnTheFly(
"RooChi2Var::RooChi2Var",
"IntegrateBins", 0, -1., {arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9}))
176 pc.defineInt(
"extended",
"Extended",0,
kFALSE) ;
178 pc.allowUndefined() ;
180 pc.process(arg1) ; pc.process(arg2) ; pc.process(arg3) ;
181 pc.process(arg4) ; pc.process(arg5) ; pc.process(arg6) ;
182 pc.process(arg7) ; pc.process(arg8) ; pc.process(arg9) ;
210 Bool_t extended,
const char* cutRange,
const char* addCoefRange,
212 RooAbsOptTestStatistic(
name,title,pdf,hdata,
RooArgSet(),cutRange,addCoefRange,nCPU,interleave,verbose,splitCutRange),
213 _etype(etype), _funcMode(extended?ExtendedPdf:Pdf)
239 RooAbsOptTestStatistic(
name,title,func,hdata,projDeps,cutRange,addCoefRange,nCPU,interleave,verbose,splitCutRange),
240 _etype(etype), _funcMode(fmode)
251 _etype(other._etype),
252 _funcMode(other._funcMode)
284 case Function: normFactor=1 ; break ;
291 for (
auto i=firstEvent ; i<lastEvent ; i+=stepSize) {
296 if (!hdata->
valid())
continue;
309 eInt = (eExt>0) ? eIntHi : eIntLo ;
315 if (0. == eInt * eInt && 0. == nData * nData && 0. == nPdf * nPdf) continue ;
318 if (0. == eInt * eInt) {
319 coutE(Eval) <<
"RooChi2Var::RooChi2Var(" <<
GetName() <<
") INFINITY ERROR: bin " << i
320 <<
" has zero error" << endl ;
326 Double_t term = eExt*eExt/(eInt*eInt) ;
329 carry = (t - result) -
y;
virtual void recalculateCache(const RooArgSet *, Int_t, Int_t, Int_t, Bool_t)
virtual const RooArgSet * get() const
RooAbsDataStore * store()
virtual Double_t sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
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.
Double_t _evalCarry
avoids loss of precision
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooChi2Var implements a simple calculation from a binned dataset and a PDF.
RooDataHist::ErrorType _etype
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.
RooChi2Var(const char *name, const char *title, RooAbsReal &func, RooDataHist &data, 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 RooCmdArg &arg9=RooCmdArg::none())
RooChi2Var constructor.
static RooArgSet _emptySet
virtual ~RooChi2Var()
Destructor.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
The RooDataHist is a container class to hold N-dimensional binned data.
double weight(std::size_t i) const
Return weight of i-th bin.
bool valid(std::size_t i) const
Return true if bin i is considered valid within the current range definitions of all observables.
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.
void weightError(Double_t &lo, Double_t &hi, ErrorType etype=Poisson) const override
Return the error of current weight.
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...