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 
17 //#include "DataFormats/CTPPSAlignment/interface/RPAlignmentCorrectionData.h"
19 
20 using namespace std;
21 
22 //----------------------------------------------------------------------------------------------------
23 
25  : m_trans(fv->translation()),
26  m_rot(fv->rotation()),
27  m_name(((fv->logicalPart()).ddname()).name()),
28  m_params(((fv->logicalPart()).solid()).parameters()),
29  m_copy(fv->copyno()),
30  m_z(fv->geoHistory().back().absTranslation().z()) {}
31 
32 //----------------------------------------------------------------------------------------------------
33 DetGeomDesc::DetGeomDesc(const DetGeomDesc& ref) { (*this) = ref; }
34 
35 //----------------------------------------------------------------------------------------------------
36 
38  m_params = ref.m_params;
39  m_trans = ref.m_trans;
40  m_rot = ref.m_rot;
41  m_name = ref.m_name;
42  m_copy = ref.m_copy;
44  m_z = ref.m_z;
45  return (*this);
46 }
47 
48 //----------------------------------------------------------------------------------------------------
49 
51 
52 //----------------------------------------------------------------------------------------------------
53 
55 
56 //----------------------------------------------------------------------------------------------------
57 
58 void DetGeomDesc::addComponent(DetGeomDesc* det) { m_container.emplace_back(det); }
59 
60 //----------------------------------------------------------------------------------------------------
61 
63 
64 //----------------------------------------------------------------------------------------------------
65 
67  for (auto& it : m_container) {
68  it->deepDeleteComponents();
69  delete it;
70  }
72 }
73 
74 //----------------------------------------------------------------------------------------------------
75 
79 }
Translation m_trans
Definition: DetGeomDesc.h:80
Container m_container
Definition: DetGeomDesc.h:79
std::string m_name
Definition: DetGeomDesc.h:82
DetGeomDesc & operator=(const DetGeomDesc &)
Definition: DetGeomDesc.cc:37
void applyAlignment(const CTPPSRPAlignmentCorrectionData &)
alignment
Definition: DetGeomDesc.cc:76
void clearComponents()
traverses the treee and deletes all nodes.
Definition: DetGeomDesc.h:77
ROOT::Math::Rotation3D getRotationMatrix() const
std::vector< DetGeomDesc * > Container
Definition: DetGeomDesc.h:37
void deepDeleteComponents()
deletes just the first daughters
Definition: DetGeomDesc.cc:66
std::vector< double > m_params
Definition: DetGeomDesc.h:83
virtual ~DetGeomDesc()
destructor
Definition: DetGeomDesc.cc:50
Geometrical description of a sensor.
Definition: DetGeomDesc.h:35
Container components() const
access to the tree structure
Definition: DetGeomDesc.cc:54
void deleteComponents()
Definition: DetGeomDesc.cc:62
DetId m_geographicalID
Definition: DetGeomDesc.h:84
void addComponent(DetGeomDesc *)
components (children) management
Definition: DetGeomDesc.cc:58
RotationMatrix m_rot
Definition: DetGeomDesc.h:81
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.