CMS 3D CMS Logo

MTDGeometry.h
Go to the documentation of this file.
1 #ifndef Geometry_MTDGeometryBuilder_MTDGeometry_H
2 #define Geometry_MTDGeometryBuilder_MTDGeometry_H
3 
7 
9 
14 class MTDGeometry final : public TrackingGeometry {
15 public:
17 
18  enum class ModuleType {
19  UNKNOWN,
20  BTL,
21  ETL,
22  };
23 
24  ~MTDGeometry() override;
25 
26  const DetTypeContainer& detTypes() const override { return theDetTypes; }
27  const DetContainer& detUnits() const override { return theDetUnits; }
28  const DetContainer& dets() const override { return theDets; }
29  const DetIdContainer& detUnitIds() const override { return theDetUnitIds; }
30  const DetIdContainer& detIds() const override { return theDetIds; }
31  const MTDGeomDet* idToDetUnit(DetId) const override;
32  const MTDGeomDet* idToDet(DetId) const override;
33 
35  unsigned int numberOfLayers(int subdet) const;
36  bool isThere(GeomDetEnumerators::SubDetector subdet) const;
37 
38  unsigned int offsetDU(unsigned sid) const { return theOffsetDU[sid]; }
39  unsigned int endsetDU(unsigned sid) const { return theEndsetDU[sid]; }
40  // Magic : better be called at the right moment...
41  void setOffsetDU(unsigned sid) { theOffsetDU[sid] = detUnits().size(); }
42  void setEndsetDU(unsigned sid) { theEndsetDU[sid] = detUnits().size(); }
43  void fillTestMap(const GeometricTimingDet* gd);
44 
45  ModuleType moduleType(const std::string& name) const;
46 
47  GeometricTimingDet const* trackerDet() const { return theTrackerDet; }
48 
49  const DetContainer& detsBTL() const;
50  const DetContainer& detsETL() const;
51 
53  float getDetectorThickness(DetId) const;
54 
55 private:
56  explicit MTDGeometry(GeometricTimingDet const* gd = nullptr);
57 
59 
60  void addType(GeomDetType const* p);
61  void addDetUnit(GeomDet const* p);
62  void addDetUnitId(DetId p);
63  void addDet(GeomDet const* p);
64  void addDetId(DetId p);
65  void finalize();
66 
68 
70  friend class GeometryAligner;
71 
72  DetTypeContainer theDetTypes; // owns the DetTypes
73  DetContainer theDetUnits; // they're all also into 'theDets', so we assume 'theDets' owns them
74  unsigned int theOffsetDU[2]; // offsets in the above
75  unsigned int theEndsetDU[2]; // end offsets in the above
76  DetContainer theDets; // owns *ONLY* the GeomDet * corresponding to GluedDets.
79  mapIdToDetUnit theMapUnit; // does not own GeomDetUnit *
80  mapIdToDet theMap; // does not own GeomDet *
81 
82  DetContainer theBTLDets; // not owned: they're also in 'theDets'
83  DetContainer theETLDets; // not owned: they're also in 'theDets'
84 
86  unsigned int theNumberOfLayers[2];
87  std::vector<std::tuple<DetId, MTDGeometry::ModuleType, float> > theDetTypetList;
88 };
89 
90 #endif
GeomDetEnumerators::SubDetector
SubDetector
Definition: GeomDetEnumerators.h:10
MTDGeometry::getDetectorThickness
float getDetectorThickness(DetId) const
Definition: MTDGeometry.cc:233
MTDGeometry::addType
void addType(GeomDetType const *p)
Definition: MTDGeometry.cc:126
TrackingGeometry
Definition: TrackingGeometry.h:26
GeomDet
Definition: GeomDet.h:27
MTDGeometry::ModuleType::UNKNOWN
MTDGeometry::numberOfLayers
unsigned int numberOfLayers(int subdet) const
Definition: MTDGeometry.cc:187
MTDGeometry::theNumberOfLayers
unsigned int theNumberOfLayers[2]
Definition: MTDGeometry.h:86
MTDGeometry::theTrackerDet
GeometricTimingDet const * theTrackerDet
Definition: MTDGeometry.h:67
MTDGeometry::addDetUnit
void addDetUnit(GeomDet const *p)
Definition: MTDGeometry.cc:130
MTDGeometry::theEndsetDU
unsigned int theEndsetDU[2]
Definition: MTDGeometry.h:75
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
MTDGeometry::addDetId
void addDetId(DetId p)
Definition: MTDGeometry.cc:157
MTDGeomDet.h
MTDGeometry::theDets
DetContainer theDets
Definition: MTDGeometry.h:76
TrackerGeomDet
Definition: TrackerGeomDet.h:6
GeomDetType
Definition: GeomDetType.h:9
TrackingGeometry.h
MTDGeometry::theDetUnits
DetContainer theDetUnits
Definition: MTDGeometry.h:73
MTDGeometry::theDetUnitIds
DetIdContainer theDetUnitIds
Definition: MTDGeometry.h:77
MTDGeometry::moduleType
ModuleType moduleType(const std::string &name) const
Definition: MTDGeometry.cc:242
MTDGeometry::detIds
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: MTDGeometry.h:30
MTDGeometry::idToDetUnit
const MTDGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: MTDGeometry.cc:163
MTDGeometry::isThere
bool isThere(GeomDetEnumerators::SubDetector subdet) const
Definition: MTDGeometry.cc:195
MTDGeometry::ModuleType::BTL
MTDGeometry::detsETL
const DetContainer & detsETL() const
Definition: MTDGeometry.cc:161
DetId
Definition: DetId.h:17
MTDGeometry::geomDetSubDetector
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
Definition: MTDGeometry.cc:179
MTDGeometry::theMapUnit
mapIdToDetUnit theMapUnit
Definition: MTDGeometry.h:79
MTDGeometry::theOffsetDU
unsigned int theOffsetDU[2]
Definition: MTDGeometry.h:74
MTDGeometry::idToDet
const MTDGeomDet * idToDet(DetId) const override
Definition: MTDGeometry.cc:171
MTDGeometry::MTDGeometry
MTDGeometry(GeometricTimingDet const *gd=nullptr)
Definition: MTDGeometry.cc:42
MTDGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: MTDGeometry.h:27
MTDGeometry::trackerDet
GeometricTimingDet const * trackerDet() const
Definition: MTDGeometry.h:47
MTDGeometry::detTypes
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
Definition: MTDGeometry.h:26
MTDGeomBuilderFromGeometricTimingDet
Definition: MTDGeomBuilderFromGeometricTimingDet.h:16
MTDGeometry::getDetectorType
ModuleType getDetectorType(DetId) const
Definition: MTDGeometry.cc:223
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackingGeometry::DetTypeContainer
std::vector< const GeomDetType * > DetTypeContainer
Definition: TrackingGeometry.h:28
MTDGeometry::theMap
mapIdToDet theMap
Definition: MTDGeometry.h:80
TrackingGeometry::DetIdContainer
std::vector< DetId > DetIdContainer
Definition: TrackingGeometry.h:30
MTDGeometry::finalize
void finalize()
Definition: MTDGeometry.cc:115
MTDGeometry::ModuleType::ETL
MTDGeometry::theDetIds
DetIdContainer theDetIds
Definition: MTDGeometry.h:78
MTDGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: MTDGeometry.h:28
TrackingGeometry::DetContainer
std::vector< const GeomDet * > DetContainer
Definition: TrackingGeometry.h:29
MTDGeometry::endsetDU
unsigned int endsetDU(unsigned sid) const
Definition: MTDGeometry.h:39
MTDGeometry::fillTestMap
void fillTestMap(const GeometricTimingDet *gd)
Definition: MTDGeometry.cc:203
GeometricTimingDet
Definition: GeometricTimingDet.h:29
MTDGeometry::detUnitIds
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
Definition: MTDGeometry.h:29
TrackingGeometry::mapIdToDet
std::unordered_map< unsigned int, const GeomDet * > mapIdToDet
Definition: TrackingGeometry.h:32
MTDGeometry::addDet
void addDet(GeomDet const *p)
Definition: MTDGeometry.cc:139
MTDGeometry::theETLDets
DetContainer theETLDets
Definition: MTDGeometry.h:83
MTDGeometry
Definition: MTDGeometry.h:14
TrackingGeometry::mapIdToDetUnit
std::unordered_map< unsigned int, const GeomDet * > mapIdToDetUnit
Definition: TrackingGeometry.h:31
MTDGeometry::offsetDU
unsigned int offsetDU(unsigned sid) const
Definition: MTDGeometry.h:38
MTDGeometry::addDetUnitId
void addDetUnitId(DetId p)
Definition: MTDGeometry.cc:137
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
MTDGeometry::theSubDetTypeMap
GeomDetEnumerators::SubDetector theSubDetTypeMap[2]
Definition: MTDGeometry.h:85
GeomDetEnumerators.h
MTDGeometry::setOffsetDU
void setOffsetDU(unsigned sid)
Definition: MTDGeometry.h:41
MTDGeometry::~MTDGeometry
~MTDGeometry() override
Definition: MTDGeometry.cc:108
MTDGeometry::ModuleType
ModuleType
Definition: MTDGeometry.h:18
MTDGeometry::theBTLDets
DetContainer theBTLDets
Definition: MTDGeometry.h:82
MTDGeometry::theDetTypetList
std::vector< std::tuple< DetId, MTDGeometry::ModuleType, float > > theDetTypetList
Definition: MTDGeometry.h:87
MTDGeometry::theDetTypes
DetTypeContainer theDetTypes
Definition: MTDGeometry.h:72
MTDGeometry::detsBTL
const DetContainer & detsBTL() const
Definition: MTDGeometry.cc:159
GeometryAligner
Class to update a given geometry with a set of alignments.
Definition: GeometryAligner.h:33
MTDGeometry::setEndsetDU
void setEndsetDU(unsigned sid)
Definition: MTDGeometry.h:42