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 
19 
20 class DDFilteredView;
22 
38 {
39  public:
40  typedef std::vector< const DetGeomDesc*> ConstContainer;
41  typedef std::vector< DetGeomDesc*> Container;
43 
45  typedef unsigned int GeometricEnumType;
46 
48  DetGeomDesc(nav_type navtype, GeometricEnumType dd = 0);
49  DetGeomDesc(DDExpandedView* ev, GeometricEnumType dd = 0);
50  DetGeomDesc(DDFilteredView* fv, GeometricEnumType dd = 0);
51 
53  DetGeomDesc(const DetGeomDesc &);
55 
57  virtual ~DetGeomDesc();
58 
61  virtual DetId geographicalID() const { return _geographicalID; }
62 
64  virtual ConstContainer components() const;
65  virtual Container components();
66  virtual ConstContainer deepComponents() const;
67  virtual std::vector< DDExpandedNode > parents() const
68  { return _parents; }
69 
71  void setComponents(Container cont)
72  { _container = std::move(cont); }
73  void addComponents(Container cont);
76  { _container.resize(0);}
77  void deleteComponents();
78  void deepDeleteComponents();
79  bool isLeaf() const
80  { return (_container.empty()); }
81 
83  DDRotationMatrix rotation() const {return _rot;}
84  DDTranslation translation() const {return _trans;}
85  DDSolidShape shape() const {return _shape;}
86  GeometricEnumType type() const {return _type;}
87  DDName name() const {return _ddname;};
88  nav_type navType() const {return _ddd;}
89  std::vector<double> params() const {return _params;}
90  virtual int copyno() const {return _copy;}
91  virtual double volume() const {return _volume;}
92  virtual double density() const {return _density;}
93  virtual double weight() const {return _weight;}
94  virtual std::string material() const {return _material;}
95 
98 
99  private:
100  Container _container;
101  nav_type _ddd;
106  GeometricEnumType _type;
107  std::vector<double> _params;
109  std::vector< DDExpandedNode > _parents;
110  double _volume;
111  double _density;
112  double _weight;
113  int _copy;
115 };
116 
117 #endif
std::vector< DDExpandedNode > _parents
Definition: DetGeomDesc.h:109
DDRotationMatrix rotation() const
geometry information
Definition: DetGeomDesc.h:83
DetGeomDesc(nav_type navtype, GeometricEnumType dd=0)
Constructors to be used when looping over DDD.
Definition: DetGeomDesc.cc:24
DDSolidShape _shape
Definition: DetGeomDesc.h:104
void addComponents(Container cont)
Definition: DetGeomDesc.cc:151
void setComponents(Container cont)
components (children) management
Definition: DetGeomDesc.h:71
DetId _geographicalID
Definition: DetGeomDesc.h:108
DetGeomDesc & operator=(const DetGeomDesc &)
Definition: DetGeomDesc.cc:87
DDSolidShape
Definition: DDSolidShapes.h:6
DDRotationMatrix _rot
Definition: DetGeomDesc.h:103
virtual double density() const
Definition: DetGeomDesc.h:92
void clearComponents()
Definition: DetGeomDesc.h:75
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
nav_type navType() const
Definition: DetGeomDesc.h:88
bool ev
DDExpandedView::nav_type nav_type
Definition: DetGeomDesc.h:42
double _volume
Definition: DetGeomDesc.h:110
void deepDeleteComponents()
deletes just the first daughters
Definition: DetGeomDesc.cc:174
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
virtual ~DetGeomDesc()
destructor
Definition: DetGeomDesc.cc:109
void ApplyAlignment(const RPAlignmentCorrectionData &)
alignment
Definition: DetGeomDesc.cc:185
void setGeographicalID(DetId id)
ID stuff.
Definition: DetGeomDesc.h:60
DDTranslation _trans
Definition: DetGeomDesc.h:102
virtual ConstContainer components() const
access to the tree structure
Definition: DetGeomDesc.cc:123
Geometrical description of a sensor.
Definition: DetGeomDesc.h:37
virtual std::vector< DDExpandedNode > parents() const
returns all the components below
Definition: DetGeomDesc.h:67
DDTranslation translation() const
Definition: DetGeomDesc.h:84
std::vector< DetGeomDesc * > Container
Definition: DetGeomDesc.h:41
Alignment correction or result of alignment procedure for a single RP sensor. Within the geometry des...
DDName name() const
Definition: DetGeomDesc.h:87
virtual std::string material() const
Definition: DetGeomDesc.h:94
GeometricEnumType _type
Definition: DetGeomDesc.h:106
virtual double volume() const
Definition: DetGeomDesc.h:91
virtual int copyno() const
Definition: DetGeomDesc.h:90
Definition: DetId.h:18
void deleteComponents()
Definition: DetGeomDesc.cc:167
double _density
Definition: DetGeomDesc.h:111
virtual DetId geographicalID() const
Definition: DetGeomDesc.h:61
double _weight
Definition: DetGeomDesc.h:112
std::vector< double > _params
Definition: DetGeomDesc.h:107
nav_type _ddd
Definition: DetGeomDesc.h:101
GeometricEnumType type() const
Definition: DetGeomDesc.h:86
std::vector< const DetGeomDesc * > ConstContainer
Definition: DetGeomDesc.h:40
virtual double weight() const
Definition: DetGeomDesc.h:93
unsigned int GeometricEnumType
a type (not used in the moment, left for the future)
Definition: DetGeomDesc.h:45
DDName _ddname
Definition: DetGeomDesc.h:105
std::vector< double > params() const
Definition: DetGeomDesc.h:89
Container _container
Definition: DetGeomDesc.h:100
std::string _material
Definition: DetGeomDesc.h:114
virtual ConstContainer deepComponents() const
Definition: DetGeomDesc.cc:134
Provides an exploded view of the detector (tree-view)
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
void addComponent(DetGeomDesc *)
Definition: DetGeomDesc.cc:160
def move(src, dest)
Definition: eostools.py:510
DDSolidShape shape() const
Definition: DetGeomDesc.h:85
std::vector< int > nav_type
std::vector of sibling numbers
bool isLeaf() const
traverses the treee and deletes all nodes.
Definition: DetGeomDesc.h:79