33 : _dbnX(numEntries, sumW, sumW2, sumWX, sumWX2),
34 _dbnY(numEntries, sumW, sumW2, sumWY, sumWY2),
45 _sumWXY = toCopy._sumWXY;
55 _sumWXY = toCopy._sumWXY;
66 void fill(
double valX,
double valY,
double weight=1.0,
double fraction=1.0) {
67 _dbnX.fill(valX, weight, fraction);
68 _dbnY.fill(valY, weight, fraction);
69 _sumWXY += fraction*weight*valX*valY;
74 void fill(std::pair<double,double> val,
double weight=1.0,
double fraction=1.0) {
75 fill(val.first, val.second, weight, fraction);
89 _dbnX.scaleW(scalefactor);
90 _dbnY.scaleW(scalefactor);
91 _sumWXY *= scalefactor;
104 _dbnY.scaleX(yscale);
124 double errW()
const {
return _dbnX.errW(); }
127 double relErrW()
const {
return _dbnX.relErrW(); }
130 double xMean()
const {
return _dbnX.xMean();}
133 double yMean()
const {
return _dbnY.xMean(); }
142 double xStdDev()
const {
return _dbnX.xStdDev(); }
145 double yStdDev()
const {
return _dbnY.xStdDev(); }
148 double xStdErr()
const {
return _dbnX.xStdErr(); }
151 double yStdErr()
const {
return _dbnY.xStdErr(); }
154 double xRMS()
const {
return _dbnX.xRMS(); }
157 double yRMS()
const {
return _dbnY.xRMS(); }
167 return _dbnX.numEntries();
172 return _dbnX.effNumEntries();
182 return _dbnX.sumW2();
187 return _dbnX.sumWX();
192 return _dbnX.sumWX2();
197 return _dbnY.sumWX();
202 return _dbnY.sumWX2();
259 _sumWXY += d._sumWXY;
267 _sumWXY -= d._sumWXY;
Dbn2D()
Default constructor of a new distribution.
double xVariance() const
Weighted variance, , of distribution.
double sumWY2() const
The sum of y^2*weight.
Dbn2D & subtract(const Dbn2D &d)
Subtract one dbn from another (internal, explicitly named version)
void scaleY(double yscale)
Rescale y: needed if y histo bin edges are rescaled.
Dbn2D & operator=(const Dbn2D &toCopy)
double sumWY() const
The sum of y*weight.
double xMean() const
Weighted mean, , of distribution.
Dbn2D & operator-=(const Dbn2D &d)
Subtract one dbn from another.
void fill(std::pair< double, double > val, double weight=1.0, double fraction=1.0)
Fill, providing the fill coordinates as a pair.
double errW() const
The absolute error on sumW.
double yVariance() const
Weighted variance, , of distribution.
double sumW2() const
The sum of weights squared.
Axis1D< BIN1D, DBN > operator-(const Axis1D< BIN1D, DBN > &first, const Axis1D< BIN1D, DBN > &second)
Subtract the statistics on two axis.
double xStdErr() const
Weighted standard error on the mean, , of distribution.
void scaleW(double scalefactor)
Rescale as if all fill weights had been different by factor scalefactor.
double yMean() const
Weighted mean, , of distribution.
double sumWX2() const
The sum of x^2*weight.
double effNumEntries() const
Effective number of entries .
void reset()
Reset the distribution to an unfilled state.
Dbn2D & add(const Dbn2D &d)
Add two dbns (internal, explicitly named version)
void scaleXY(double xscale, double yscale)
Rescale x and y: needed if histo bin edges are rescaled.
double xStdDev() const
Weighted standard deviation, , of distribution.
Dbn2D(double numEntries, double sumW, double sumW2, double sumWX, double sumWX2, double sumWY, double sumWY2, double sumWXY)
double sumWX() const
The sum of x*weight.
void flipXY()
Interchange X and Y subdistributions.
double sumW() const
The sum of weights.
double yStdErr() const
Weighted standard error on the mean, , of distribution.
Axis1D< BIN1D, DBN > operator+(const Axis1D< BIN1D, DBN > &first, const Axis1D< BIN1D, DBN > &second)
Add the statistics on two axes.
Dbn2D(const Dbn2D &toCopy)
double yStdDev() const
Weighted standard deviation, , of distribution.
void fill(double valX, double valY, double weight=1.0, double fraction=1.0)
Fill, providing the fill coordinates as two different numbers.
double xRMS() const
Weighted RMS, , of distribution.
double relErrW() const
The relative error on sumW.
double yRMS() const
Weighted RMS, , of distribution.
void scaleX(double xscale)
Rescale x: needed if x histo bin edges are rescaled.
Dbn2D & operator+=(const Dbn2D &d)
Add two dbns.
double sumWXY() const
The sum of x*y*weight.
double numEntries() const
Number of entries (number of times fill was called, ignoring weights)