CMS 3D CMS Logo

GeometricDet.h
Go to the documentation of this file.
1 #ifndef Geometry_TrackerNumberingBuilder_GeometricDet_H
2 #define Geometry_TrackerNumberingBuilder_GeometricDet_H
3 
10 #include <Math/Rotation3D.h>
11 #include <Math/Vector3D.h>
12 
13 #include <vector>
14 #include <memory>
16 
17 #include <ext/pool_allocator.h>
18 
19 class DDFilteredView;
20 
21 namespace cms {
22  class DDFilteredView;
23 }
24 
30 class GeometricDet {
31 public:
33  using ConstGeometricDetContainer = std::vector<GeometricDet const*>;
34  using GeometricDetContainer = std::vector<GeometricDet*>;
35  using RotationMatrix = ROOT::Math::Rotation3D;
36  using Translation = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double> >;
37 
38 #ifdef PoolAlloc
39  using GeoHistory = std::vector<DDExpandedNode, PoolAlloc<DDExpandedNode> >;
40  using nav_type = std::vector<int, PoolAlloc<int> >;
41 #else
42  using GeoHistory = std::vector<DDExpandedNode>;
44 #endif
45 
48 
49  //
50  // more can be added; please add at the end!
51  //
52  typedef enum GDEnumType {
53  unknown = 100,
54  Tracker = 0,
57  TIB = 3,
58  TID = 4,
59  TOB = 5,
60  TEC = 6,
61  layer = 8,
62  wheel = 9,
63  strng = 10,
64  rod = 11,
65  petal = 12,
66  ring = 13,
67  ladder = 14,
68  mergedDet = 15,
69  DetUnit = 16,
70  disk = 17,
71  panel = 18,
86 
93 
100  void addComponent(GeometricDet*);
104  void clearComponents() { _container.clear(); }
105 
110  void deleteComponents();
111 
112  bool isLeaf() const { return _container.empty(); }
113 
114  GeometricDet* component(size_t index) { return const_cast<GeometricDet*>(_container[index]); }
115 
119  RotationMatrix const& rotation() const { return _rot; }
120  Translation const& translation() const { return _trans; }
121  double phi() const { return _phi; }
122  double rho() const { return _rho; }
123 
124  DDSolidShape const& shape() const { return _shape; }
125  GeometricEnumType type() const { return _type; }
126  std::string const& name() const { return _ddname; }
127 
128  // internal representaion
129  nav_type const& navType() const { return _ddd; }
130  NavRange navpos() const { return NavRange(&_ddd.front(), _ddd.size()); }
131  std::vector<double> const& params() const { return _params; }
132 
133  ~GeometricDet();
134 
141 
149 
155 
159  Position positionBounds() const;
160 
164  Rotation rotationBounds() const;
165 
169  std::unique_ptr<Bounds> bounds() const;
170 
171  double radLength() const { return _radLength; }
172  double xi() const { return _xi; }
176  double pixROCRows() const { return _pixROCRows; }
177  double pixROCCols() const { return _pixROCCols; }
178  double pixROCx() const { return _pixROCx; }
179  double pixROCy() const { return _pixROCy; }
180 
184  bool stereo() const { return _stereo; }
185  double siliconAPVNum() const { return _siliconAPVNum; }
186 
187 private:
190  double _phi;
191  double _rho;
197  std::vector<double> _params;
198 
200  double _radLength;
201  double _xi;
202  double _pixROCRows;
203  double _pixROCCols;
204  double _pixROCx;
205  double _pixROCy;
206  bool _stereo;
208 };
209 
210 #undef PoolAlloc
211 #endif
DDSolidShapes.h
GeometricDet::phi
double phi() const
Definition: GeometricDet.h:121
TkRotation< float >
GeometricDet::OTPhase2Layer
Definition: GeometricDet.h:77
GeometricDet::positionBounds
Position positionBounds() const
Definition: GeometricDet.cc:223
GeometricDet::PixelEndCap
Definition: GeometricDet.h:56
GeometricDet::navpos
NavRange navpos() const
Definition: GeometricDet.h:130
DDSolidShape
DDSolidShape
Definition: DDSolidShapes.h:6
GeometricDet::PixelPhase2ReducedDisk
Definition: GeometricDet.h:83
GeometricDet::type
GeometricEnumType type() const
Definition: GeometricDet.h:125
GeometricDet::petal
Definition: GeometricDet.h:65
DDExpandedView::nav_type
std::vector< int > nav_type
std::vector of sibling numbers
Definition: DDExpandedView.h:48
types.h
GeometricDet::rod
Definition: GeometricDet.h:64
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:139
GeometricDet::TID
Definition: GeometricDet.h:58
GeometricDet::_pixROCx
double _pixROCx
Definition: GeometricDet.h:204
GeometricDet::DetUnit
Definition: GeometricDet.h:69
GeometricDet::~GeometricDet
~GeometricDet()
Definition: GeometricDet.cc:66
GeometricDet::ladder
Definition: GeometricDet.h:67
GeometricDet::navType
nav_type const & navType() const
Definition: GeometricDet.h:129
GeometricDet::_pixROCCols
double _pixROCCols
Definition: GeometricDet.h:203
generateEDF.cont
cont
load Luminosity info ##
Definition: generateEDF.py:629
GeometricDet::PixelBarrel
Definition: GeometricDet.h:55
GeometricDet::OTPhase2Barrel
Definition: GeometricDet.h:76
GeometricDet::_trans
Translation _trans
Definition: GeometricDet.h:189
GeometricDet::ring
Definition: GeometricDet.h:66
cms::DDFilteredView
Definition: DDFilteredView.h:65
GeometricDet::rotationBounds
Rotation rotationBounds() const
Definition: GeometricDet.cc:228
GloballyPositioned< float >::RotationType
TkRotation< float > RotationType
Definition: GloballyPositioned.h:22
GeometricDet::wheel
Definition: GeometricDet.h:62
GeometricDet::_rot
RotationMatrix _rot
Definition: GeometricDet.h:192
DDExpandedView::NavRange
std::pair< int const *, size_t > NavRange
Definition: DDExpandedView.h:49
GeometricDet::_pixROCRows
double _pixROCRows
Definition: GeometricDet.h:202
GeometricDet::Tracker
Definition: GeometricDet.h:54
GeometricDet::_rho
double _rho
Definition: GeometricDet.h:191
DetId
Definition: DetId.h:17
GeometricDet::_stereo
bool _stereo
Definition: GeometricDet.h:206
GeometricDet::rotation
RotationMatrix const & rotation() const
Definition: GeometricDet.h:119
GeometricDet::PixelPhase1Disk
Definition: GeometricDet.h:74
GeometricDet::PixelPhase1EndCap
Definition: GeometricDet.h:73
GeometricDet::_ddname
std::string _ddname
Definition: GeometricDet.h:195
GeometricDet::_geographicalID
DetId _geographicalID
Definition: GeometricDet.h:199
GeometricDet::_pixROCy
double _pixROCy
Definition: GeometricDet.h:205
GeometricDet::shape
DDSolidShape const & shape() const
Definition: GeometricDet.h:124
GeometricDet::mergedDet
Definition: GeometricDet.h:68
GeometricDet::_siliconAPVNum
double _siliconAPVNum
Definition: GeometricDet.h:207
GeometricDet::deleteComponents
void deleteComponents()
Definition: GeometricDet.cc:218
Surface.h
GeometricDet::setGeographicalID
void setGeographicalID(DetId id)
Definition: GeometricDet.h:97
GeometricDet::PixelPhase2Barrel
Definition: GeometricDet.h:79
GeometricDet::disk
Definition: GeometricDet.h:70
GeometricDet
Definition: GeometricDet.h:30
GeometricDet::PixelPhase2TDRDisk
Definition: GeometricDet.h:84
Bounds.h
GeometricDet::_type
GeometricEnumType _type
Definition: GeometricDet.h:196
Point3DBase< float, GlobalTag >
GeometricDet::unknown
Definition: GeometricDet.h:53
createTree.dd
string dd
Definition: createTree.py:154
GeometricDet::GeometricEnumType
enum GeometricDet::GDEnumType GeometricEnumType
GeometricDet::radLength
double radLength() const
Definition: GeometricDet.h:171
GeometricDet::_ddd
nav_type _ddd
Definition: GeometricDet.h:194
GeometricDet::GDEnumType
GDEnumType
Definition: GeometricDet.h:52
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GeometricDet::_phi
double _phi
Definition: GeometricDet.h:190
PGeometricDet::Item
Definition: PGeometricDet.h:14
GeometricDet::PixelPhase2EndCap
Definition: GeometricDet.h:80
GeometricDet::stereo
bool stereo() const
Definition: GeometricDet.h:184
GeometricDet::nav_type
DDExpandedView::nav_type nav_type
Definition: GeometricDet.h:43
GeometricDet::PixelPhase1Barrel
Definition: GeometricDet.h:72
GeometricDet::pixROCRows
double pixROCRows() const
Definition: GeometricDet.h:176
GeometricDet::OTPhase2EndCap
Definition: GeometricDet.h:75
GeometricDet::geographicalID
DetId geographicalID() const
Definition: GeometricDet.h:153
GeometricDet::RotationMatrix
ROOT::Math::Rotation3D RotationMatrix
Definition: GeometricDet.h:35
GeometricDet::TIB
Definition: GeometricDet.h:57
GeometricDet::addComponents
void addComponents(GeometricDetContainer const &cont)
Definition: GeometricDet.cc:200
GeometricDet::pixROCx
double pixROCx() const
Definition: GeometricDet.h:178
GeometricDet::_params
std::vector< double > _params
Definition: GeometricDet.h:197
GeometricDet::GeometricDet
GeometricDet(DDFilteredView *fv, GeometricEnumType dd)
Definition: GeometricDet.cc:68
GeometricDet::panel
Definition: GeometricDet.h:71
GeometricDet::components
ConstGeometricDetContainer const & components() const
Definition: GeometricDet.h:140
GeometricDet::deepComponents
ConstGeometricDetContainer deepComponents() const
Definition: GeometricDet.cc:184
GeometricDet::rho
double rho() const
Definition: GeometricDet.h:122
DDExpandedView.h
GeometricDet::Position
Surface::PositionType Position
Definition: GeometricDet.h:46
GeometricDet::Rotation
Surface::RotationType Rotation
Definition: GeometricDet.h:47
GeometricDet::OTPhase2Wheel
Definition: GeometricDet.h:81
GeometricDet::GeoHistory
std::vector< DDExpandedNode > GeoHistory
Definition: GeometricDet.h:42
GeometricDet::component
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
GeometricDet::OTPhase2Stack
Definition: GeometricDet.h:78
GeometricDet::PixelPhase2FullDisk
Definition: GeometricDet.h:82
GeometricDet::bounds
std::unique_ptr< Bounds > bounds() const
Definition: GeometricDet.cc:243
GeometricDet::Translation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
Definition: GeometricDet.h:36
GloballyPositioned< float >::PositionType
Point3DBase< float, GlobalTag > PositionType
Definition: GloballyPositioned.h:21
GeometricDet::ConstGeometricDetContainer
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:33
GeometricDet::TOB
Definition: GeometricDet.h:59
GeometricDet::NavRange
DDExpandedView::NavRange NavRange
Definition: GeometricDet.h:32
GeometricDet::params
std::vector< double > const & params() const
Definition: GeometricDet.h:131
DetId.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
GeometricDet::_shape
DDSolidShape _shape
Definition: GeometricDet.h:193
GeometricDet::siliconAPVNum
double siliconAPVNum() const
Definition: GeometricDet.h:185
GeometricDet::_xi
double _xi
Definition: GeometricDet.h:201
GeometricDet::pixROCCols
double pixROCCols() const
Definition: GeometricDet.h:177
GeometricDet::xi
double xi() const
Definition: GeometricDet.h:172
GeometricDet::pixROCy
double pixROCy() const
Definition: GeometricDet.h:179
GeometricDet::layer
Definition: GeometricDet.h:61
GeometricDet::isLeaf
bool isLeaf() const
Definition: GeometricDet.h:112
GeometricDet::name
std::string const & name() const
Definition: GeometricDet.h:126
GeometricDet::_container
ConstGeometricDetContainer _container
Definition: GeometricDet.h:188
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
GeometricDet::GeometricDetContainer
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:34
PGeometricDet.h
DDFilteredView
Definition: DDFilteredView.h:20
GeometricDet::geographicalId
DetId geographicalId() const
Definition: GeometricDet.h:154
GeometricDet::translation
Translation const & translation() const
Definition: GeometricDet.h:120
GeometricDet::_radLength
double _radLength
Definition: GeometricDet.h:200
GeometricDet::clearComponents
void clearComponents()
Definition: GeometricDet.h:104
GeometricDet::addComponent
void addComponent(GeometricDet *)
Definition: GeometricDet.cc:210
GeometricDet::TEC
Definition: GeometricDet.h:60
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
GeometricDet::strng
Definition: GeometricDet.h:63