ATLAS Offline Software
SurveyConstraintModule.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //--------------------------------------------------------------------------
6 // Description:
7 // Class SurveyConstraintModule: Provides Bookkeeping for Survey
8 // Constraint, Represents a single module
9 //
10 // Author List:
11 // Tobias Golling
12 //------------------------------------------------------------------------
14 using std::cout;
15 using std::endl;
16 //----------------
17 // Constructors --
18 //----------------
19 
20 // default ctor
22  m_DOCA_Vector(6),
23  m_DOCA_Matrix(6,6),
24  m_ModuleID(0),
25  m_isPixel(true)
26 {
27 
28 }
29 
30 
31 // Constructor
33  m_DOCA_Vector(6),
34  m_DOCA_Matrix(6,6),
35  m_ModuleID(moduleID),
36  m_isPixel(true)
37 {
38 
39 }
40 
41 
42 // Constructor
44  m_DOCA_Vector(6),
45  m_DOCA_Matrix(6,6),
46  m_ModuleID(moduleID),
47  m_isPixel(isPixel)
48 {
49 
50 }
51 
52 //__________________________________________________________________________
53 // Copy Constructor
55  m_DOCA_Vector(6),
56  m_DOCA_Matrix(6,6),
57  m_ModuleID(0),
58  m_isPixel(true)
59 {
60  if (this!=&rhs) {
61  (*this)=rhs;
62  }
63 }
64 
65 //__________________________________________________________________________
66 // Assignment Operator
68 {
69  if (this!=&rhs) { // protect against self assignment
70  // delete old elements
71 
72  // initialize new elements
73 
74  // copy in new elements;
75  m_DOCA_Vector = rhs.DOCA_Vector();
76  m_DOCA_Matrix = rhs.DOCA_Matrix();
77  m_ModuleID = rhs.moduleID();
78  }
79 
80  return *this;
81 }
82 //__________________________________________________________________________
83 // Destructor
85 {
86 
87 }
88 
89 //-------------
90 // Selectors --
91 //-------------
92 void SurveyConstraintModule::getPoints(std::vector<SurveyConstraintPoint>& cPoints,
93  ModuleStatus mstat) const {
94  cPoints.clear();
95  //cout << "SurveyConstraintModule.getPoints(): m_ModulePoints.size() " << m_ModulePoints.size() << endl;
96  //cout << "SurveyConstraintModule.getPoints(): m_Stavepoints.size() " << m_StavePoints.size() << endl;
97  if(mstat == 0)
98  for (unsigned int iPoint(0); iPoint < m_ModulePoints.size(); ++iPoint ) {
99  cPoints.push_back( m_ModulePoints[iPoint] );
100  //cout << "mstat = " << mstat << ", SurveyConstraintModule.getPoints(): cPoints.size() " << cPoints.size() << endl;
101  }
102  if(mstat == 1)
103  for (unsigned int iPoint(0); iPoint < m_StavePoints.size(); ++iPoint ) {
104  cPoints.push_back( m_StavePoints[iPoint] );
105  //cout << "mstat = " << mstat << ", SurveyConstraintModule.getPoints(): cPoints.size() " << cPoints.size() << endl;
106  }
107 }
108 
109 
110 // Modifiers
111 void SurveyConstraintModule::addStaveConstraintPoint( std::vector<SurveyConstraintPoint>& cPoints ){
112  for (unsigned int iPoint(0); iPoint < cPoints.size(); ++iPoint ) {
113  m_StavePoints.push_back(cPoints[iPoint]);
114  //cout << "SurveyConstraintModule.addStaveConstraintPoint(): m_Stavepoints.size() " << m_StavePoints.size() << endl;
115  }
116 }
117 
119  m_ModulePoints.push_back(cPoint);
120  //cout << "SurveyConstraintModule.addModuleConstraintPoint(): m_ModulePoints.size() " << m_ModulePoints.size() << endl;
121 }
122 
124  m_globaltolocal = globaltolocal;}
125 
SurveyConstraintModule::operator=
SurveyConstraintModule & operator=(const SurveyConstraintModule &)
assignment operator
Definition: SurveyConstraintModule.cxx:67
SurveyConstraintModule::moduleID
Identifier moduleID() const
Definition: SurveyConstraintModule.h:79
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
SurveyConstraintModule::m_globaltolocal
Amg::Transform3D m_globaltolocal
Definition: SurveyConstraintModule.h:65
SurveyConstraintModule.h
SurveyConstraintModule::DOCA_Vector
Amg::VectorX DOCA_Vector() const
Definition: SurveyConstraintModule.h:71
SurveyConstraintModule::m_ModulePoints
std::vector< SurveyConstraintPoint > m_ModulePoints
Definition: SurveyConstraintModule.h:67
SurveyConstraintModule::addStaveConstraintPoint
void addStaveConstraintPoint(std::vector< SurveyConstraintPoint > &cPoints)
Definition: SurveyConstraintModule.cxx:111
SurveyConstraintModule::set_globaltolocal
void set_globaltolocal(Amg::Transform3D &globaltolocal)
Definition: SurveyConstraintModule.cxx:123
SurveyConstraintModule::addModuleConstraintPoint
void addModuleConstraintPoint(const SurveyConstraintPoint &cPoint)
Definition: SurveyConstraintModule.cxx:118
SurveyConstraintModule::getPoints
void getPoints(std::vector< SurveyConstraintPoint > &, ModuleStatus mstat) const
Definition: SurveyConstraintModule.cxx:92
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
SurveyConstraintModule::m_DOCA_Matrix
Amg::MatrixX m_DOCA_Matrix
Definition: SurveyConstraintModule.h:62
SurveyConstraintModule::m_StavePoints
std::vector< SurveyConstraintPoint > m_StavePoints
Definition: SurveyConstraintModule.h:66
SurveyConstraintModule::ModuleStatus
ModuleStatus
Definition: SurveyConstraintModule.h:27
SurveyConstraintModule::m_DOCA_Vector
Amg::VectorX m_DOCA_Vector
Definition: SurveyConstraintModule.h:61
SurveyConstraintModule::DOCA_Matrix
Amg::MatrixX DOCA_Matrix() const
Definition: SurveyConstraintModule.h:75
SurveyConstraintPoint
Definition: SurveyConstraintPoint.h:25
SurveyConstraintModule::set_DOCA_Vector
void set_DOCA_Vector(Amg::VectorX &DOCA_Vector)
Definition: SurveyConstraintModule.cxx:126
SurveyConstraintModule::m_ModuleID
Identifier m_ModuleID
Definition: SurveyConstraintModule.h:63
SurveyConstraintModule
Definition: SurveyConstraintModule.h:24
SurveyConstraintModule::SurveyConstraintModule
SurveyConstraintModule()
defaukt constructor
Definition: SurveyConstraintModule.cxx:21
SurveyConstraintModule::~SurveyConstraintModule
~SurveyConstraintModule()
destructor
Definition: SurveyConstraintModule.cxx:84
Identifier
Definition: IdentifierFieldParser.cxx:14