ATLAS Offline Software
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 
35 namespace MuonCalib {
36 
37 class DataBin {
38 
39 public:
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 
105 private:
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
MuonCalib::DataBin::m_bin_centre
Amg::VectorX m_bin_centre
Definition: DataBin.h:108
DataPoint.h
MuonCalib::DataBin::numberOfDataPoints
unsigned int numberOfDataPoints() const
get the number of data points
Definition: DataBin.cxx:150
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
MuonCalib::DataBin::m_upper_boundaries
Amg::VectorX m_upper_boundaries
Definition: DataBin.h:110
MuonCalib::DataBin::density
double density() const
get the data point density in the bin
Definition: DataBin.cxx:74
MuonCalib::DataBin::m_centre_of_gravity
Amg::VectorX m_centre_of_gravity
Definition: DataBin.h:111
MuonCalib::DataBin::dataPoints
const std::vector< DataPoint > & dataPoints() const
get the data points filling this bin
Definition: DataBin.cxx:162
MuonCalib::DataBin::upperbinBoundaries
const Amg::VectorX & upperbinBoundaries() const
get the upper boundaries of the bin
Definition: DataBin.cxx:114
MuonCalib::DataBin::standardDeviations
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
MuonCalib::DataBin::splitBin
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
MuonCalib::DataBin::lowerBinBoundaries
const Amg::VectorX & lowerBinBoundaries() const
get the lower boundaries of the bin
Definition: DataBin.cxx:102
MuonCalib::DataBin::centreOfBin
const Amg::VectorX & centreOfBin() const
get the centre of the bin
Definition: DataBin.cxx:90
MuonCalib::DataBin::centreOfGravity
const Amg::VectorX & centreOfGravity() const
get the centre of gravity of the data points
Definition: DataBin.cxx:126
MuonCalib::DataBin::addPointAndResize
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
MuonCalib::DataBin::DataBin
DataBin()
Default constructor. Give a bin with 0 content and no extensions.
Definition: DataBin.cxx:23
MuonCalib::DataPoint
Definition: DataPoint.h:32
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::DataBin::addPoint
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
MuonCalib::DataBin
Definition: DataBin.h:37
MuonCalib::DataBin::setPoints
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
MuonCalib::DataBin::m_standard_deviations
Amg::VectorX m_standard_deviations
Definition: DataBin.h:113
MuonCalib::DataBin::m_points
std::vector< DataPoint > m_points
Definition: DataBin.h:107
jobOptions.points
points
Definition: jobOptions.GenevaPy8_Zmumu.py:97
MuonCalib::DataBin::m_lower_boundaries
Amg::VectorX m_lower_boundaries
Definition: DataBin.h:109