CMS 3D CMS Logo

GeometricTimingDet.h
Go to the documentation of this file.
1 #ifndef Geometry_MTDNumberingBuilder_GeometricTimingDet_H
2 #define Geometry_MTDNumberingBuilder_GeometricTimingDet_H
3 
10 
11 #include <vector>
12 #include <memory>
14 
15 #include <ext/pool_allocator.h>
16 
17 class DDFilteredView;
18 
25 public:
27  using ConstGeometricTimingDetContainer = std::vector<GeometricTimingDet const*>;
28  using GeometricTimingDetContainer = std::vector<GeometricTimingDet*>;
29  using RotationMatrix = ROOT::Math::Rotation3D;
30  using Translation = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double> >;
31 
32 #ifdef PoolAlloc
33  using GeoHistory = std::vector<DDExpandedNode, PoolAlloc<DDExpandedNode> >;
34  using nav_type = std::vector<int, PoolAlloc<int> >;
35 #else
36  using GeoHistory = std::vector<DDExpandedNode>;
38 #endif
39 
42 
43  //
44  // more can be added; please add at the end!
45  //
46  typedef enum GTDEnumType {
47  unknown = 100,
48  MTD = 0,
49  BTL = 1,
50  BTLLayer = 2,
51  BTLTray = 3,
52  BTLModule = 4,
53  BTLSensor = 5,
55  ETL = 7,
56  ETLDisc = 8,
57  ETLRing = 9,
58  ETLModule = 10,
59  ETLSensor = 11
61 
67 
78  void clearComponents() { container_.clear(); }
79 
84  void deleteComponents();
85 
86  bool isLeaf() const { return container_.empty(); }
87 
89 
93  RotationMatrix const& rotation() const { return rot_; }
94  Translation const& translation() const { return trans_; }
95  double phi() const { return phi_; }
96  double rho() const { return rho_; }
97 
98  DDSolidShape const& shape() const { return shape_; }
99  GeometricTimingEnumType type() const { return type_; }
100  std::string const& name() const { return ddname_; }
101  // internal representaion
102  nav_type const& navType() const { return ddd_; }
103  // representation neutral interface
104  NavRange navRange() const { return NavRange(&ddd_.front(), ddd_.size()); }
105  // more meaningfull name (maybe)
106  NavRange navpos() const { return NavRange(&ddd_.front(), ddd_.size()); }
107  std::vector<double> const& params() const { return params_; }
108 
110 
117 
125 
131 
135  Position positionBounds() const;
136 
140  Rotation rotationBounds() const;
141 
145  std::unique_ptr<Bounds> bounds() const;
146  double radLength() const { return radLength_; }
147  double xi() const { return xi_; }
151  double pixROCRows() const { return pixROCRows_; }
152  double pixROCCols() const { return pixROCCols_; }
153  double pixROCx() const { return pixROCx_; }
154  double pixROCy() const { return pixROCy_; }
155 
159  bool stereo() const { return stereo_; }
160  double siliconAPVNum() const { return siliconAPVNum_; }
161 
162 private:
165  double phi_;
166  double rho_;
172  std::vector<double> params_;
173 
175  double radLength_;
176  double xi_;
177  double pixROCRows_;
178  double pixROCCols_;
179  double pixROCx_;
180  double pixROCy_;
181  bool stereo_;
183 };
184 
185 #undef PoolAlloc
186 #endif
GeometricTimingEnumType type_
DetId geographicalId() const
GeometricTimingEnumType type() const
void addComponents(GeometricTimingDetContainer const &cont)
Position positionBounds() const
std::pair< int const *, size_t > NavRange
double siliconAPVNum() const
double pixROCCols() const
NavRange navRange() const
std::vector< double > params_
double phi() const
double radLength() const
ConstGeometricTimingDetContainer & components()
std::unique_ptr< Bounds > bounds() const
ConstGeometricTimingDetContainer deepComponents() const
void addComponent(GeometricTimingDet *)
GeometricTimingDet(DDFilteredView *fv, GeometricTimingEnumType dd)
double rho() const
GeometricTimingDet * component(size_t index)
NavRange navpos() const
void setGeographicalID(DetId id)
Point3DBase< float, GlobalTag > PositionType
double pixROCRows() const
nav_type const & navType() const
enum GeometricTimingDet::GTDEnumType GeometricTimingEnumType
Definition: DetId.h:17
std::string const & name() const
DetId geographicalID() const
std::vector< double > const & params() const
DDSolidShape
Definition: DDSolidShapes.h:6
DDExpandedView::NavRange NavRange
double pixROCx() const
DDExpandedView::nav_type nav_type
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer
ROOT::Math::Rotation3D RotationMatrix
TkRotation< float > RotationType
ConstGeometricTimingDetContainer const & components() const
std::vector< GeometricTimingDet * > GeometricTimingDetContainer
RotationMatrix const & rotation() const
DDSolidShape const & shape() const
double pixROCy() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
ConstGeometricTimingDetContainer container_
std::vector< DDExpandedNode > GeoHistory
cont
load Luminosity info ##
Definition: generateEDF.py:629
Rotation rotationBounds() const
std::vector< int > nav_type
std::vector of sibling numbers
Translation const & translation() const