![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef CALOEVENT_CALOBINDESCRIPTOR_H
6 #define CALOEVENT_CALOBINDESCRIPTOR_H
123 : m_bins (theBins.m_bins)
131 if (
this != &theBins)
149 if ( lowerEdge < upperEdge && nBins > 0 )
151 double fBin =lowerEdge;
152 double dBin = ( upperEdge - lowerEdge ) / (
double)
nBins;
153 while ( fBin <= ( upperEdge + dBin/2. ) )
155 m_bins.push_back(fBin);
168 return m_bins.size()-1;
174 return m_bins.size() > 0 ? *(m_bins.begin()) : 0.;
180 return m_bins.size() > 0 ? *(--(m_bins.end())) : 0.;
186 return theIndex < m_bins.size()-2 ? m_bins[theIndex] : 0.;
192 return theIndex < m_bins.size()-1 ? m_bins[theIndex+1] : 0;
198 return theIndex < m_bins.size()-2
199 ? m_bins[theIndex+1] - m_bins[theIndex]
213 while ( theIndex < this->getNumberOfBins() && theData > m_bins[theIndex] )
217 return theIndex < this->getNumberOfBins() ? theIndex : m_outOfRange;
223 return theIndex != m_outOfRange
224 ? theIndex < this->getNumberOfBins()
size_t outOfRangeMarker() const
Returns the value of the out-of-range marker.
T upperBinEdge(size_t theIndex) const
Retrieve the upper bin edge of a given bin.
CaloBinDescriptor & operator=(const CaloBinDescriptor &theBins)
Assignment.
T binWidth(size_t theIndex) const
Retrieve the bin width of a given bin.
bool outOfRange(size_t theIndex) const
Tests if given index is out of valid range.
CaloBinDescriptor(const CaloBinDescriptor &theBins)
Explicit copy constructor.
size_t getIndex(const T &theData) const
Get the index for a iven value.
std::vector< T > m_bins
Bin store.
CaloBinDescriptor(size_t nBins, const T &lowerLimit, const T &upperLimit)
Construct with regular bins.
CaloBinDescriptor()
Default constructor generates empty bin descriptor.
Data object containing bin descriptions.
const std::vector< T > & getBinning() const
Direct Access to the vector describing the binning.
T lowerBound() const
Retrieve the lower value range boundary.
~CaloBinDescriptor()
Default constructor.
T lowerBinEdge(size_t theIndex) const
Retrieve the lower bin edge of a given bin.
T upperBound() const
Retrieve the upper value range boundary.
static const size_t m_outOfRange
Out-of-range marker (convention)
CaloBinDescriptor(const std::vector< T > &theBins)
Construct with variable sized bins.
size_t getNumberOfBins() const
Retrieve the number of bins.