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 //----------------------------------------------------------------------------------------------------
35 {
36  (*this) = ref;
37 }
38 
39 //----------------------------------------------------------------------------------------------------
40 
42 {
43  m_params = ref.m_params;
44  m_trans = ref.m_trans;
45  m_rot = ref.m_rot;
46  m_name = ref.m_name;
47  m_copy = ref.m_copy;
49  m_z = ref.m_z;
50  return (*this);
51 }
52 
53 //----------------------------------------------------------------------------------------------------
54 
56 {
58 }
59 
60 //----------------------------------------------------------------------------------------------------
61 
63 {
64  return m_container;
65 }
66 
67 //----------------------------------------------------------------------------------------------------
68 
70 {
71  m_container.emplace_back( det );
72 }
73 
74 //----------------------------------------------------------------------------------------------------
75 
77 {
78  m_container.erase( m_container.begin(), m_container.end());
79 }
80 
81 //----------------------------------------------------------------------------------------------------
82 
84 {
85  for( auto & it : m_container ) {
86  it->deepDeleteComponents();
87  delete it;
88  }
90 }
91 
92 //----------------------------------------------------------------------------------------------------
93 
95 {
98 }
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:41
void applyAlignment(const CTPPSRPAlignmentCorrectionData &)
alignment
Definition: DetGeomDesc.cc:94
void clearComponents()
traverses the treee and deletes all nodes.
Definition: DetGeomDesc.h:78
ROOT::Math::Rotation3D getRotationMatrix() const
void deepDeleteComponents()
deletes just the first daughters
Definition: DetGeomDesc.cc:83
std::vector< double > m_params
Definition: DetGeomDesc.h:84
virtual ~DetGeomDesc()
destructor
Definition: DetGeomDesc.cc:55
std::vector< DetGeomDesc * > Container
Definition: DetGeomDesc.h:38
Geometrical description of a sensor.
Definition: DetGeomDesc.h:35
Container components() const
access to the tree structure
Definition: DetGeomDesc.cc:62
void deleteComponents()
Definition: DetGeomDesc.cc:76
DetId m_geographicalID
Definition: DetGeomDesc.h:85
void addComponent(DetGeomDesc *)
components (children) management
Definition: DetGeomDesc.cc:69
RotationMatrix m_rot
Definition: DetGeomDesc.h:82
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.