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 
19 namespace cms {
20  class DDFilteredView;
21 }
22 
29 public:
31  using ConstGeometricTimingDetContainer = std::vector<GeometricTimingDet const*>;
32  using GeometricTimingDetContainer = std::vector<GeometricTimingDet*>;
33  using RotationMatrix = ROOT::Math::Rotation3D;
34  using Translation = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double> >;
35 
36 #ifdef PoolAlloc
37  using GeoHistory = std::vector<DDExpandedNode, PoolAlloc<DDExpandedNode> >;
38  using nav_type = std::vector<int, PoolAlloc<int> >;
39 #else
40  using GeoHistory = std::vector<DDExpandedNode>;
42 #endif
43 
46 
47  //
48  // more can be added; please add at the end!
49  //
50  typedef enum GTDEnumType {
51  unknown = 100,
52  MTD = 0,
53  BTL = 1,
54  BTLLayer = 2,
55  BTLTray = 3,
56  BTLModule = 4,
57  BTLSensor = 5,
59  ETL = 7,
60  ETLDisc = 8,
61  ETLRing = 9,
62  ETLModule = 10,
63  ETLSensor = 11
65 
72 
83  void clearComponents() { container_.clear(); }
84 
89  void deleteComponents();
90 
91  bool isLeaf() const { return container_.empty(); }
92 
93  GeometricTimingDet* component(size_t index) { return const_cast<GeometricTimingDet*>(container_[index]); }
94 
98  RotationMatrix const& rotation() const { return rot_; }
99  Translation const& translation() const { return trans_; }
100  double phi() const { return phi_; }
101  double rho() const { return rho_; }
102 
103  DDSolidShape const& shape() const { return shape_; }
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
GeometricTimingDet::navType
nav_type const & navType() const
Definition: GeometricTimingDet.h:107
DDSolidShapes.h
GeometricTimingDet::RotationMatrix
ROOT::Math::Rotation3D RotationMatrix
Definition: GeometricTimingDet.h:33
GeometricTimingDet::addComponent
void addComponent(GeometricTimingDet *)
Definition: GeometricTimingDet.cc:224
TkRotation< float >
PGeometricTimingDet::Item
Definition: PGeometricTimingDet.h:14
GeometricTimingDet::shape_
DDSolidShape shape_
Definition: GeometricTimingDet.h:173
GeometricTimingDet::geographicalID_
DetId geographicalID_
Definition: GeometricTimingDet.h:179
DDSolidShape
DDSolidShape
Definition: DDSolidShapes.h:6
GeometricTimingDet::pixROCRows_
double pixROCRows_
Definition: GeometricTimingDet.h:182
GeometricTimingDet::BTLSensor
Definition: GeometricTimingDet.h:57
GeometricTimingDet::type
GeometricTimingEnumType type() const
Definition: GeometricTimingDet.h:104
DDExpandedView::nav_type
std::vector< int > nav_type
std::vector of sibling numbers
Definition: DDExpandedView.h:48
types.h
GeometricTimingDet::Position
Surface::PositionType Position
Definition: GeometricTimingDet.h:44
GeometricTimingDet::ddname_
std::string ddname_
Definition: GeometricTimingDet.h:175
GeometricTimingDet::BTLTray
Definition: GeometricTimingDet.h:55
generateEDF.cont
cont
load Luminosity info ##
Definition: generateEDF.py:629
GeometricTimingDet::ETLRing
Definition: GeometricTimingDet.h:61
GeometricTimingDet::rot_
RotationMatrix rot_
Definition: GeometricTimingDet.h:172
GeometricTimingDet::ConstGeometricTimingDetContainer
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer
Definition: GeometricTimingDet.h:31
GeometricTimingDet::name
std::string const & name() const
Definition: GeometricTimingDet.h:105
GeometricTimingDet::navpos
NavRange navpos() const
Definition: GeometricTimingDet.h:111
GeometricTimingDet::BTLModule
Definition: GeometricTimingDet.h:56
GeometricTimingDet::pixROCx
double pixROCx() const
Definition: GeometricTimingDet.h:158
GeometricTimingDet::siliconAPVNum
double siliconAPVNum() const
Definition: GeometricTimingDet.h:165
GeometricTimingDet::siliconAPVNum_
double siliconAPVNum_
Definition: GeometricTimingDet.h:187
cms::DDFilteredView
Definition: DDFilteredView.h:65
GeometricTimingDet::bounds
std::unique_ptr< Bounds > bounds() const
Definition: GeometricTimingDet.cc:257
GloballyPositioned< float >::RotationType
TkRotation< float > RotationType
Definition: GloballyPositioned.h:22
GeometricTimingDet::stereo_
bool stereo_
Definition: GeometricTimingDet.h:186
GeometricTimingDet::pixROCx_
double pixROCx_
Definition: GeometricTimingDet.h:184
GeometricTimingDet::isLeaf
bool isLeaf() const
Definition: GeometricTimingDet.h:91
GeometricTimingDet::rho_
double rho_
Definition: GeometricTimingDet.h:171
DDExpandedView::NavRange
std::pair< int const *, size_t > NavRange
Definition: DDExpandedView.h:49
GeometricTimingDet::clearComponents
void clearComponents()
Definition: GeometricTimingDet.h:83
DetId
Definition: DetId.h:17
GeometricTimingDet::type_
GeometricTimingEnumType type_
Definition: GeometricTimingDet.h:176
GeometricTimingDet::BTLCrystal
Definition: GeometricTimingDet.h:58
GeometricTimingDet::ETLDisc
Definition: GeometricTimingDet.h:60
GeometricTimingDet::radLength_
double radLength_
Definition: GeometricTimingDet.h:180
GeometricTimingDet::params
std::vector< double > const & params() const
Definition: GeometricTimingDet.h:112
Surface.h
GeometricTimingDet::GeoHistory
std::vector< DDExpandedNode > GeoHistory
Definition: GeometricTimingDet.h:40
GeometricTimingDet::~GeometricTimingDet
~GeometricTimingDet()
Definition: GeometricTimingDet.cc:67
PGeometricTimingDet.h
GeometricTimingDet::GTDEnumType
GTDEnumType
Definition: GeometricTimingDet.h:50
GeometricTimingDet::pixROCy
double pixROCy() const
Definition: GeometricTimingDet.h:159
GeometricTimingDet::radLength
double radLength() const
Definition: GeometricTimingDet.h:151
GeometricTimingDet::trans_
Translation trans_
Definition: GeometricTimingDet.h:169
GeometricTimingDet::pixROCy_
double pixROCy_
Definition: GeometricTimingDet.h:185
Bounds.h
GeometricTimingDet::phi_
double phi_
Definition: GeometricTimingDet.h:170
Point3DBase< float, GlobalTag >
GeometricTimingDet::params_
std::vector< double > params_
Definition: GeometricTimingDet.h:177
GeometricTimingDet::ETLSensor
Definition: GeometricTimingDet.h:63
createTree.dd
string dd
Definition: createTree.py:154
GeometricTimingDet::positionBounds
Position positionBounds() const
Definition: GeometricTimingDet.cc:237
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GeometricTimingDet::translation
Translation const & translation() const
Definition: GeometricTimingDet.h:99
GeometricTimingDet::pixROCRows
double pixROCRows() const
Definition: GeometricTimingDet.h:156
GeometricTimingDet::ETL
Definition: GeometricTimingDet.h:59
GeometricTimingDet::MTD
Definition: GeometricTimingDet.h:52
GeometricTimingDet::nav_type
DDExpandedView::nav_type nav_type
Definition: GeometricTimingDet.h:41
GeometricTimingDet::ddd_
nav_type ddd_
Definition: GeometricTimingDet.h:174
GeometricTimingDet::components
ConstGeometricTimingDetContainer & components()
Definition: GeometricTimingDet.h:120
GeometricTimingDet::NavRange
DDExpandedView::NavRange NavRange
Definition: GeometricTimingDet.h:30
GeometricTimingDet
Definition: GeometricTimingDet.h:28
GeometricTimingDet::GeometricTimingDetContainer
std::vector< GeometricTimingDet * > GeometricTimingDetContainer
Definition: GeometricTimingDet.h:32
GeometricTimingDet::stereo
bool stereo() const
Definition: GeometricTimingDet.h:164
GeometricTimingDet::component
GeometricTimingDet * component(size_t index)
Definition: GeometricTimingDet.h:93
GeometricTimingDet::container_
ConstGeometricTimingDetContainer container_
Definition: GeometricTimingDet.h:168
GeometricTimingDet::geographicalId
DetId geographicalId() const
Definition: GeometricTimingDet.h:135
GeometricTimingDet::phi
double phi() const
Definition: GeometricTimingDet.h:100
GeometricTimingDet::geographicalID
DetId geographicalID() const
Definition: GeometricTimingDet.h:134
DDExpandedView.h
GeometricTimingDet::Rotation
Surface::RotationType Rotation
Definition: GeometricTimingDet.h:45
GeometricTimingDet::navRange
NavRange navRange() const
Definition: GeometricTimingDet.h:109
GeometricTimingDet::BTLLayer
Definition: GeometricTimingDet.h:54
GeometricTimingDet::pixROCCols
double pixROCCols() const
Definition: GeometricTimingDet.h:157
GloballyPositioned< float >::PositionType
Point3DBase< float, GlobalTag > PositionType
Definition: GloballyPositioned.h:21
DetId.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
GeometricTimingDet::BTL
Definition: GeometricTimingDet.h:53
GeometricTimingDet::Translation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
Definition: GeometricTimingDet.h:34
GeometricTimingDet::pixROCCols_
double pixROCCols_
Definition: GeometricTimingDet.h:183
GeometricTimingDet::rotationBounds
Rotation rotationBounds() const
Definition: GeometricTimingDet.cc:242
GeometricTimingDet::deleteComponents
void deleteComponents()
Definition: GeometricTimingDet.cc:232
GeometricTimingDet::shape
DDSolidShape const & shape() const
Definition: GeometricTimingDet.h:103
GeometricTimingDet::rotation
RotationMatrix const & rotation() const
Definition: GeometricTimingDet.h:98
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
GeometricTimingDet::deepComponents
ConstGeometricTimingDetContainer deepComponents() const
Definition: GeometricTimingDet.cc:197
GeometricTimingDet::rho
double rho() const
Definition: GeometricTimingDet.h:101
DDFilteredView
Definition: DDFilteredView.h:20
GeometricTimingDet::addComponents
void addComponents(GeometricTimingDetContainer const &cont)
Definition: GeometricTimingDet.cc:214
GeometricTimingDet::GeometricTimingDet
GeometricTimingDet(DDFilteredView *fv, GeometricTimingEnumType dd)
Definition: GeometricTimingDet.cc:69
GeometricTimingDet::GeometricTimingEnumType
enum GeometricTimingDet::GTDEnumType GeometricTimingEnumType
GeometricTimingDet::components
ConstGeometricTimingDetContainer const & components() const
Definition: GeometricTimingDet.h:121
GeometricTimingDet::ETLModule
Definition: GeometricTimingDet.h:62
GeometricTimingDet::xi
double xi() const
Definition: GeometricTimingDet.h:152
GeometricTimingDet::setGeographicalID
void setGeographicalID(DetId id)
Definition: GeometricTimingDet.h:76
GeometricTimingDet::unknown
Definition: GeometricTimingDet.h:51
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
GeometricTimingDet::xi_
double xi_
Definition: GeometricTimingDet.h:181