|
ATLAS Offline Software
|
Go to the documentation of this file.
34 for (
unsigned int k=0;
k<
points.size();
k++) {
53 if (lower_boundaries.rows()!=upper_boundaries.rows()) {
54 throw std::runtime_error(Form(
"File: %s, Line: %d\nDataBin::DataBin - Dimensions of lower and upper bin boundaries disagree.", __FILE__, __LINE__));
180 if (ref_coord>=
static_cast<unsigned int >(
m_bin_centre.rows())) {
181 throw std::runtime_error(Form(
"File: %s, Line: %d\nDataBin::splitBin - Reference coordinate out of range!", __FILE__, __LINE__));
189 throw std::runtime_error(Form(
"File: %s, Line: %d\nDataBin::splitBin - Less than 4 points in the bin!", __FILE__, __LINE__));
197 m_points[
k].setReferenceComponent(ref_coord);
212 bin_1_up[ref_coord] = (
m_points[k_split]).dataVector()[ref_coord];
213 std::vector<DataPoint> bin_1_points(k_split);
214 for (
unsigned k=0;
k<k_split;
k++) {
220 bin_2_low[ref_coord] = (
m_points[k_split]).dataVector()[ref_coord];
222 std::vector<DataPoint> bin_2_points(
m_points.size()-k_split);
223 for (
unsigned int k=k_split;
k<
m_points.size();
k++) {
270 static_cast<double>(
m_points.size());
277 static_cast<double>(
m_points.size()-1);
280 static_cast<double>(
m_points.size());
311 static_cast<double>(
m_points.size());
318 static_cast<double>(
m_points.size()-1);
321 static_cast<double>(
m_points.size());
377 static_cast<double>(
m_points.size());
384 static_cast<double>(
m_points.size()-1);
387 static_cast<double>(
m_points.size());
Amg::VectorX m_bin_centre
unsigned int numberOfDataPoints() const
get the number of data points
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Amg::VectorX m_upper_boundaries
double density() const
get the data point density in the bin
Amg::VectorX m_centre_of_gravity
const std::vector< DataPoint > & dataPoints() const
get the data points filling this bin
const Amg::VectorX & upperbinBoundaries() const
get the upper boundaries of the bin
const Amg::VectorX & standardDeviations() const
get the standard deviations of the data points from the centre of gravity in all dimensions
DataBin * splitBin(const unsigned int &ref_coord)
divide the bin into two of equal content; splitting is done along the coordinate ref_coord; the metho...
const Amg::VectorX & lowerBinBoundaries() const
get the lower boundaries of the bin
const Amg::VectorX & centreOfBin() const
get the centre of the bin
const Amg::VectorX & centreOfGravity() const
get the centre of gravity of the data points
void addPointAndResize(const DataPoint &point, const double epsilon)
add the data point to the bin; the bin will be resized if the point does not fit into the bin; the up...
DataBin()
Default constructor. Give a bin with 0 content and no extensions.
const Amg::VectorX & dataVector() const
get the data vector
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
bool addPoint(const DataPoint &point)
add the data point to the bin if possible; returns true if the point can be added,...
void setPoints(const std::vector< DataPoint > &points)
fill the bin with the given points; the use of this method is highly discouraged, it is needed for th...
Amg::VectorX m_standard_deviations
constexpr int pow(int base, int exp) noexcept
std::vector< DataPoint > m_points
Amg::VectorX m_lower_boundaries