75 std::log(std::numeric_limits<double>::epsilon()));
120 Mirror mirror,
double rho)
122 _x(
"x",
"Observable", this, xpdf),
123 _mirrorLeft(mirror == MirrorLeft || mirror == MirrorBoth || mirror == MirrorLeftAsymRight),
124 _mirrorRight(mirror == MirrorRight || mirror == MirrorBoth || mirror == MirrorAsymLeftRight),
125 _asymLeft(mirror == MirrorAsymLeft || mirror == MirrorAsymLeftRight || mirror == MirrorAsymBoth),
126 _asymRight(mirror == MirrorAsymRight || mirror == MirrorLeftAsymRight || mirror == MirrorAsymBoth),
129 _binWidth((_hi - _lo) / (_nPoints - 1)),
142 _x(
"x", this, other._x),
143 _nEvents(other._nEvents),
144 _mirrorLeft(other._mirrorLeft),
145 _mirrorRight(other._mirrorRight),
146 _asymLeft(other._asymLeft),
147 _asymRight(other._asymRight),
150 _binWidth(other._binWidth),
189 inline bool operator()(
const struct Data&
a,
const struct Data&
b)
const
190 {
return a.x <
b.x; }
198 std::vector<Data> tmp;
206 for (
Int_t i = 0; i <
data.numEntries(); ++i) {
208 const double x = real.
getVal();
209 const double w =
data.weight();
228 std::sort(tmp.begin(), tmp.end(), cmp());
234 for (
unsigned i = 0; i < tmp.size(); ++i) {
240 std::vector<Data> tmp2;
245 double sigmav=std::sqrt(
x2/x0-meanv*meanv);
246 double h=std::pow(
double(4)/
double(3),0.2)*std::pow(
_sumWgt,-0.2)*
_rho;
247 double hmin=
h*sigmav*std::sqrt(2.)/10;
258 double norm=
h*std::sqrt(sigmav *
_sumWgt)/(2.0*std::sqrt(3.0));
272 const double xlo = std::min(
_hi,
274 const double xhi = std::max(
_lo,
276 if (xlo >= xhi)
continue;
284 for (
Int_t k = binlo; k <= binhi; ++k, chi += chi2incr) {
290 const double xlo = std::min(
_hi,
292 const double xhi = std::max(
_lo,
294 if (xlo >= xhi)
continue;
302 for (
Int_t k = binlo; k <= binhi; ++k, chi += chi2incr) {
309 const double xlo = std::min(
_hi,
311 const double xhi = std::max(
_lo,
313 if (xlo >= xhi)
continue;
321 for (
Int_t k = binlo; k <= binhi; ++k, chi += chi2incr) {
326 static const double sqrt2pi(std::sqrt(2*
TMath::Pi()));
377 for (
Int_t i = imin + 2; i < imax; ++i)
392 }
else if (imin == imax) {
412 double max = -std::numeric_limits<double>::max();
429 for ( ; it < iend; ++it) {
430 const double r = (
x - *it) / sigmav;
431 y += std::exp(-0.5 *
r *
r);
434 static const double sqrt2pi(std::sqrt(2*
TMath::Pi()));
435 return y/(sigmav*sqrt2pi);
int Int_t
Signed integer 4 bytes (int)
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
bool contains(const char *name) const
Check if collection contains an argument with a specific name.
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
bool matchArgs(const RooArgSet &allDeps, RooArgSet &analDeps, const RooArgProxy &a, const Proxies &... proxies) const
RooAbsArg * absArg() const
Return pointer to contained argument.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Container class to hold unbinned data.
Class RooKeysPdf implements a one-dimensional kernel estimation p.d.f which model the distribution of...
static constexpr int _nPoints
RooKeysPdf()
coverity[UNINIT_CTOR]
double _lookupTable[_nPoints+1]
double maxVal(Int_t code) const override
Return maximum value for set of observables identified by code assigned in getMaxVal.
double g(double x, double sigma) const
void LoadDataSet(RooDataSet &data)
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Mirror
Boundary correction obtained by reflecting the data across the lower and/or upper edge of the observa...
static const double _nSigma
!
Int_t getMaxVal(const RooArgSet &vars) const override
Advertise capability to determine maximum value of function for given set of observables.
Variable that can be changed from the outside.
double max(const char *rname=nullptr) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
double min(const char *rname=nullptr) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
const char * GetName() const override
Returns name of object.
static uint64_t sum(uint64_t i)