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 
73 
74  private:
76  void deleteComponents();
77  void deepDeleteComponents();
78  void clearComponents() { m_container.resize(0); }
79 
84  std::vector<double> m_params;
86  int m_copy;
87  float m_z;
88 };
89 
90 #endif
Translation m_trans
Definition: DetGeomDesc.h:81
Translation translation() const
Definition: DetGeomDesc.h:66
DetId geographicalID() const
Definition: DetGeomDesc.h:54
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::DisplacementVector3D< ROOT::Math::Cartesian3D< double >> Translation
Definition: DetGeomDesc.h:40
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
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:62
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:76
int copyno() const
Definition: DetGeomDesc.h:69
float parentZPosition() const
Definition: DetGeomDesc.h:58
DetId m_geographicalID
Definition: DetGeomDesc.h:85
std::vector< double > params() const
Definition: DetGeomDesc.h:68
void addComponent(DetGeomDesc *)
components (children) management
Definition: DetGeomDesc.cc:69
RotationMatrix m_rot
Definition: DetGeomDesc.h:82
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