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),
263 Double_t sumWeight(0), sumWeightCarry(0);
268 for (i=firstEvent ; i<lastEvent ; i+=stepSize) {
297 Double_t y = eventWeight - sumWeightCarry;
299 sumWeightCarry = (t - sumWeight) -
y;
305 carry = (t - result) -
y;
313 for (i=firstEvent ; i<lastEvent ; i+=stepSize) {
320 if (0. == eventWeight * eventWeight) continue ;
326 Double_t y = eventWeight - sumWeightCarry;
328 sumWeightCarry = (t - sumWeight) -
y;
333 carry = (t - result) -
y;
347 sumW2carry = (t - sumW2) -
y;
377 carry = (t - result) -
y;
382 carry = (t - result) -
y;
394 carry = (t - result) -
y;
412 if (
_offset==0 && result !=0 ) {
413 coutI(
Minimization) <<
"RooNLLVar::evaluatePartition(" <<
GetName() <<
") first = "<< firstEvent <<
" last = " << lastEvent <<
" Likelihood offset now set to " << result << std::endl ;
421 carry = (t - result) -
y;
char * Form(const char *fmt,...)
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Return the observables of this pdf given a set of observables.
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...
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
Get maximum of currently defined range.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
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.
static RooArgSet _emptySet
virtual ~RooNLLVar()
Destructor.
std::vector< Double_t > _binw
Double_t _offsetCarrySaveW2
The 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.
void swap(RDirectoryEntry &e1, RDirectoryEntry &e2) noexcept
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
Template specialisation used in RooAbsArg:
static constexpr double pc
Double_t LnGamma(Double_t z)
Computation of ln[gamma(z)] for all z.