CMS 3D CMS Logo

DetGeomDesc.h
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * Authors:
4 * Jan Kašpar (jan.kaspar@gmail.com)
5 * CMSSW developpers (based on class GeometricDet)
6 *
7 ****************************************************************************/
8 
9 #ifndef Geometry_VeryForwardGeometryBuilder_DetGeomDesc
10 #define Geometry_VeryForwardGeometryBuilder_DetGeomDesc
11 
12 #include <utility>
13 #include <vector>
14 
16 #include <Math/Rotation3D.h>
17 
18 class DDFilteredView;
20 
36 {
37  public:
38  using Container = std::vector< DetGeomDesc* >;
39  using RotationMatrix = ROOT::Math::Rotation3D;
40  using Translation = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>>;
41 
44 
46  DetGeomDesc( const DetGeomDesc & );
48 
50  virtual ~DetGeomDesc();
51 
55 
57  Container components() const;
58  float parentZPosition() const { return m_z; }
59 
61  void addComponent( DetGeomDesc* );
62  bool isLeaf() const { return m_container.empty(); }
63 
65  RotationMatrix rotation() const { return m_rot; }
66  Translation translation() const { return m_trans; }
67  const std::string& name() const { return m_name; }
68  std::vector<double> params() const { return m_params; }
69  int copyno() const { return m_copy; }
70  const std::string& sensorType() const { return m_sensorType; }
71 
74 
75  private:
77  void deleteComponents();
78  void deepDeleteComponents();
79  void clearComponents() { m_container.resize(0); }
80 
85  std::vector<double> m_params;
87  int m_copy;
88  float m_z;
90 };
91 
92 #endif
Translation m_trans
Definition: DetGeomDesc.h:82
Translation translation() const
Definition: DetGeomDesc.h:66
DetId geographicalID() const
Definition: DetGeomDesc.h:54
const std::string & sensorType() const
Definition: DetGeomDesc.h:70
Container m_container
Definition: DetGeomDesc.h:81
std::string m_name
Definition: DetGeomDesc.h:84
DetGeomDesc & operator=(const DetGeomDesc &)
Definition: DetGeomDesc.cc:48
void applyAlignment(const CTPPSRPAlignmentCorrectionData &)
alignment
Definition: DetGeomDesc.cc:102
void clearComponents()
traverses the treee and deletes all nodes.
Definition: DetGeomDesc.h:79
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >> Translation
Definition: DetGeomDesc.h:40
std::string m_sensorType
Definition: DetGeomDesc.h:89
void deepDeleteComponents()
deletes just the first daughters
Definition: DetGeomDesc.cc:91
std::vector< double > m_params
Definition: DetGeomDesc.h:85
virtual ~DetGeomDesc()
destructor
Definition: DetGeomDesc.cc:63
void setGeographicalID(DetId id)
ID stuff.
Definition: DetGeomDesc.h:53
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:70
RotationMatrix rotation() const
geometry information
Definition: DetGeomDesc.h:65
const std::string & name() const
Definition: DetGeomDesc.h:67
Definition: DetId.h:18
void deleteComponents()
Definition: DetGeomDesc.cc:84
int copyno() const
Definition: DetGeomDesc.h:69
float parentZPosition() const
Definition: DetGeomDesc.h:58
DetId m_geographicalID
Definition: DetGeomDesc.h:86
std::vector< double > params() const
Definition: DetGeomDesc.h:68
void addComponent(DetGeomDesc *)
components (children) management
Definition: DetGeomDesc.cc:77
RotationMatrix m_rot
Definition: DetGeomDesc.h:83
ROOT::Math::Rotation3D RotationMatrix
Definition: DetGeomDesc.h:39
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.
bool isLeaf() const
Definition: DetGeomDesc.h:62