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 
35 class DetGeomDesc {
36 public:
37  using Container = std::vector<DetGeomDesc*>;
38  using RotationMatrix = ROOT::Math::Rotation3D;
39  using Translation = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>>;
40 
43 
45  DetGeomDesc(const DetGeomDesc&);
47 
49  virtual ~DetGeomDesc();
50 
53  DetId geographicalID() const { return m_geographicalID; }
54 
57  float parentZPosition() const { return m_z; }
58 
61  bool isLeaf() const { return m_container.empty(); }
62 
64  RotationMatrix rotation() const { return m_rot; }
65  Translation translation() const { return m_trans; }
66  const std::string& name() const { return m_name; }
67  std::vector<double> params() const { return m_params; }
68  int copyno() const { return m_copy; }
69  const std::string& sensorType() const { return m_sensorType; }
70 
73 
74 private:
75  DetGeomDesc() {}
76  void deleteComponents();
78  void clearComponents() { m_container.resize(0); }
79 
84  std::vector<double> m_params;
86  int m_copy;
87  float m_z;
89 };
90 
91 #endif
DetGeomDesc::rotation
RotationMatrix rotation() const
geometry information
Definition: DetGeomDesc.h:63
DetGeomDesc::operator=
DetGeomDesc & operator=(const DetGeomDesc &)
Definition: DetGeomDesc.cc:44
DetGeomDesc::applyAlignment
void applyAlignment(const CTPPSRPAlignmentCorrectionData &)
alignment
Definition: DetGeomDesc.cc:84
DetGeomDesc::addComponent
void addComponent(DetGeomDesc *)
components (children) management
Definition: DetGeomDesc.cc:66
DetGeomDesc::components
Container components() const
access to the tree structure
Definition: DetGeomDesc.cc:62
DetGeomDesc::Container
std::vector< DetGeomDesc * > Container
Definition: DetGeomDesc.h:36
DetGeomDesc::deepDeleteComponents
void deepDeleteComponents()
deletes just the first daughters
Definition: DetGeomDesc.cc:74
DetGeomDesc::m_copy
int m_copy
Definition: DetGeomDesc.h:85
DetGeomDesc::m_sensorType
std::string m_sensorType
Definition: DetGeomDesc.h:87
DetGeomDesc::m_container
Container m_container
Definition: DetGeomDesc.h:79
DetGeomDesc::~DetGeomDesc
virtual ~DetGeomDesc()
destructor
Definition: DetGeomDesc.cc:58
DetGeomDesc::m_name
std::string m_name
Definition: DetGeomDesc.h:82
DetGeomDesc::sensorType
const std::string & sensorType() const
Definition: DetGeomDesc.h:68
DetGeomDesc::parentZPosition
float parentZPosition() const
Definition: DetGeomDesc.h:56
DetGeomDesc::m_params
std::vector< double > m_params
Definition: DetGeomDesc.h:83
DetGeomDesc::clearComponents
void clearComponents()
traverses the treee and deletes all nodes.
Definition: DetGeomDesc.h:77
DetGeomDesc::m_z
float m_z
Definition: DetGeomDesc.h:86
DetGeomDesc::setGeographicalID
void setGeographicalID(DetId id)
ID stuff.
Definition: DetGeomDesc.h:51
DetId
Definition: DetId.h:17
DetGeomDesc::isLeaf
bool isLeaf() const
Definition: DetGeomDesc.h:60
DetGeomDesc::geographicalID
DetId geographicalID() const
Definition: DetGeomDesc.h:52
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DetGeomDesc::name
const std::string & name() const
Definition: DetGeomDesc.h:65
DetGeomDesc
Geometrical description of a sensor.
Definition: DetGeomDesc.h:34
DetGeomDesc::deleteComponents
void deleteComponents()
Definition: DetGeomDesc.cc:70
DetGeomDesc::Translation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
Definition: DetGeomDesc.h:38
DetId.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
DetGeomDesc::params
std::vector< double > params() const
Definition: DetGeomDesc.h:66
DetGeomDesc::translation
Translation translation() const
Definition: DetGeomDesc.h:64
DDFilteredView
Definition: DDFilteredView.h:20
DetGeomDesc::m_geographicalID
DetId m_geographicalID
Definition: DetGeomDesc.h:84
CTPPSRPAlignmentCorrectionData
Alignment correction for an element of the CT-PPS detector. Within the geometry description,...
Definition: CTPPSRPAlignmentCorrectionData.h:58
DetGeomDesc::RotationMatrix
ROOT::Math::Rotation3D RotationMatrix
Definition: DetGeomDesc.h:37
DetGeomDesc::copyno
int copyno() const
Definition: DetGeomDesc.h:67
DetGeomDesc::DetGeomDesc
DetGeomDesc()
Definition: DetGeomDesc.h:74
DetGeomDesc::m_trans
Translation m_trans
Definition: DetGeomDesc.h:80
DetGeomDesc::m_rot
RotationMatrix m_rot
Definition: DetGeomDesc.h:81