33using std::string, std::vector;
48 _varList(
"varList",
"List of variables",
this),
49 _pdfList(
"pdfList",
"List of pdfs",
this),
69 _varList(
"varList",
"List of variables",
this),
70 _pdfList(
"pdfList",
"List of pdfs",
this),
85 coutE(InputArguments) <<
"RooMomentMorphFunc::ctor(" <<
GetName() <<
") ERROR: mref " <<
mref->GetName()
86 <<
" is not of type RooAbsReal" << std::endl;
87 throw string(
"RooPolyMorh::ctor() ERROR mref is not of type RooAbsReal");
90 coutW(InputArguments) <<
"RooMomentMorphFunc::ctor(" <<
GetName() <<
") WARNING mref point " << i
91 <<
" is not a constant, taking a snapshot of its value" << std::endl;
106 _varList(
"varList",
this,
other._varList),
107 _pdfList(
"pdfList",
this,
other._pdfList),
109 _setting(
other._setting),
110 _useHorizMorph(
other._useHorizMorph)
134 coutE(InputArguments) <<
"RooMomentMorphFunc::initialize(" <<
GetName() <<
") ERROR: nPdf != nRefPoints" << std::endl;
144 (*dm)[i] = (*_mref)[i] - (*_mref)[0];
151 M(i,
j) = std::pow((*dm)[i], (
double)
j);
215 mom->setLocalNoDirtyInhibit(
true);
216 mom->mean()->setLocalNoDirtyInhibit(
true);
359 return static_cast<RooRealVar *
>(_frac.at(i));
365 return static_cast<RooRealVar *
>(_frac.at(i));
373 double dm =
self.m - (*
self._mref)[0];
380 ffrac += (*
self._M)(
j, i) * (
j == 0 ? 1. : std::pow(dm, (
double)
j));
389 std::cout <<
ffrac << std::endl;
397 switch (
self._setting) {
431 if (frac(i)->getVal() < 0)
432 const_cast<RooRealVar *
>(frac(i))->setVal(0.);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
TMatrixT< Double_t > TMatrixD
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
TVectorT< Double_t > TVectorD
Common abstract base class for objects that represent a value and a "shape" in RooFit.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Storage_t::size_type size() const
bool addTyped(const RooAbsCollection &list, bool silent=false)
Adds elements of a given RooAbsCollection to the container if they match the specified type.
Abstract interface for all probability density functions.
const RooArgSet * nset() const
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
Abstract base class for objects that represent a real value and implements functionality common to al...
virtual std::list< double > * binBoundaries(RooAbsRealLValue &obs, double xlo, double xhi) const
Retrieve bin boundaries if this distribution is binned in obs.
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
virtual double getValV(const RooArgSet *normalisationSet=nullptr) const
Return value of object.
friend class RooRealSumFunc
virtual bool isBinnedDistribution(const RooArgSet &) const
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
virtual std::list< double > * plotSamplingHint(RooAbsRealLValue &obs, double xlo, double xhi) const
Interface for returning an optional hint for initial sampling points when constructing a curve projec...
Calculates the sum of a set of RooAbsReal terms, or when constructed with two sets,...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=nullptr)
Setter function without integration set.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=nullptr, const TNamed *isetRangeName=nullptr)
Getter function without integration set.
Meta object that tracks value changes in a given set of RooAbsArgs by registering itself as value cli...
bool hasChanged(bool clearState)
Returns true if state has changed since last call with clearState=true.
Represents a constant real-valued object.
RooCustomizer is a factory class to produce clones of a prototype composite PDF object with the same ...
RooLinearVar is the most general form of a derived real-valued object that can be used by RooRealInte...
void calculateFractions(const RooMomentMorphFunc &self, bool verbose=true) const
RooRealVar * frac(Int_t i)
RooChangeTracker * _tracker
RooArgList containedArgs(Action) override
double getValV(const RooArgSet *set=nullptr) const override
Return value of object.
~RooMomentMorphFunc() override
friend class CacheElem
Current normalization set.
RooArgSet * _curNormSet
The cache manager.
bool isBinnedDistribution(const RooArgSet &obs) const override
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
RooObjCacheManager _cacheMgr
CacheElem * getCache(const RooArgSet *nset) const
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooAbsReal * sumFunc(const RooArgSet *nset)
int idxmin(const double &m) const
std::list< double > * binBoundaries(RooAbsRealLValue &, double, double) const override
Retrieve bin boundaries if this distribution is binned in obs.
std::list< double > * plotSamplingHint(RooAbsRealLValue &obs, double xlo, double xhi) const override
Interface for returning an optional hint for initial sampling points when constructing a curve projec...
Int_t ij(const Int_t &i, const Int_t &j) const
int idxmax(const double &m) const
Variable that can be changed from the outside.
const T & arg() const
Return reference to object held in proxy.
const char * GetName() const override
Returns name of object.
constexpr Double_t PiOver2()