72 *(const
RooArgSet*)
RooCmdConfig::decodeObjOnTheFly(
"RooNLLVar::RooNLLVar",
"ProjectedObservables",0,&_emptySet
73 ,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
74 RooCmdConfig::decodeStringOnTheFly(
"RooNLLVar::RooNLLVar",
"RangeWithName",0,
"",arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
75 RooCmdConfig::decodeStringOnTheFly(
"RooNLLVar::RooNLLVar",
"AddCoefRange",0,
"",arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
76 RooCmdConfig::decodeIntOnTheFly(
"RooNLLVar::RooNLLVar",
"NumCPU",0,1,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
78 RooCmdConfig::decodeIntOnTheFly(
"RooNLLVar::RooNLLVar",
"Verbose",0,1,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
79 RooCmdConfig::decodeIntOnTheFly(
"RooNLLVar::RooNLLVar",
"SplitRange",0,0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9),
80 RooCmdConfig::decodeIntOnTheFly(
"RooNLLVar::RooNLLVar",
"CloneData",0,1,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9))
84 pc.defineInt(
"extended",
"Extended",0,
kFALSE) ;
86 pc.process(arg1) ;
pc.process(arg2) ;
pc.process(arg3) ;
87 pc.process(arg4) ;
pc.process(arg5) ;
pc.process(arg6) ;
88 pc.process(arg7) ;
pc.process(arg8) ;
pc.process(arg9) ;
108 Bool_t extended,
const char* rangeName,
const char* addCoefRangeName,
110 RooAbsOptTestStatistic(
name,title,pdf,indata,
RooArgSet(),rangeName,addCoefRangeName,nCPU,interleave,verbose,splitRange,cloneData),
113 _first(
kTRUE), _offsetSaveW2(0.), _offsetCarrySaveW2(0.)
131 std::list<Double_t>::iterator biter = boundaries->begin() ;
132 _binw.resize(boundaries->size()-1) ;
136 while (biter!=boundaries->end()) {
137 _binw[ibin] = (*biter) - lastBound ;
138 lastBound = (*biter) ;
153 const RooArgSet& projDeps,
Bool_t extended,
const char* rangeName,
const char* addCoefRangeName,
155 RooAbsOptTestStatistic(
name,title,pdf,indata,projDeps,rangeName,addCoefRangeName,nCPU,interleave,verbose,splitRange,cloneData),
158 _first(
kTRUE), _offsetSaveW2(0.), _offsetCarrySaveW2(0.)
173 std::list<Double_t>::iterator biter = boundaries->begin() ;
174 _binw.resize(boundaries->size()-1) ;
178 while (biter!=boundaries->end()) {
179 _binw[ibin] = (*biter) - lastBound ;
180 lastBound = (*biter) ;
195 _extended(other._extended),
196 _weightSq(other._weightSq),
197 _first(
kTRUE), _offsetSaveW2(other._offsetSaveW2),
198 _offsetCarrySaveW2(other._offsetCarrySaveW2),
259 Double_t sumWeight(0), sumWeightCarry(0);
264 for (i=firstEvent ; i<lastEvent ; i+=stepSize) {
293 Double_t y = eventWeight - sumWeightCarry;
295 sumWeightCarry = (t - sumWeight) -
y;
301 carry = (t - result) -
y;
309 for (i=firstEvent ; i<lastEvent ; i+=stepSize) {
316 if (0. == eventWeight * eventWeight) continue ;
322 Double_t y = eventWeight - sumWeightCarry;
324 sumWeightCarry = (t - sumWeight) -
y;
329 carry = (t - result) -
y;
343 sumW2carry = (t - sumW2) -
y;
373 carry = (t - result) -
y;
378 carry = (t - result) -
y;
390 carry = (t - result) -
y;
408 if (
_offset==0 && result !=0 ) {
409 coutI(
Minimization) <<
"RooNLLVar::evaluatePartition(" <<
GetName() <<
") first = "<< firstEvent <<
" last = " << lastEvent <<
" Likelihood offset now set to " << result << std::endl ;
417 carry = (t - result) -
y;
char * Form(const char *fmt,...)
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
void setValueDirty() const
RooAbsArg * first() const
virtual void recalculateCache(const RooArgSet *, Int_t, Int_t, Int_t, Bool_t)
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
RooAbsDataStore * store()
virtual Double_t sumEntries() const =0
virtual Bool_t valid() const
virtual Double_t weight() const =0
virtual Double_t weightSquared() const =0
virtual Int_t numEntries() const
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual Double_t extendedTerm(Double_t observedEvents, const RooArgSet *nset=0) const
Returned the extended likelihood term (Nexpect - Nobserved*log(NExpected) of this PDF for the given n...
virtual Double_t getLogVal(const RooArgSet *set=0) const
Return the log of the current value with given normalization An error message is printed if the argum...
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
virtual Double_t getMax(const char *name=0) const
virtual Double_t getMin(const char *name=0) const
Double_t getVal(const RooArgSet *set=0) const
Evaluate object. Returns either cached value or triggers a recalculation.
void logEvalError(const char *message, const char *serverValueString=0) const
Log evaluation error message.
Int_t _nGof
Number of designated set to calculated extended term.
Int_t _nCPU
GOF MP Split mode specified by component (when Auto is active)
pRooAbsTestStatistic * _gofArray
GOFOpMode _gofOpMode
Is object initialized
Double_t _evalCarry
avoids loss of precision
pRooRealMPFE * _mpfeArray
Double_t _offsetCarry
Offset.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
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.
Class RooNLLVar implements a a -log(likelihood) calculation from a dataset and a PDF.
void applyWeightSquared(Bool_t flag)
RooRealSumPdf * _binnedPdf
virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int_t stepSize) const
Calculate and return likelihood on subset of data from firstEvent to lastEvent processed with a step ...
static RooArgSet _emptySet
virtual ~RooNLLVar()
Destructor.
std::vector< Double_t > _binw
Double_t _offsetCarrySaveW2
Class RooRealSumPdf implements a PDF constructed from a sum of functions:
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
RooRealVar represents a fundamental (non-derived) real valued object.
virtual const char * GetName() const
Returns name of object.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
static constexpr double pc
Double_t LnGamma(Double_t z)
Computation of ln[gamma(z)] for all z.
void swap(nlohmann::json &j1, nlohmann::json &j2) noexcept(is_nothrow_move_constructible< nlohmann::json >::value and is_nothrow_move_assignable< nlohmann::json >::value)
exchanges the values of two JSON objects