66 _xf(
"!xf",
"xf",this,false,false),
67 _ixf(
"!ixf",
"ixf",this),
73 std::unique_ptr<RooAbsReal> XF;
79 string pname=
Form(
"%s_product",
name) ;
85 string pname=
Form(
"%s_product",
name) ;
86 XF = std::make_unique<RooProduct>(pname.c_str(),pname.c_str(),
RooArgList(
x,
x,func)) ;
92 XF->specialIntegratorConfig(
true)->method1D().setLabel(
"RooBinIntegrator");
95 std::unique_ptr<RooAbsReal> intXF{XF->createIntegral(
x)};
111 bool centr,
bool takeRoot,
bool intNSet) :
113 _xf(
"!xf",
"xf",this,false,false),
114 _ixf(
"!ixf",
"ixf",this),
115 _if(
"!if",
"if",this),
122 std::unique_ptr<RooAbsReal> XF;
128 string pname=
Form(
"%s_product",
name) ;
135 string pname=
Form(
"%s_product",
name) ;
136 XF = std::make_unique<RooProduct>(pname.c_str(),pname.c_str(),
RooArgList(
x,
x,func)) ;
143 XF->specialIntegratorConfig(
true)->method1D().setLabel(
"RooBinIntegrator");
146 XF->specialIntegratorConfig(
true)->method2D().setLabel(
"RooBinIntegrator");
147 XF->specialIntegratorConfig(
true)->methodND().setLabel(
"RooBinIntegrator");
151 if (intNSet) intSet.
add(
_nset,
true) ;
152 std::unique_ptr<RooAbsReal> intXF{XF->createIntegral(intSet, &
_nset)};
171 _xf(
"xf",this,other._xf),
172 _ixf(
"ixf",this,other._ixf),
173 _if(
"if",this,other._if),
174 _xfOffset(other._xfOffset)
200 double ret =
_takeRoot ? sqrt(ratio) : ratio ;
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
RooExpensiveObjectCache & expensiveObjectCache() const
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
bool addOwnedComponents(const RooAbsCollection &comps)
Take ownership of the contents of 'comps'.
Int_t getSize() const
Return the number of elements in the collection.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
RooAbsMoment represents the first, second, or third order derivative of any RooAbsReal as calculated ...
RooRealProxy _mean
Mean (if calculated for central moment)
Int_t _takeRoot
Return n-order root of moment.
RooSetProxy _nset
Normalization set (optional)
Abstract base class for objects that represent a real value and implements functionality common to al...
RooFit::OwningPtr< RooAbsReal > createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
Create an object that represents the integral of the function over one or more observables listed in ...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooAbsMoment * mean(RooRealVar &obs)
virtual bool isBinnedDistribution(const RooArgSet &) const
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * absArg() const
Return pointer to contained argument.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
bool add(const RooAbsArg &var, bool valueServer, bool shapeServer, bool silent)
Overloaded RooCollection_t::add() method insert object into set and registers object as server to own...
Performs hybrid numerical/analytical integrals of RooAbsReal objects.
void setCacheNumeric(bool flag)
RooRealVar represents a variable that can be changed from the outside.
RooSecondMoment represents the first, second, or third order derivative of any RooAbsReal as calculat...
RooRealProxy _ixf
Int((X-offset)*F(X))dx ;.
RooRealProxy _if
Int(F(x))dx ;.
double evaluate() const override
Calculate value.
RooSecondMoment()
Default constructor.
RooRealProxy _xf
(X-offset)*F
~RooSecondMoment() override
Destructor.
U & putOwnedArg(std::unique_ptr< U > ownedArg)
Move a new object held and owned by proxy.
bool setArg(T &newRef)
Change object held in proxy into newRef.
const char * GetName() const override
Returns name of object.