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 
9 #include <Math/Rotation3D.h>
10 #include <Math/Vector3D.h>
11 
12 #include <vector>
13 #include <memory>
15 
16 #include <ext/pool_allocator.h>
17 
18 class DDFilteredView;
19 
20 namespace cms {
21  class DDFilteredView;
22 }
23 
30 public:
31  using NavRange = std::pair<int const*, size_t>;
32  using ConstGeometricTimingDetContainer = std::vector<GeometricTimingDet const*>;
33  using GeometricTimingDetContainer = std::vector<GeometricTimingDet*>;
34  using RotationMatrix = ROOT::Math::Rotation3D;
35  using Translation = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double> >;
36 
37 #ifdef PoolAlloc
38  using nav_type = std::vector<int, PoolAlloc<int> >;
39 #else
40  using nav_type = std::vector<int>;
41 #endif
42 
45 
46  //
47  // more can be added; please add at the end!
48  //
49  using GeometricTimingEnumType = enum GTDEnumType {
50  unknown = 100,
51  MTD = 0,
52  BTL = 1,
53  BTLLayer = 2,
54  BTLTray = 3,
55  BTLModule = 4,
56  BTLSensor = 5,
57  BTLCrystal = 6,
58  ETL = 7,
59  ETLDisc = 8,
60  ETLRing = 9,
61  ETLModule = 10,
62  ETLSensor = 11
63  };
64 
71 
82  void clearComponents() { container_.clear(); }
83 
88  void deleteComponents();
89 
90  bool isLeaf() const { return container_.empty(); }
91 
93 
97  RotationMatrix const& rotation() const { return rot_; }
98  Translation const& translation() const { return trans_; }
99  double phi() const { return phi_; }
100  double rho() const { return rho_; }
101 
104  GeometricTimingEnumType type() const { return type_; }
105  std::string const& name() const { return ddname_; }
106  // internal representaion
107  nav_type const& navType() const { return ddd_; }
108  // representation neutral interface
109  NavRange navRange() const { return NavRange(&ddd_.front(), ddd_.size()); }
110  // more meaningfull name (maybe)
111  NavRange navpos() const { return NavRange(&ddd_.front(), ddd_.size()); }
112  std::vector<double> const& params() const { return params_; }
113 
115 
122 
130 
136 
140  Position positionBounds() const;
141 
145  Rotation rotationBounds() const;
146 
150  std::unique_ptr<Bounds> bounds() const;
151  double radLength() const { return radLength_; }
152  double xi() const { return xi_; }
156  double pixROCRows() const { return pixROCRows_; }
157  double pixROCCols() const { return pixROCCols_; }
158  double pixROCx() const { return pixROCx_; }
159  double pixROCy() const { return pixROCy_; }
160 
164  bool stereo() const { return stereo_; }
165  double siliconAPVNum() const { return siliconAPVNum_; }
166 
167 private:
170  double phi_;
171  double rho_;
177  std::vector<double> params_;
178 
180  double radLength_;
181  double xi_;
182  double pixROCRows_;
183  double pixROCCols_;
184  double pixROCx_;
185  double pixROCy_;
186  bool stereo_;
188 };
189 
190 #undef PoolAlloc
191 #endif
Rotation rotationBounds() const
double pixROCRows() const
GeometricTimingEnumType type_
std::string const & name() const
ConstGeometricTimingDetContainer const & components() const
double pixROCCols() const
std::pair< int const *, size_t > NavRange
std::vector< int > nav_type
ConstGeometricTimingDetContainer deepComponents() const
double pixROCy() const
NavRange navRange() const
Surface::RotationType Rotation
void addComponents(GeometricTimingDetContainer const &cont)
string dd
Definition: createTree.py:154
Mapping::value_type::value_type value(Mapping a, const std::string &name)
Definition: DDSolidShapes.h:42
std::vector< double > params_
Position positionBounds() const
ConstGeometricTimingDetContainer & components()
void addComponent(GeometricTimingDet *)
GeometricTimingDet(DDFilteredView *fv, GeometricTimingEnumType dd)
GeometricTimingDet * component(size_t index)
std::vector< double > const & params() const
const std::array< const cms::dd::ValuePair< LegacySolidShape, cms::DDSolidShape >, 21 > LegacySolidShapeMap
DetId geographicalID() const
void setGeographicalID(DetId id)
Point3DBase< float, GlobalTag > PositionType
double radLength() const
Namespace of DDCMS conversion namespace.
GeometricTimingEnumType type() const
Definition: DetId.h:17
NavRange navpos() const
Translation const & translation() const
RotationMatrix const & rotation() const
DDSolidShape
Definition: DDSolidShapes.h:6
LegacySolidShape shape() const
enum GTDEnumType { unknown=100, MTD=0, BTL=1, BTLLayer=2, BTLTray=3, BTLModule=4, BTLSensor=5, BTLCrystal=6, ETL=7, ETLDisc=8, ETLRing=9, ETLModule=10, ETLSensor=11 } GeometricTimingEnumType
Surface::PositionType Position
cms::DDSolidShape shape_
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer
nav_type const & navType() const
std::unique_ptr< Bounds > bounds() const
ROOT::Math::Rotation3D RotationMatrix
double pixROCx() const
double siliconAPVNum() const
TkRotation< float > RotationType
cms::DDSolidShape shape_dd4hep() const
std::vector< GeometricTimingDet * > GeometricTimingDetContainer
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
ConstGeometricTimingDetContainer container_
DetId geographicalId() const
cont
load Luminosity info ##
Definition: generateEDF.py:620
DDSolidShape
Definition: DDSolidShapes.h:73