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 
92  GeometricTimingDet* component(size_t index) { return const_cast<GeometricTimingDet*>(container_[index]); }
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
GeometricTimingDet::navType
nav_type const & navType() const
Definition: GeometricTimingDet.h:107
GeometricTimingDet::RotationMatrix
ROOT::Math::Rotation3D RotationMatrix
Definition: GeometricTimingDet.h:34
GeometricTimingDet::addComponent
void addComponent(GeometricTimingDet *)
Definition: GeometricTimingDet.cc:218
TkRotation< float >
PGeometricTimingDet::Item
Definition: PGeometricTimingDet.h:14
GeometricTimingDet::geographicalID_
DetId geographicalID_
Definition: GeometricTimingDet.h:179
DDSolidShape
DDSolidShape
Definition: DDSolidShapes.h:6
GeometricTimingDet::pixROCRows_
double pixROCRows_
Definition: GeometricTimingDet.h:182
GeometricTimingDet::type
GeometricTimingEnumType type() const
Definition: GeometricTimingDet.h:104
types.h
GeometricTimingDet::Position
Surface::PositionType Position
Definition: GeometricTimingDet.h:43
GeometricTimingDet::ddname_
std::string ddname_
Definition: GeometricTimingDet.h:175
generateEDF.cont
cont
load Luminosity info ##
Definition: generateEDF.py:628
GeometricTimingDet::rot_
RotationMatrix rot_
Definition: GeometricTimingDet.h:172
GeometricTimingDet::ConstGeometricTimingDetContainer
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer
Definition: GeometricTimingDet.h:32
GeometricTimingDet::name
std::string const & name() const
Definition: GeometricTimingDet.h:105
GeometricTimingDet::navpos
NavRange navpos() const
Definition: GeometricTimingDet.h:111
GeometricTimingDet::GeometricTimingEnumType
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
Definition: GeometricTimingDet.h:63
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:70
GeometricTimingDet::bounds
std::unique_ptr< Bounds > bounds() const
Definition: GeometricTimingDet.cc:253
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:90
GeometricTimingDet::rho_
double rho_
Definition: GeometricTimingDet.h:171
GeometricTimingDet::clearComponents
void clearComponents()
Definition: GeometricTimingDet.h:82
DetId
Definition: DetId.h:17
GeometricTimingDet::type_
GeometricTimingEnumType type_
Definition: GeometricTimingDet.h:176
GeometricTimingDet::radLength_
double radLength_
Definition: GeometricTimingDet.h:180
GeometricTimingDet::params
std::vector< double > const & params() const
Definition: GeometricTimingDet.h:112
Surface.h
GeometricTimingDet::~GeometricTimingDet
~GeometricTimingDet()
Definition: GeometricTimingDet.cc:67
PGeometricTimingDet.h
GeometricTimingDet::pixROCy
double pixROCy() const
Definition: GeometricTimingDet.h:159
DDSolidShapes.h
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
createTree.dd
string dd
Definition: createTree.py:154
GeometricTimingDet::positionBounds
Position positionBounds() const
Definition: GeometricTimingDet.cc:231
cms::dd::value
Mapping::value_type::value_type value(Mapping a, const std::string &name)
Definition: DDSolidShapes.h:42
cms::DDSolidShape
DDSolidShape
Definition: DDSolidShapes.h:73
GeometricTimingDet::translation
Translation const & translation() const
Definition: GeometricTimingDet.h:98
GeometricTimingDet::pixROCRows
double pixROCRows() const
Definition: GeometricTimingDet.h:156
GeometricTimingDet::shape
LegacySolidShape shape() const
Definition: GeometricTimingDet.h:102
GeometricTimingDet::NavRange
std::pair< int const *, size_t > NavRange
Definition: GeometricTimingDet.h:31
GeometricTimingDet::ddd_
nav_type ddd_
Definition: GeometricTimingDet.h:174
GeometricTimingDet::components
ConstGeometricTimingDetContainer & components()
Definition: GeometricTimingDet.h:120
GeometricTimingDet::shape_
cms::DDSolidShape shape_
Definition: GeometricTimingDet.h:173
GeometricTimingDet
Definition: GeometricTimingDet.h:29
GeometricTimingDet::GeometricTimingDetContainer
std::vector< GeometricTimingDet * > GeometricTimingDetContainer
Definition: GeometricTimingDet.h:33
GeometricTimingDet::stereo
bool stereo() const
Definition: GeometricTimingDet.h:164
GeometricTimingDet::component
GeometricTimingDet * component(size_t index)
Definition: GeometricTimingDet.h:92
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:99
GeometricTimingDet::geographicalID
DetId geographicalID() const
Definition: GeometricTimingDet.h:134
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GeometricTimingDet::Rotation
Surface::RotationType Rotation
Definition: GeometricTimingDet.h:44
GeometricTimingDet::navRange
NavRange navRange() const
Definition: GeometricTimingDet.h:109
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:29
GeometricTimingDet::Translation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
Definition: GeometricTimingDet.h:35
GeometricTimingDet::pixROCCols_
double pixROCCols_
Definition: GeometricTimingDet.h:183
GeometricTimingDet::nav_type
std::vector< int > nav_type
Definition: GeometricTimingDet.h:40
GeometricTimingDet::rotationBounds
Rotation rotationBounds() const
Definition: GeometricTimingDet.cc:238
GeometricTimingDet::deleteComponents
void deleteComponents()
Definition: GeometricTimingDet.cc:226
GeometricTimingDet::rotation
RotationMatrix const & rotation() const
Definition: GeometricTimingDet.h:97
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
GeometricTimingDet::deepComponents
ConstGeometricTimingDetContainer deepComponents() const
Definition: GeometricTimingDet.cc:191
GeometricTimingDet::rho
double rho() const
Definition: GeometricTimingDet.h:100
DDFilteredView
Definition: DDFilteredView.h:20
GeometricTimingDet::addComponents
void addComponents(GeometricTimingDetContainer const &cont)
Definition: GeometricTimingDet.cc:208
cms::LegacySolidShapeMap
const std::array< const cms::dd::ValuePair< LegacySolidShape, cms::DDSolidShape >, 21 > LegacySolidShapeMap
Definition: DDSolidShapes.h:122
GeometricTimingDet::GeometricTimingDet
GeometricTimingDet(DDFilteredView *fv, GeometricTimingEnumType dd)
Definition: GeometricTimingDet.cc:69
GeometricTimingDet::components
ConstGeometricTimingDetContainer const & components() const
Definition: GeometricTimingDet.h:121
GeometricTimingDet::shape_dd4hep
cms::DDSolidShape shape_dd4hep() const
Definition: GeometricTimingDet.h:103
GeometricTimingDet::xi
double xi() const
Definition: GeometricTimingDet.h:152
GeometricTimingDet::setGeographicalID
void setGeographicalID(DetId id)
Definition: GeometricTimingDet.h:75
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
susybsm::HSCParticleType::unknown
Definition: HSCParticle.h:20
GeometricTimingDet::xi_
double xi_
Definition: GeometricTimingDet.h:181