ATLAS Offline Software
Loading...
Searching...
No Matches
DataBin.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6// 07.06.2008, AUTHOR: OLIVER KORTNER
7//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8
9#ifndef MuonCalib_DataBinH
10#define MuonCalib_DataBinH
11
12//:::::::::::::::::::
13//:: CLASS DataBin ::
14//:::::::::::::::::::
15
24
25//::::::::::::::::::
26//:: HEADER FILES ::
27//::::::::::::::::::
28
29// STL //
30#include <vector>
31
32// MuonCalib //
34
35namespace MuonCalib {
36
37class DataBin {
38
39public:
40// Constructors //
41 DataBin();
43
44 DataBin(const std::vector<DataPoint>& points, const double epsilon);
49
50 DataBin(const Amg::VectorX & lower_boundaries,
51 const Amg::VectorX & upper_boundaries);
56
57// Methods //
58// get-methods //
59 double density() const;
61 const Amg::VectorX & centreOfBin() const;
63 const Amg::VectorX & lowerBinBoundaries() const;
65 const Amg::VectorX & upperbinBoundaries() const;
67 const Amg::VectorX & centreOfGravity() const;
70 const Amg::VectorX & standardDeviations() const;
74 unsigned int numberOfDataPoints() const;
76 const std::vector<DataPoint> & dataPoints() const;
78 DataBin * splitBin(const unsigned int & ref_coord);
85
86// set-methods //
87 bool addPoint(const DataPoint & point);
91 void addPointAndResize(const DataPoint & point, const double epsilon);
98 void setPoints(const std::vector<DataPoint> & points);
104
105private:
106// bin parameters //
107 std::vector<DataPoint> m_points; // data points in the bin
108 Amg::VectorX m_bin_centre; // centre of the bin
109 Amg::VectorX m_lower_boundaries; // lower bin boundaries
110 Amg::VectorX m_upper_boundaries; // upper bin boundaries
111 Amg::VectorX m_centre_of_gravity; // center of gravity of the data points in
112 // the bin
113 Amg::VectorX m_standard_deviations; // standard deviations from the centre of
114 // gravity
115
116};
117
118}
119
120#endif
const Amg::VectorX & centreOfBin() const
get the centre of the bin
Definition DataBin.cxx:90
Amg::VectorX m_centre_of_gravity
Definition DataBin.h:111
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...
Definition DataBin.cxx:358
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...
Definition DataBin.cxx:174
Amg::VectorX m_lower_boundaries
Definition DataBin.h:109
std::vector< DataPoint > m_points
Definition DataBin.h:107
const Amg::VectorX & lowerBinBoundaries() const
get the lower boundaries of the bin
Definition DataBin.cxx:102
const std::vector< DataPoint > & dataPoints() const
get the data points filling this bin
Definition DataBin.cxx:162
Amg::VectorX m_upper_boundaries
Definition DataBin.h:110
Amg::VectorX m_standard_deviations
Definition DataBin.h:113
const Amg::VectorX & centreOfGravity() const
get the centre of gravity of the data points
Definition DataBin.cxx:126
DataBin()
Default constructor. Give a bin with 0 content and no extensions.
Definition DataBin.cxx:23
double density() const
get the data point density in the bin
Definition DataBin.cxx:74
const Amg::VectorX & upperbinBoundaries() const
get the upper boundaries of the bin
Definition DataBin.cxx:114
bool addPoint(const DataPoint &point)
add the data point to the bin if possible; returns true if the point can be added,...
Definition DataBin.cxx:246
Amg::VectorX m_bin_centre
Definition DataBin.h:108
unsigned int numberOfDataPoints() const
get the number of data points
Definition DataBin.cxx:150
const Amg::VectorX & standardDeviations() const
get the standard deviations of the data points from the centre of gravity in all dimensions
Definition DataBin.cxx:138
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...
Definition DataBin.cxx:295
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.