ATLAS Offline Software
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 
11 using namespace MuonCalib;
12 
13 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
14 //:: IMPLEMENTATION OF METHODS DEFINED IN THE CLASS DataPoint ::
15 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
16 
17 //*****************************************************************************
18 
19 //:::::::::::::::::
20 //:: CONSTRUCTOR ::
21 //:::::::::::::::::
22 
23 DataPoint::DataPoint(): m_ref_comp(0){
24 }
25 
26 //*****************************************************************************
27 
28 //:::::::::::::::::
29 //:: CONSTRUCTOR ::
30 //:::::::::::::::::
31 
32 DataPoint::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 
47 DataPoint::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 
59 DataPoint::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 
99 unsigned int DataPoint::referenceComponent() const {
100 
101  return m_ref_comp;
102 
103 }
104 
105 //*****************************************************************************
106 
107 //::::::::::::::::::::::::::::::::::
108 //:: METHOD setReferenceComponent ::
109 //::::::::::::::::::::::::::::::::::
110 
111 void DataPoint::setReferenceComponent(const unsigned int & ref_comp) {
112 
113  m_ref_comp = ref_comp;
114 
115 }
DataPoint.h
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
MuonCalib::DataPoint::m_vec
Amg::VectorX m_vec
Definition: DataPoint.h:76
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
MuonCalib::DataPoint::setReferenceComponent
void setReferenceComponent(const unsigned int &ref_comp)
set the ordering component to ref_comp (>=0)
Definition: DataPoint.cxx:111
MuonCalib::DataPoint::m_ref_comp
unsigned int m_ref_comp
Definition: DataPoint.h:77
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonCalib::DataPoint::dataVector
const Amg::VectorX & dataVector() const
get the data vector
Definition: DataPoint.cxx:75
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::DataPoint::referenceComponent
unsigned int referenceComponent() const
get the ordering component (>=0)
Definition: DataPoint.cxx:99
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
MuonCalib::DataPoint::DataPoint
DataPoint()
Default constructor. Gives the vector of length 0.
Definition: DataPoint.cxx:23
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
fitman.k
k
Definition: fitman.py:528