40 _p.add(paramSource->
_p);
46 for (
Int_t i = 0; i <
_dh.numEntries(); i++) {
47 const double wi =
_dh.weight(i);
48 const char *vname =
Form(
"%s_gamma_bin_%i",
GetName(), i);
63 _x(
"x",this,other.
_x),
64 _p(
"p",this,other.
_p),
97 return _dh.weight(ibin) ;
105 return _dh.weightError() ;
123 double* boundaries = binning->
array() ;
125 std::list<double>* hint =
new std::list<double> ;
128 xlo = xlo - 0.01*(xhi-xlo) ;
129 xhi = xhi + 0.01*(xhi-xlo) ;
131 double delta = (xhi-xlo)*1
e-8 ;
136 if (boundaries[i]>=xlo && boundaries[i]<=xhi) {
137 hint->push_back(boundaries[i]-delta) ;
138 hint->push_back(boundaries[i]+delta) ;
160 double* boundaries = binning->
array() ;
162 std::list<double>* hint =
new std::list<double> ;
167 if (boundaries[i]>=xlo && boundaries[i]<=xhi) {
168 hint->push_back(boundaries[i]) ;
182 std::unique_ptr<RooAbsCollection> allVarsCommon{allVars.
selectCommon(
_x)};
183 bool intAllObs = (allVarsCommon->size()==
_x.size()) ;
206 std::map<const RooAbsArg*, std::pair<double, double> > ranges;
207 for (
const auto obs :
_x) {
211 auto getBinScale = [&](
int iBin){
return static_cast<const RooAbsReal&
>(
_p[iBin]).
getVal(); };
int Int_t
Signed integer 4 bytes (int).
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
bool addOwnedComponents(const RooAbsCollection &comps)
Take ownership of the contents of 'comps'.
RooAbsArg()
Default constructor.
Abstract base class for RooRealVar binning definitions.
virtual Int_t numBoundaries() const =0
virtual double * array() const =0
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Abstract base class for objects that are lvalues, i.e.
virtual const RooAbsBinning * getBinningPtr(const char *rangeName) const =0
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
void setConstant(bool value=true)
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
bool matchArgs(const RooArgSet &allDeps, RooArgSet &analDeps, const RooArgProxy &a, const Proxies &... proxies) const
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * selectCommon(const RooAbsCollection &refColl) const
Use RooAbsCollection::selecCommon(), but return as RooArgSet.
Container class to hold N-dimensional binned data.
void setActual(Int_t ibin, double newVal)
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
double getNominalError(Int_t ibin) const
double getActual(Int_t ibin)
double analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=nullptr) const override
Implement analytical integrations by doing appropriate weighting from component integrals functions t...
double getNominal(Int_t ibin) const
std::list< double > * plotSamplingHint(RooAbsRealLValue &obs, double xlo, double xhi) const override
Return sampling hint for making curves of (projections) of this function as the recursive division st...
std::list< double > * binBoundaries(RooAbsRealLValue &, double, double) const override
Return sampling hint for making curves of (projections) of this function as the recursive division st...
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=nullptr) const override
Advertise that all integrals can be handled internally.
Variable that can be changed from the outside.
void setVal(double value) override
Set value of variable to 'value'.
void setError(double value)
const char * GetName() const override
Returns name of object.
std::pair< double, double > getRangeOrBinningInterval(RooAbsArg const *arg, const char *rangeName)
static uint64_t sum(uint64_t i)