CMS 3D CMS Logo

DetGeomDesc.cc
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of the TOTEM offline software.
4 * Authors:
5 * Jan Kašpar (jan.kaspar@gmail.com)
6 * CMSSW developers (based on GeometricDet class)
7 *
8 ****************************************************************************/
9 
10 #include <utility>
11 
13 
16 
18 
19 using namespace std;
20 
21 //----------------------------------------------------------------------------------------------------
22 
24  m_trans( fv->translation()),
25  m_rot( fv->rotation()),
26  m_name((( fv->logicalPart()).ddname()).name()),
27  m_params((( fv->logicalPart()).solid()).parameters()),
28  m_copy( fv->copyno()),
29  m_z( fv->geoHistory().back().absTranslation().z())
30 {}
31 
32 //----------------------------------------------------------------------------------------------------
34 {
35  (*this) = ref;
36 }
37 
38 //----------------------------------------------------------------------------------------------------
39 
41 {
42  m_params = ref.m_params;
43  m_trans = ref.m_trans;
44  m_rot = ref.m_rot;
45  m_name = ref.m_name;
46  m_copy = ref.m_copy;
48  m_z = ref.m_z;
49  return (*this);
50 }
51 
52 //----------------------------------------------------------------------------------------------------
53 
55 {
57 }
58 
59 //----------------------------------------------------------------------------------------------------
60 
62 {
63  return m_container;
64 }
65 
66 //----------------------------------------------------------------------------------------------------
67 
69 {
70  m_container.emplace_back( det );
71 }
72 
73 //----------------------------------------------------------------------------------------------------
74 
76 {
77  m_container.erase( m_container.begin(), m_container.end());
78 }
79 
80 //----------------------------------------------------------------------------------------------------
81 
83 {
84  for( auto & it : m_container ) {
85  it->deepDeleteComponents();
86  delete it;
87  }
89 }
90 
91 //----------------------------------------------------------------------------------------------------
92 
94 {
97 }
Translation m_trans
Definition: DetGeomDesc.h:81
Container m_container
Definition: DetGeomDesc.h:80
std::string m_name
Definition: DetGeomDesc.h:83
DetGeomDesc & operator=(const DetGeomDesc &)
Definition: DetGeomDesc.cc:40
void clearComponents()
traverses the treee and deletes all nodes.
Definition: DetGeomDesc.h:78
void deepDeleteComponents()
deletes just the first daughters
Definition: DetGeomDesc.cc:82
std::vector< double > m_params
Definition: DetGeomDesc.h:84
virtual ~DetGeomDesc()
destructor
Definition: DetGeomDesc.cc:54
math::XYZVectorD getTranslation() const
std::vector< DetGeomDesc * > Container
Definition: DetGeomDesc.h:38
Geometrical description of a sensor.
Definition: DetGeomDesc.h:35
Alignment correction for an element of the CT-PPS detector. Within the geometry description, every sensor (more generally every element) is given its translation and rotation. These two quantities shall be understood in local-to-global coordinate transform. That is, if r_l is a point in local coordinate system and x_g in global, then it holds.
Container components() const
access to the tree structure
Definition: DetGeomDesc.cc:61
ROOT::Math::Rotation3D getRotationMatrix() const
void deleteComponents()
Definition: DetGeomDesc.cc:75
DetId m_geographicalID
Definition: DetGeomDesc.h:85
void addComponent(DetGeomDesc *)
components (children) management
Definition: DetGeomDesc.cc:68
RotationMatrix m_rot
Definition: DetGeomDesc.h:82
void applyAlignment(const RPAlignmentCorrectionData &)
alignment
Definition: DetGeomDesc.cc:93