ATLAS Offline Software
Loading...
Searching...
No Matches
SamplePoint.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MuonCalibMath_SamplePoint_H
5#define MuonCalibMath_SamplePoint_H
6
7#include <array>
8namespace MuonCalib {
9
14
16 private:
17 // sample point triplet //
18 double m_x1{0.};
19 double m_x2{0.};
20 double m_sigma{0.};
21 public:
22 // Constructors
23 SamplePoint() = default;
28 SamplePoint(const std::array<double, 3>& triplet):
29 m_x1{triplet[0]}, m_x2{triplet[1]}, m_sigma{triplet[2]}{}
30
35 SamplePoint(const double mx1,
36 const double mx2,
37 const double msigma):
38 m_x1{mx1}, m_x2{mx2}, m_sigma{msigma} {}
39 // Methods
40 // get-methods //
42 inline double x1() const { return m_x1; }
44 inline double x2() const { return m_x2; }
46 inline double error() const { return m_sigma; }
47 // set-methods //
52 inline void set_triplet(const std::array<double, 3>& values){
53 m_x1 = values[0];
54 m_x2 = values[1];
55 m_sigma = values[2];
56 }
58 inline void set_x1(const double mx1){m_x1 = mx1; }
60 inline void set_x2(const double mx2){m_x2 = mx2; }
62 inline void set_error(const double merror) { m_sigma = merror; }
63 };
64}
65#endif
double m_sigma
error of the x2 coordinate of the sample point
Definition SamplePoint.h:20
double m_x2
x2 coordinate of the sample point
Definition SamplePoint.h:19
double x2() const
get the error on the x2 coordinate of the sample point
Definition SamplePoint.h:44
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:52
void set_error(const double merror)
Definition SamplePoint.h:62
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:28
void set_x2(const double mx2)
set the error of the x2 coordinate sample point to merror
Definition SamplePoint.h:60
void set_x1(const double mx1)
set the x2 coordinate of the sample point to mx2
Definition SamplePoint.h:58
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:35
double m_x1
x1 coordinate of the sample point
Definition SamplePoint.h:18
double x1() const
< get the x1 coordinate of the sample point
Definition SamplePoint.h:42
double error() const
Definition SamplePoint.h:46
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.