ATLAS Offline Software
Loading...
Searching...
No Matches
DataPoint.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7//::::::::::::::::::::::::
8//:: NAMESPACE SETTINGS ::
9//::::::::::::::::::::::::
10
11using namespace MuonCalib;
12
13//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
14//:: IMPLEMENTATION OF METHODS DEFINED IN THE CLASS DataPoint ::
15//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
16
17//*****************************************************************************
18
19//:::::::::::::::::
20//:: CONSTRUCTOR ::
21//:::::::::::::::::
22
25
26//*****************************************************************************
27
28//:::::::::::::::::
29//:: CONSTRUCTOR ::
30//:::::::::::::::::
31
32DataPoint::DataPoint(const unsigned int & length, const double fill)
33 : m_vec (length),
34 m_ref_comp (0)
35{
36 for (unsigned int k=0; k<length; k++) {
37 m_vec[k] = fill;
38 }
39}
40
41//*****************************************************************************
42
43//:::::::::::::::::
44//:: CONSTRUCTOR ::
45//:::::::::::::::::
46
47DataPoint::DataPoint(const Amg::VectorX & vec, const unsigned int ref_comp)
48 : m_vec(vec),
49 m_ref_comp(ref_comp)
50{
51}
52
53//*****************************************************************************
54
55//:::::::::::::::::
56//:: CONSTRUCTOR ::
57//:::::::::::::::::
58
59DataPoint::DataPoint(const CLHEP::HepVector & vec, const unsigned int ref_comp)
60 : m_vec(vec.num_row()),
61 m_ref_comp (ref_comp)
62{
63 for(int i=0; i<vec.num_row(); i++)
64 {
65 m_vec[i]=vec[i];
66 }
67}
68
69//*****************************************************************************
70
71//:::::::::::::::::::::::
72//:: METHOD dataVector ::
73//:::::::::::::::::::::::
74
76
77 return m_vec;
78
79}
80
81//*****************************************************************************
82
83//:::::::::::::::::::::::
84//:: METHOD dataVector ::
85//:::::::::::::::::::::::
86
88
89 return m_vec;
90
91}
92
93//*****************************************************************************
94
95//:::::::::::::::::::::::::::::::
96//:: METHOD referenceComponent ::
97//:::::::::::::::::::::::::::::::
98
99unsigned int DataPoint::referenceComponent() const {
100
101 return m_ref_comp;
102
103}
104
105//*****************************************************************************
106
107//::::::::::::::::::::::::::::::::::
108//:: METHOD setReferenceComponent ::
109//::::::::::::::::::::::::::::::::::
110
111void DataPoint::setReferenceComponent(const unsigned int & ref_comp) {
112
113 m_ref_comp = ref_comp;
114
115}
std::vector< size_t > vec
double length(const pvec &v)
Amg::VectorX m_vec
Definition DataPoint.h:76
void setReferenceComponent(const unsigned int &ref_comp)
set the ordering component to ref_comp (>=0)
DataPoint()
Default constructor. Gives the vector of length 0.
Definition DataPoint.cxx:23
unsigned int m_ref_comp
Definition DataPoint.h:77
const Amg::VectorX & dataVector() const
get the data vector
Definition DataPoint.cxx:75
unsigned int referenceComponent() const
get the ordering component (>=0)
Definition DataPoint.cxx:99
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
void fill(H5::Group &out_file, size_t iterations)