71 template<
class ...Args>
83 template<
class ...Args>
85 auto cfg = makeRooAbsTestStatisticCfgForFunc(args...);
123 makeRooAbsTestStatisticCfgForFunc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9))
182 *static_cast<const
RooArgSet*>(
RooCmdConfig::decodeObjOnTheFly(
"RooChi2Var::RooChi2Var",
"ProjectedObservables",0,&_emptySet,
183 arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)),
184 makeRooAbsTestStatisticCfgForPdf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9))
222 _etype(etype), _funcMode(extended?ExtendedPdf:Pdf)
249 _etype(etype), _funcMode(fmode)
259 _etype(other._etype),
260 _funcMode(other._funcMode)
291 case Function: normFactor=1 ; break ;
298 for (
auto i=firstEvent ; i<lastEvent ; i+=stepSize) {
303 if (!hdata->
valid())
continue;
316 eInt = (eExt>0) ? eIntHi : eIntLo ;
322 if (0. == eInt * eInt && 0. == nData * nData && 0. == nPdf * nPdf) continue ;
325 if (0. == eInt * eInt) {
326 coutE(Eval) <<
"RooChi2Var::RooChi2Var(" <<
GetName() <<
") INFINITY ERROR: bin " << i
327 <<
" has zero error" << endl ;
333 Double_t term = eExt*eExt/(eInt*eInt) ;
336 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
Offset as KahanSum to avoid 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 Throughout the calcula...
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.
Bool_t 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 std::string decodeStringOnTheFly(const char *callerID, const char *cmdArgName, Int_t intIdx, const char *defVal, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg())
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, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg())
Static decoder function allows to retrieve integer property from set of RooCmdArgs For use in base me...
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
void allowUndefined(Bool_t flag=kTRUE)
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.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
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_t isNonPoissonWeighted() const override
Returns true if dataset contains entries with a non-integer weight.
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.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
std::string rangeName
Stores the configuration parameters for RooAbsTestStatistic.
std::string addCoefRangeName
double integrateOverBinsPrecision
RooFit::MPSplit interleave