ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Analysis::CalibrationDataMappedHistogramContainer::Bin Class Reference

Helper class for the specification of custom binning. More...

#include <CalibrationDataContainer.h>

Collaboration diagram for Analysis::CalibrationDataMappedHistogramContainer::Bin:

Public Member Functions

 Bin ()
 
 Bin (unsigned int dimension, const double *low, const double *up)
 
 Bin (const Bin &other)
 
Binoperator= (const Bin &other)
 
 ~Bin ()
 
unsigned int getDimension () const
 
bool contains (const double *x) const
 
double getUpperBound (unsigned int dim) const
 
double getLowerBound (unsigned int dim) const
 

Private Attributes

unsigned int m_dimension
 
double * m_low
 
double * m_up
 

Detailed Description

Helper class for the specification of custom binning.

This is a very simple class, containing only the bin specification and associated access methods.

Definition at line 367 of file CalibrationDataContainer.h.

Constructor & Destructor Documentation

◆ Bin() [1/3]

Analysis::CalibrationDataMappedHistogramContainer::Bin::Bin ( )

◆ Bin() [2/3]

CalibrationDataMappedHistogramContainer::Bin::Bin ( unsigned int  dimension,
const double *  low,
const double *  up 
)

Definition at line 1453 of file CalibrationDataContainer.cxx.

1453  :
1454  m_dimension(dimension)
1455 {
1456  // Normal constructor, containing a full specification of the bin boundaries
1457 
1458  m_up = new double[dimension];
1459  m_low = new double[dimension];
1460  for (unsigned int dim = 0; dim < dimension; ++dim) {
1461  m_up[dim] = up[dim];
1462  m_low[dim] = low[dim];
1463  }
1464 }

◆ Bin() [3/3]

Analysis::CalibrationDataMappedHistogramContainer::Bin::Bin ( const Bin other)

◆ ~Bin()

CalibrationDataMappedHistogramContainer::Bin::~Bin ( )

Definition at line 1497 of file CalibrationDataContainer.cxx.

1498 {
1499  delete[] m_up;
1500  delete[] m_low;
1501 }

Member Function Documentation

◆ contains()

bool CalibrationDataMappedHistogramContainer::Bin::contains ( const double *  x) const

Definition at line 1505 of file CalibrationDataContainer.cxx.

1506 {
1507  // Determine whether the given set of variables is within the bin boundaries.
1508 
1509  for (unsigned int dim = 0; dim < m_dimension; ++dim)
1510  if (x[dim] < m_low[dim] || x[dim] > m_up[dim]) return false;
1511  return true;
1512 }

◆ getDimension()

unsigned int Analysis::CalibrationDataMappedHistogramContainer::Bin::getDimension ( ) const
inline

Definition at line 375 of file CalibrationDataContainer.h.

375 { return m_dimension; }

◆ getLowerBound()

double CalibrationDataMappedHistogramContainer::Bin::getLowerBound ( unsigned int  dim) const

Definition at line 1524 of file CalibrationDataContainer.cxx.

1525 {
1526  // Return the lower bound for the specified dimension
1527  return m_low[dim];
1528 }

◆ getUpperBound()

double CalibrationDataMappedHistogramContainer::Bin::getUpperBound ( unsigned int  dim) const

Definition at line 1516 of file CalibrationDataContainer.cxx.

1517 {
1518  // Return the upper bound for the specified dimension
1519  return m_up[dim];
1520 }

◆ operator=()

CalibrationDataMappedHistogramContainer::Bin & CalibrationDataMappedHistogramContainer::Bin::operator= ( const Bin other)

Definition at line 1480 of file CalibrationDataContainer.cxx.

1481 {
1482  if (this != &other) {
1483  m_dimension = other.m_dimension;
1484  delete[] m_up;
1485  delete[] m_low;
1486  m_up = new double[m_dimension];
1487  m_low = new double[m_dimension];
1488  for (unsigned int dim = 0; dim < m_dimension; ++dim) {
1489  m_up[dim] = other.m_up[dim];
1490  m_low[dim] = other.m_low[dim];
1491  }
1492  }
1493  return *this;
1494 }

Member Data Documentation

◆ m_dimension

unsigned int Analysis::CalibrationDataMappedHistogramContainer::Bin::m_dimension
private

Definition at line 380 of file CalibrationDataContainer.h.

◆ m_low

double* Analysis::CalibrationDataMappedHistogramContainer::Bin::m_low
private

Definition at line 381 of file CalibrationDataContainer.h.

◆ m_up

double* Analysis::CalibrationDataMappedHistogramContainer::Bin::m_up
private

Definition at line 382 of file CalibrationDataContainer.h.


The documentation for this class was generated from the following files:
Analysis::CalibrationDataMappedHistogramContainer::Bin::m_dimension
unsigned int m_dimension
Definition: CalibrationDataContainer.h:380
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
Analysis::CalibrationDataMappedHistogramContainer::Bin::m_up
double * m_up
Definition: CalibrationDataContainer.h:382
x
#define x
CalibCoolCompareRT.up
up
Definition: CalibCoolCompareRT.py:109
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
Analysis::CalibrationDataMappedHistogramContainer::Bin::m_low
double * m_low
Definition: CalibrationDataContainer.h:381