ATLAS Offline Software
SamplePoint.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MuonCalibMath_SamplePoint_H
6 #define MuonCalibMath_SamplePoint_H
7 
8 #include <array>
9 namespace MuonCalib {
10 
16  class SamplePoint {
17  private:
18  // sample point triplet //
19  double m_x1{0.};
20  double m_x2{0.};
21  double m_sigma{0.};
22  public:
23  // Constructors
24  SamplePoint() = default;
29  SamplePoint(const std::array<double, 3>& triplet):
30  m_x1{triplet[0]}, m_x2{triplet[1]}, m_sigma{triplet[2]}{}
31 
36  SamplePoint(const double mx1,
37  const double mx2,
38  const double msigma):
39  m_x1{mx1}, m_x2{mx2}, m_sigma{msigma} {}
40  // Methods
41  // get-methods //
43  inline double x1() const { return m_x1; }
45  inline double x2() const { return m_x2; }
47  inline double error() const { return m_sigma; }
48  // set-methods //
53  inline void set_triplet(const std::array<double, 3>& values){
54  m_x1 = values[0];
55  m_x2 = values[1];
56  m_sigma = values[2];
57  }
59  inline void set_x1(const double mx1){m_x1 = mx1; }
61  inline void set_x2(const double mx2){m_x2 = mx2; }
63  inline void set_error(const double merror) { m_sigma = merror; }
64  };
65 }
66 #endif
MuonCalib::SamplePoint::set_triplet
void set_triplet(const std::array< double, 3 > &values)
set the sample point, x[0] = x1 coordinate of the sample point, x[1] = x2 coordinate of the sample po...
Definition: SamplePoint.h:53
MuonCalib::SamplePoint::error
double error() const
Definition: SamplePoint.h:47
MuonCalib::SamplePoint::set_error
void set_error(const double merror)
Definition: SamplePoint.h:63
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:805
MuonCalib::SamplePoint::set_x2
void set_x2(const double mx2)
set the error of the x2 coordinate sample point to merror
Definition: SamplePoint.h:61
MuonCalib::SamplePoint::x1
double x1() const
< get the x1 coordinate of the sample point
Definition: SamplePoint.h:43
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::SamplePoint::m_x2
double m_x2
x2 coordinate of the sample point
Definition: SamplePoint.h:20
MuonCalib::SamplePoint::SamplePoint
SamplePoint(const std::array< double, 3 > &triplet)
constructor, triplet[0] = x1 coordinate of the sample point, triplet[1] = x2 coordinate of the sample...
Definition: SamplePoint.h:29
fitman.mx2
mx2
Definition: fitman.py:536
MuonCalib::SamplePoint::x2
double x2() const
get the error on the x2 coordinate of the sample point
Definition: SamplePoint.h:45
MuonCalib::SamplePoint
Definition: SamplePoint.h:16
MuonCalib::SamplePoint::SamplePoint
SamplePoint(const double mx1, const double mx2, const double msigma)
constructor, mx1 = x1 coordinate of the sample point, mx2 = x2 coordinate of the sample point,...
Definition: SamplePoint.h:36
MuonCalib::SamplePoint::set_x1
void set_x1(const double mx1)
set the x2 coordinate of the sample point to mx2
Definition: SamplePoint.h:59
MuonCalib::SamplePoint::m_sigma
double m_sigma
error of the x2 coordinate of the sample point
Definition: SamplePoint.h:21
MuonCalib::SamplePoint::m_x1
double m_x1
x1 coordinate of the sample point
Definition: SamplePoint.h:19
MuonCalib::SamplePoint::SamplePoint
SamplePoint()=default