69 template<
class ...Args>
81 template<
class ...Args>
83 auto cfg = makeRooAbsTestStatisticCfgForFunc(args...);
143 makeRooAbsTestStatisticCfgForFunc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9))
147 pc.
defineInt(
"extended",
"Extended",0,
false) ;
202 *
RooCmdConfig::decodeSetOnTheFly(
"RooChi2Var::RooChi2Var",
"ProjectedObservables",0,&_emptySet,
203 arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
204 makeRooAbsTestStatisticCfgForPdf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9))
207 pc.
defineInt(
"extended",
"Extended",0,
false) ;
228 _etype(other._etype),
229 _funcMode(other._funcMode)
244 double result(0), carry(0);
250 double normFactor(1) ;
252 case Function: normFactor=1 ; break ;
259 for (
auto i=firstEvent ; i<lastEvent ; i+=stepSize) {
264 const double nData = hdata->
weight() ;
268 const double eExt = nPdf-nData ;
273 double eIntLo,eIntHi ;
275 eInt = (eExt>0) ? eIntHi : eIntLo ;
281 if (0. == eInt * eInt && 0. == nData * nData && 0. == nPdf * nPdf) continue ;
284 if (0. == eInt * eInt) {
285 coutE(Eval) <<
"RooChi2Var::RooChi2Var(" <<
GetName() <<
") INFINITY ERROR: bin " << i
286 <<
" has zero error" << endl ;
292 double term = eExt*eExt/(eInt*eInt) ;
293 double y = term - carry;
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
virtual void recalculateCache(const RooArgSet *, Int_t, Int_t, Int_t, bool)
virtual double sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
virtual const RooArgSet * get() const
RooAbsDataStore * store()
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
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.
RooArgSet * _projDeps
Set of projected observable.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
TClass * IsA() const override
double _evalCarry
! carry of Kahan sum in evaluatePartition
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooChi2Var implements a 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.
RooChi2Var(const char *name, const char *title, RooAbsReal &func, RooDataHist &data, const RooCmdArg &arg1=RooCmdArg::none(), 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.
FuncMode _funcMode
Function, P.d.f. or extended p.d.f?
static RooArgSet _emptySet
Supports named argument constructor.
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.
bool process(const RooCmdArg &arg)
Process given RooCmdArg.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
bool defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
static double decodeDoubleOnTheFly(const char *callerID, const char *cmdArgName, int idx, double defVal, std::initializer_list< std::reference_wrapper< const RooCmdArg > > args)
Find a given double in a list of RooCmdArg.
void allowUndefined(bool flag=true)
If flag is true the processing of unrecognized RooCmdArgs is not considered an error.
static std::string decodeStringOnTheFly(const char *callerID, const char *cmdArgName, Int_t intIdx, const char *defVal, Args_t &&...args)
Static decoder function allows to retrieve string property from set of RooCmdArgs For use in base mem...
static Int_t decodeIntOnTheFly(const char *callerID, const char *cmdArgName, Int_t intIdx, Int_t defVal, Args_t &&...args)
Static decoder function allows to retrieve integer property from set of RooCmdArgs For use in base me...
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.
void weightError(double &lo, double &hi, ErrorType etype=Poisson) const override
Return the asymmetric errors on the current weight.
bool isNonPoissonWeighted() const override
Returns true if dataset contains entries with a non-integer 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.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
const char * GetName() const override
Returns name of object.
std::string rangeName
Stores the configuration parameters for RooAbsTestStatistic.
std::string addCoefRangeName
double integrateOverBinsPrecision
RooFit::MPSplit interleave