yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis  1.9.0
YODA::Bin2D< DBN > Class Template Reference

A generic 2D bin type. More...

#include <Bin2D.h>

Inheritance diagram for YODA::Bin2D< DBN >:
YODA::Bin

Public Member Functions

Constructors
 Bin2D (const std::pair< double, double > &xedges, const std::pair< double, double > &yedges)
 Make a new, empty bin with two pairs of edges. More...
 
 Bin2D (const std::pair< double, double > &xedges, const std::pair< double, double > &yedges, const DBN &dbn)
 Make a bin with all the components of a fill history. More...
 
 Bin2D (const Bin2D< DBN > &b)
 Copy constructor. More...
 
Bin2D< DBN > & operator= (const Bin2D< DBN > &b)
 Copy assignment. More...
 
Dimensions
size_t dim ()
 
size_t fillDim ()
 Dimension of the fill space. More...
 
Modifiers
virtual void reset ()
 Reset this bin. More...
 
void scaleW (double scalefactor)
 
void scaleXY (double scaleX, double scaleY)
 
X-axis info
std::pair< double, double > xEdges () const
 Get the {low,high} edges as an STL pair. More...
 
double xMin () const
 Lower x limit of the bin (inclusive). More...
 
double xMax () const
 Upper x limit of the bin (exclusive). More...
 
std::pair< double, double > yEdges () const
 Get the {low,high} edges as an STL pair. More...
 
double yMin () const
 Lower y limit of the bin (inclusive). More...
 
double yMax () const
 Upper y limit of the bin (exclusive). More...
 
double xMid () const
 Middle of the bin in x. More...
 
double yMid () const
 Middle of the bin in y. More...
 
std::pair< double, double > xyMid () const
 The geometric centre of the bin. More...
 
double xWidth () const
 Width of the bin in x. More...
 
double yWidth () const
 Width of the bin in y. More...
 
std::pair< double, double > xyWidths () const
 Widths of the bin in x and y. More...
 
double area () const
 Area of the bin in x-y. More...
 
double xFocus () const
 The mean x position in the bin, or the x midpoint if that is not available. More...
 
double yFocus () const
 The mean y position in the bin, or the y midpoint if that is not available. More...
 
std::pair< double, double > xyFocus () const
 The mean position in the bin, or the midpoint if that is not available. More...
 
Distribution statistics
double xMean () const
 Mean value of x-values in the bin. More...
 
double yMean () const
 Mean value of y-values in the bin. More...
 
double xVariance () const
 The variance of x-values in the bin. More...
 
double yVariance () const
 The variance of y-values in the bin. More...
 
double xStdDev () const
 The standard deviation (spread) of x-values in the bin. More...
 
double yStdDev () const
 The standard deviation (spread) of y-values in the bin. More...
 
double xStdErr () const
 The standard error on the bin x focus. More...
 
double yStdErr () const
 The standard error on the bin y focus. More...
 
double xRMS () const
 The x RMS in the bin. More...
 
double yRMS () const
 The y RMS in the bin. More...
 
Raw distribution statistics
DBN & dbn ()
 Statistical distribution in this bin (non-const) More...
 
const DBN & dbn () const
 Statistical distribution in this bin (const) More...
 
double numEntries () const
 The number of entries. More...
 
double effNumEntries () const
 The effective number of entries. More...
 
double sumW () const
 The sum of weights. More...
 
double sumW2 () const
 The sum of weights squared. More...
 
double sumWX () const
 The sum of x*weight. More...
 
double sumWY () const
 The sum of y*weight. More...
 
double sumWXY () const
 The sum of x*y*weight. More...
 
double sumWX2 () const
 The sum of x^2 * weight. More...
 
double sumWY2 () const
 The sum of y^2 * weight. More...
 
Operators
Bin2D< DBN > & operator+= (const Bin2D< DBN > &b)
 Add two bins. More...
 
Bin2D< DBN > & operator-= (const Bin2D< DBN > &b)
 Subtract one bin from another. More...
 
Named operators
Bin2D< DBN > & add (const Bin2D< DBN > &b)
 Merge two adjacent bins. More...
 
Bin2D< DBN > & subtract (const Bin2D< DBN > &b)
 
bool fitsInside (std::pair< double, double > xrange, std::pair< double, double > yrange) const
 Test whether this bin would fit inside the given area. More...
 
bool bounds (double x, double y) const
 Test whether a point lies within the current bin. More...
 
int adjacentTo (const Bin2D< DBN > &b) const
 Test whether two bins are adjacent and, if so, return how as an integer. More...
 
- Public Member Functions inherited from YODA::Bin
virtual ~Bin ()
 Virtual destructor for inheritance. More...
 

Detailed Description

template<class DBN>
class YODA::Bin2D< DBN >

A generic 2D bin type.

This is a generic 2D bin type which supplies the accessors for the two "x" and "y" axis directions in which it is defined. Bin2D is not intended to be directly instantiated: it is inherited from to make specific histogram and profile bin types as HistoBin2D and ProfileBin2D. The lower bin edges in x and y are inclusive. This base class provides no fill method, since the signatures for standard and profile histos differ.

Definition at line 25 of file Bin2D.h.

Constructor & Destructor Documentation

◆ Bin2D() [1/3]

template<class DBN>
YODA::Bin2D< DBN >::Bin2D ( const std::pair< double, double > &  xedges,
const std::pair< double, double > &  yedges 
)
inline

Make a new, empty bin with two pairs of edges.

Definition at line 46 of file Bin2D.h.

47  : _xedges(xedges), _yedges(yedges)
48  {
49  if (_xedges.second < _xedges.first) {
50  throw RangeError("The bin x-edges are wrongly defined!");
51  }
52  if (_yedges.second < _yedges.first) {
53  throw RangeError("The bin y-edges are wrongly defined!");
54  }
55  }

◆ Bin2D() [2/3]

template<class DBN>
YODA::Bin2D< DBN >::Bin2D ( const std::pair< double, double > &  xedges,
const std::pair< double, double > &  yedges,
const DBN &  dbn 
)
inline

Make a bin with all the components of a fill history.

Mainly intended for internal persistency use.

Definition at line 61 of file Bin2D.h.

63  : _xedges(xedges), _yedges(yedges), _dbn(dbn)
64  {
65  if (_xedges.second < _xedges.first) {
66  throw RangeError("The bin x-edges are wrongly defined!");
67  }
68  if (_yedges.second < _yedges.first) {
69  throw RangeError("The bin y-edges are wrongly defined!");
70  }
71  }
DBN & dbn()
Statistical distribution in this bin (non-const)
Definition: Bin2D.h:296

◆ Bin2D() [3/3]

template<class DBN>
YODA::Bin2D< DBN >::Bin2D ( const Bin2D< DBN > &  b)
inline

Copy constructor.

Definition at line 75 of file Bin2D.h.

76  : _xedges(b._xedges),
77  _yedges(b._yedges),
78  _dbn(b._dbn)
79  { }

Member Function Documentation

◆ add()

template<class DBN>
Bin2D<DBN>& YODA::Bin2D< DBN >::add ( const Bin2D< DBN > &  b)
inline

Merge two adjacent bins.

Add two bins (internal, explicitly named version)

This operator is defined for adding two bins with equivalent binning. It cannot be used to merge two bins into one larger bin.

Definition at line 397 of file Bin2D.h.

Referenced by YODA::ProfileBin2D::add(), and YODA::Bin2D< Dbn3D >::operator+=().

397  {
398  if (_xedges != b._xedges || _yedges != b._yedges) {
399  throw LogicError("Attempted to add two bins with different edges");
400  }
401  _dbn += b._dbn;
402  return *this;
403  }

◆ adjacentTo()

template<class DBN>
int YODA::Bin2D< DBN >::adjacentTo ( const Bin2D< DBN > &  b) const
inline

Test whether two bins are adjacent and, if so, return how as an integer.

Definition at line 434 of file Bin2D.h.

434  {
435  for (int i = 0; i < 4; i++) {
436  if (_edges_equal(b, i, (i+2) % 4))
437  return i;
438  }
439  return -1;
440  }

◆ area()

template<class DBN>
double YODA::Bin2D< DBN >::area ( ) const
inline

Area of the bin in x-y.

Definition at line 209 of file Bin2D.h.

Referenced by YODA::toTH2D().

209  {
210  return xWidth() * yWidth();
211  }
double xWidth() const
Width of the bin in x.
Definition: Bin2D.h:193
double yWidth() const
Width of the bin in y.
Definition: Bin2D.h:198

◆ bounds()

template<class DBN>
bool YODA::Bin2D< DBN >::bounds ( double  x,
double  y 
) const
inline

Test whether a point lies within the current bin.

Definition at line 428 of file Bin2D.h.

428  {
429  return (x >= xMin() && x < xMax() && y >= yMin() && y < yMax());
430  }
double yMax() const
Upper y limit of the bin (exclusive).
Definition: Bin2D.h:171
double xMin() const
Lower x limit of the bin (inclusive).
Definition: Bin2D.h:150
double yMin() const
Lower y limit of the bin (inclusive).
Definition: Bin2D.h:166
double xMax() const
Upper x limit of the bin (exclusive).
Definition: Bin2D.h:155

◆ dbn() [1/2]

template<class DBN>
DBN& YODA::Bin2D< DBN >::dbn ( )
inline

Statistical distribution in this bin (non-const)

Definition at line 296 of file Bin2D.h.

296  {
297  return _dbn;
298  }

◆ dbn() [2/2]

template<class DBN>
const DBN& YODA::Bin2D< DBN >::dbn ( ) const
inline

Statistical distribution in this bin (const)

Definition at line 301 of file Bin2D.h.

301  {
302  return _dbn;
303  }

◆ dim()

template<class DBN>
size_t YODA::Bin2D< DBN >::dim ( )
inlinevirtual

Dimension of the fill space

Todo:
Convert to total dimension

Implements YODA::Bin.

Definition at line 99 of file Bin2D.h.

99 { return 2; }

◆ effNumEntries()

template<class DBN>
double YODA::Bin2D< DBN >::effNumEntries ( ) const
inlinevirtual

The effective number of entries.

Implements YODA::Bin.

Definition at line 311 of file Bin2D.h.

311  {
312  return _dbn.effNumEntries();
313  }

◆ fillDim()

template<class DBN>
size_t YODA::Bin2D< DBN >::fillDim ( )
inlinevirtual

Dimension of the fill space.

Implements YODA::Bin.

Definition at line 102 of file Bin2D.h.

102 { return 2; }

◆ fitsInside()

template<class DBN>
bool YODA::Bin2D< DBN >::fitsInside ( std::pair< double, double >  xrange,
std::pair< double, double >  yrange 
) const
inline

Test whether this bin would fit inside the given area.

Definition at line 419 of file Bin2D.h.

420  {
421  return (xMin() >= xrange.first &&
422  yMin() >= yrange.first &&
423  xMax() < xrange.second &&
424  yMax() < yrange.second);
425  }
double yMax() const
Upper y limit of the bin (exclusive).
Definition: Bin2D.h:171
double xMin() const
Lower x limit of the bin (inclusive).
Definition: Bin2D.h:150
double yMin() const
Lower y limit of the bin (inclusive).
Definition: Bin2D.h:166
double xMax() const
Upper x limit of the bin (exclusive).
Definition: Bin2D.h:155

◆ numEntries()

template<class DBN>
double YODA::Bin2D< DBN >::numEntries ( ) const
inlinevirtual

The number of entries.

Implements YODA::Bin.

Definition at line 306 of file Bin2D.h.

Referenced by YODA::efficiency().

306  {
307  return _dbn.numEntries();
308  }

◆ operator+=()

template<class DBN>
Bin2D<DBN>& YODA::Bin2D< DBN >::operator+= ( const Bin2D< DBN > &  b)
inline

Add two bins.

Definition at line 359 of file Bin2D.h.

359  {
360  return add(b);
361  }
Bin2D< DBN > & add(const Bin2D< DBN > &b)
Merge two adjacent bins.
Definition: Bin2D.h:397

◆ operator-=()

template<class DBN>
Bin2D<DBN>& YODA::Bin2D< DBN >::operator-= ( const Bin2D< DBN > &  b)
inline

Subtract one bin from another.

Definition at line 364 of file Bin2D.h.

364  {
365  return subtract(b);
366  }
Bin2D< DBN > & subtract(const Bin2D< DBN > &b)
Definition: Bin2D.h:410

◆ operator=()

template<class DBN>
Bin2D<DBN>& YODA::Bin2D< DBN >::operator= ( const Bin2D< DBN > &  b)
inline

Copy assignment.

Definition at line 83 of file Bin2D.h.

Referenced by YODA::HistoBin2D::operator=(), and YODA::ProfileBin2D::operator=().

83  {
84  _xedges = b._xedges;
85  _yedges = b._yedges;
86  _dbn = b._dbn;
87  return *this;
88  }

◆ reset()

template<class DBN>
virtual void YODA::Bin2D< DBN >::reset ( )
inlinevirtual

Reset this bin.

Implements YODA::Bin.

Reimplemented in YODA::ProfileBin2D, and YODA::HistoBin2D.

Definition at line 111 of file Bin2D.h.

Referenced by YODA::HistoBin2D::reset(), and YODA::ProfileBin2D::reset().

111  {
112  _dbn.reset();
113  }

◆ scaleW()

template<class DBN>
void YODA::Bin2D< DBN >::scaleW ( double  scalefactor)
inline

Rescale as if all fill weights had been different by factor scalefactor

Note
This should not be used, since it breaks histogram consistency. It will be removed in a future version.

Definition at line 118 of file Bin2D.h.

118  {
119  _dbn.scaleW(scalefactor);
120  }

◆ scaleXY()

template<class DBN>
void YODA::Bin2D< DBN >::scaleXY ( double  scaleX,
double  scaleY 
)
inline

Scale the x and y coordinates and distributions.

Note
This should not be used, since it breaks histogram consistency. It will be removed in a future version.

Definition at line 125 of file Bin2D.h.

125  {
126  _xedges.first *= scaleX;
127  _xedges.second *= scaleX;
128 
129  _yedges.first *= scaleY;
130  _yedges.second *= scaleY;
131 
132  _dbn.scaleX(scaleX);
133  _dbn.scaleY(scaleY);
134  }

◆ subtract()

template<class DBN>
Bin2D<DBN>& YODA::Bin2D< DBN >::subtract ( const Bin2D< DBN > &  b)
inline

Subtract one bin from another (internal, explicitly named version)

This operator is defined for subtracting two bins with equivalent binning. It cannot be used to merge two bins into one larger bin.

Definition at line 410 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::operator-=(), and YODA::ProfileBin2D::subtract().

410  {
411  if (_xedges != b._xedges || _yedges != b._yedges) {
412  throw LogicError("Attempted to subtract two bins with different edges");
413  }
414  _dbn -= b._dbn;
415  return *this;
416  }

◆ sumW()

template<class DBN>
double YODA::Bin2D< DBN >::sumW ( ) const
inlinevirtual

The sum of weights.

Implements YODA::Bin.

Definition at line 316 of file Bin2D.h.

Referenced by YODA::mkScatter(), YODA::toTH2D(), YODA::Bin2D< Dbn3D >::xFocus(), and YODA::Bin2D< Dbn3D >::yFocus().

316  {
317  return _dbn.sumW();
318  }

◆ sumW2()

template<class DBN>
double YODA::Bin2D< DBN >::sumW2 ( ) const
inlinevirtual

The sum of weights squared.

Implements YODA::Bin.

Definition at line 321 of file Bin2D.h.

Referenced by YODA::toTH2D().

321  {
322  return _dbn.sumW2();
323  }

◆ sumWX()

template<class DBN>
double YODA::Bin2D< DBN >::sumWX ( ) const
inline

The sum of x*weight.

Definition at line 326 of file Bin2D.h.

326  {
327  return _dbn.sumWX();
328  }

◆ sumWX2()

template<class DBN>
double YODA::Bin2D< DBN >::sumWX2 ( ) const
inline

The sum of x^2 * weight.

Definition at line 341 of file Bin2D.h.

341  {
342  return _dbn.sumWX2();
343  }

◆ sumWXY()

template<class DBN>
double YODA::Bin2D< DBN >::sumWXY ( ) const
inline

The sum of x*y*weight.

Definition at line 336 of file Bin2D.h.

336  {
337  return _dbn.sumWXY();
338  }

◆ sumWY()

template<class DBN>
double YODA::Bin2D< DBN >::sumWY ( ) const
inline

The sum of y*weight.

Definition at line 331 of file Bin2D.h.

331  {
332  return _dbn.sumWY();
333  }

◆ sumWY2()

template<class DBN>
double YODA::Bin2D< DBN >::sumWY2 ( ) const
inline

The sum of y^2 * weight.

Definition at line 346 of file Bin2D.h.

346  {
347  return _dbn.sumWY2();
348  }

◆ xEdges()

template<class DBN>
std::pair<double,double> YODA::Bin2D< DBN >::xEdges ( ) const
inline

Get the {low,high} edges as an STL pair.

Definition at line 145 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::adjacentTo().

145  {
146  return _xedges;
147  }

◆ xFocus()

template<class DBN>
double YODA::Bin2D< DBN >::xFocus ( ) const
inline

The mean x position in the bin, or the x midpoint if that is not available.

Definition at line 215 of file Bin2D.h.

Referenced by YODA::mkScatter(), and YODA::Bin2D< Dbn3D >::xyFocus().

215  {
216  return (!isZero(sumW())) ? xMean() : xMid();
217  }
bool isZero(double val, double tolerance=1E-8)
Definition: MathUtils.h:56
double xMean() const
Mean value of x-values in the bin.
Definition: Bin2D.h:238
double xMid() const
Middle of the bin in x.
Definition: Bin2D.h:177
double sumW() const
The sum of weights.
Definition: Bin2D.h:316

◆ xMax()

template<class DBN>
double YODA::Bin2D< DBN >::xMax ( ) const
inline

Upper x limit of the bin (exclusive).

Definition at line 155 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::adjacentTo(), YODA::Bin2D< Dbn3D >::bounds(), YODA::divide(), YODA::Bin2D< Dbn3D >::fitsInside(), YODA::mkScatter(), YODA::toTH2D(), YODA::Bin2D< Dbn3D >::xMid(), and YODA::Bin2D< Dbn3D >::xWidth().

155  {
156  return _xedges.second;
157  }

◆ xMean()

template<class DBN>
double YODA::Bin2D< DBN >::xMean ( ) const
inline

Mean value of x-values in the bin.

Definition at line 238 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::xFocus().

238  {
239  return _dbn.xMean();
240  }

◆ xMid()

template<class DBN>
double YODA::Bin2D< DBN >::xMid ( ) const
inline

Middle of the bin in x.

Definition at line 177 of file Bin2D.h.

Referenced by YODA::divide(), YODA::mkScatter(), YODA::Bin2D< Dbn3D >::xFocus(), and YODA::Bin2D< Dbn3D >::xyMid().

177  {
178  return (xMax() + xMin())/2.0;
179  }
double xMin() const
Lower x limit of the bin (inclusive).
Definition: Bin2D.h:150
double xMax() const
Upper x limit of the bin (exclusive).
Definition: Bin2D.h:155

◆ xMin()

template<class DBN>
double YODA::Bin2D< DBN >::xMin ( ) const
inline

◆ xRMS()

template<class DBN>
double YODA::Bin2D< DBN >::xRMS ( ) const
inline

The x RMS in the bin.

Definition at line 278 of file Bin2D.h.

278  {
279  return _dbn.xRMS();
280  }

◆ xStdDev()

template<class DBN>
double YODA::Bin2D< DBN >::xStdDev ( ) const
inline

The standard deviation (spread) of x-values in the bin.

Definition at line 258 of file Bin2D.h.

258  {
259  return _dbn.xStdDev();
260  }

◆ xStdErr()

template<class DBN>
double YODA::Bin2D< DBN >::xStdErr ( ) const
inline

The standard error on the bin x focus.

Definition at line 268 of file Bin2D.h.

268  {
269  return _dbn.xStdErr();
270  }

◆ xVariance()

template<class DBN>
double YODA::Bin2D< DBN >::xVariance ( ) const
inline

The variance of x-values in the bin.

Definition at line 248 of file Bin2D.h.

248  {
249  return _dbn.xVariance();
250  }

◆ xWidth()

template<class DBN>
double YODA::Bin2D< DBN >::xWidth ( ) const
inline

Width of the bin in x.

Definition at line 193 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::area(), YODA::mkScatter(), and YODA::Bin2D< Dbn3D >::xyWidths().

193  {
194  return xMax() - xMin();
195  }
double xMin() const
Lower x limit of the bin (inclusive).
Definition: Bin2D.h:150
double xMax() const
Upper x limit of the bin (exclusive).
Definition: Bin2D.h:155

◆ xyFocus()

template<class DBN>
std::pair<double, double> YODA::Bin2D< DBN >::xyFocus ( ) const
inline

The mean position in the bin, or the midpoint if that is not available.

Definition at line 225 of file Bin2D.h.

225  {
226  return std::make_pair(xFocus(), yFocus());
227  }
double yFocus() const
The mean y position in the bin, or the y midpoint if that is not available.
Definition: Bin2D.h:220
double xFocus() const
The mean x position in the bin, or the x midpoint if that is not available.
Definition: Bin2D.h:215

◆ xyMid()

template<class DBN>
std::pair<double, double> YODA::Bin2D< DBN >::xyMid ( ) const
inline

The geometric centre of the bin.

Definition at line 187 of file Bin2D.h.

Referenced by YODA::Histo2D::fillBin().

187  {
188  return std::make_pair(xMid(), yMid());
189  }
double xMid() const
Middle of the bin in x.
Definition: Bin2D.h:177
double yMid() const
Middle of the bin in y.
Definition: Bin2D.h:182

◆ xyWidths()

template<class DBN>
std::pair<double, double> YODA::Bin2D< DBN >::xyWidths ( ) const
inline

Widths of the bin in x and y.

Definition at line 203 of file Bin2D.h.

203  {
204  return std::make_pair(xWidth(), yWidth());
205  }
double xWidth() const
Width of the bin in x.
Definition: Bin2D.h:193
double yWidth() const
Width of the bin in y.
Definition: Bin2D.h:198

◆ yEdges()

template<class DBN>
std::pair<double,double> YODA::Bin2D< DBN >::yEdges ( ) const
inline

Get the {low,high} edges as an STL pair.

Definition at line 161 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::adjacentTo().

161  {
162  return _yedges;
163  }

◆ yFocus()

template<class DBN>
double YODA::Bin2D< DBN >::yFocus ( ) const
inline

The mean y position in the bin, or the y midpoint if that is not available.

Definition at line 220 of file Bin2D.h.

Referenced by YODA::mkScatter(), and YODA::Bin2D< Dbn3D >::xyFocus().

220  {
221  return (!isZero(sumW())) ? yMean() : yMid();
222  }
bool isZero(double val, double tolerance=1E-8)
Definition: MathUtils.h:56
double sumW() const
The sum of weights.
Definition: Bin2D.h:316
double yMid() const
Middle of the bin in y.
Definition: Bin2D.h:182
double yMean() const
Mean value of y-values in the bin.
Definition: Bin2D.h:243

◆ yMax()

template<class DBN>
double YODA::Bin2D< DBN >::yMax ( ) const
inline

Upper y limit of the bin (exclusive).

Definition at line 171 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::adjacentTo(), YODA::Bin2D< Dbn3D >::bounds(), YODA::divide(), YODA::Bin2D< Dbn3D >::fitsInside(), YODA::mkScatter(), YODA::toTH2D(), YODA::Bin2D< Dbn3D >::yMid(), and YODA::Bin2D< Dbn3D >::yWidth().

171  {
172  return _yedges.second;
173  }

◆ yMean()

template<class DBN>
double YODA::Bin2D< DBN >::yMean ( ) const
inline

Mean value of y-values in the bin.

Definition at line 243 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::yFocus().

243  {
244  return _dbn.yMean();
245  }

◆ yMid()

template<class DBN>
double YODA::Bin2D< DBN >::yMid ( ) const
inline

Middle of the bin in y.

Definition at line 182 of file Bin2D.h.

Referenced by YODA::divide(), YODA::mkScatter(), YODA::Bin2D< Dbn3D >::xyMid(), and YODA::Bin2D< Dbn3D >::yFocus().

182  {
183  return (yMax() + yMin())/2.0;
184  }
double yMax() const
Upper y limit of the bin (exclusive).
Definition: Bin2D.h:171
double yMin() const
Lower y limit of the bin (inclusive).
Definition: Bin2D.h:166

◆ yMin()

template<class DBN>
double YODA::Bin2D< DBN >::yMin ( ) const
inline

Lower y limit of the bin (inclusive).

Definition at line 166 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::adjacentTo(), YODA::Bin2D< Dbn3D >::bounds(), YODA::divide(), YODA::Bin2D< Dbn3D >::fitsInside(), YODA::mkScatter(), YODA::toTH2D(), YODA::Bin2D< Dbn3D >::yMid(), and YODA::Bin2D< Dbn3D >::yWidth().

166  {
167  return _yedges.first;
168  }

◆ yRMS()

template<class DBN>
double YODA::Bin2D< DBN >::yRMS ( ) const
inline

The y RMS in the bin.

Definition at line 283 of file Bin2D.h.

283  {
284  return _dbn.yRMS();
285  }

◆ yStdDev()

template<class DBN>
double YODA::Bin2D< DBN >::yStdDev ( ) const
inline

The standard deviation (spread) of y-values in the bin.

Definition at line 263 of file Bin2D.h.

263  {
264  return _dbn.yStdDev();
265  }

◆ yStdErr()

template<class DBN>
double YODA::Bin2D< DBN >::yStdErr ( ) const
inline

The standard error on the bin y focus.

Definition at line 273 of file Bin2D.h.

273  {
274  return _dbn.yStdErr();
275  }

◆ yVariance()

template<class DBN>
double YODA::Bin2D< DBN >::yVariance ( ) const
inline

The variance of y-values in the bin.

Definition at line 253 of file Bin2D.h.

253  {
254  return _dbn.yVariance();
255  }

◆ yWidth()

template<class DBN>
double YODA::Bin2D< DBN >::yWidth ( ) const
inline

Width of the bin in y.

Definition at line 198 of file Bin2D.h.

Referenced by YODA::Bin2D< Dbn3D >::area(), YODA::mkScatter(), and YODA::Bin2D< Dbn3D >::xyWidths().

198  {
199  return yMax() - yMin();
200  }
double yMax() const
Upper y limit of the bin (exclusive).
Definition: Bin2D.h:171
double yMin() const
Lower y limit of the bin (inclusive).
Definition: Bin2D.h:166

The documentation for this class was generated from the following file: