CMS 3D CMS Logo

TrackerGeometry.h
Go to the documentation of this file.
1 #ifndef Geometry_TrackerGeometryBuilder_TrackerGeometry_H
2 #define Geometry_TrackerGeometryBuilder_TrackerGeometry_H
3 
7 
8 class GeometricDet;
9 
14 class TrackerGeometry final : public TrackingGeometry {
15  explicit TrackerGeometry(GeometricDet const* gd = nullptr);
16 
18 
19  void addType(GeomDetType const* p);
20  void addDetUnit(GeomDet const* p);
21  void addDetUnitId(DetId p);
22  void addDet(GeomDet const* p);
23  void addDetId(DetId p);
24  void finalize();
25 
26 public:
28 
29  enum class ModuleType {
30  UNKNOWN,
31  PXB,
32  PXF,
33  IB1,
34  IB2,
35  OB1,
36  OB2,
37  W1A,
38  W2A,
39  W3A,
40  W1B,
41  W2B,
42  W3B,
43  W4,
44  W5,
45  W6,
46  W7,
47  Ph1PXB,
48  Ph1PXF,
49  Ph2PXB,
50  Ph2PXF,
51  Ph2PXB3D,
52  Ph2PXF3D,
53  Ph2PSP,
54  Ph2PSS,
55  Ph2SS
56  };
57 
58  ~TrackerGeometry() override;
59 
60  const DetTypeContainer& detTypes() const override { return theDetTypes; }
61  const DetContainer& detUnits() const override { return theDetUnits; }
62  const DetContainer& dets() const override { return theDets; }
63  const DetIdContainer& detUnitIds() const override { return theDetUnitIds; }
64  const DetIdContainer& detIds() const override { return theDetIds; }
65  const TrackerGeomDet* idToDetUnit(DetId) const override;
66  const TrackerGeomDet* idToDet(DetId) const override;
67 
69  unsigned int numberOfLayers(int subdet) const;
70  bool isThere(GeomDetEnumerators::SubDetector subdet) const;
71 
72  unsigned int offsetDU(SubDetector sid) const { return theOffsetDU[sid]; }
73  unsigned int endsetDU(SubDetector sid) const { return theEndsetDU[sid]; }
74  // Magic : better be called at the right moment...
75  void setOffsetDU(SubDetector sid) { theOffsetDU[sid] = detUnits().size(); }
76  void setEndsetDU(SubDetector sid) { theEndsetDU[sid] = detUnits().size(); }
77  void fillTestMap(const GeometricDet* gd);
78 
79  ModuleType moduleType(const std::string& name) const;
80 
81  GeometricDet const* trackerDet() const { return theTrackerDet; }
82 
83  const DetContainer& detsPXB() const;
84  const DetContainer& detsPXF() const;
85  const DetContainer& detsTIB() const;
86  const DetContainer& detsTID() const;
87  const DetContainer& detsTOB() const;
88  const DetContainer& detsTEC() const;
89 
91  float getDetectorThickness(DetId) const;
92 
93 private:
95 
97  friend class GeometryAligner;
98 
99  DetTypeContainer theDetTypes; // owns the DetTypes
100  DetContainer theDetUnits; // they're all also into 'theDets', so we assume 'theDets' owns them
101  unsigned int theOffsetDU[6]; // offsets in the above
102  unsigned int theEndsetDU[6]; // end offsets in the above
103  DetContainer theDets; // owns *ONLY* the GeomDet * corresponding to GluedDets.
106  mapIdToDetUnit theMapUnit; // does not own GeomDetUnit *
107  mapIdToDet theMap; // does not own GeomDet *
108 
109  DetContainer thePXBDets; // not owned: they're also in 'theDets'
110  DetContainer thePXFDets; // not owned: they're also in 'theDets'
111  DetContainer theTIBDets; // not owned: they're also in 'theDets'
112  DetContainer theTIDDets; // not owned: they're also in 'theDets'
113  DetContainer theTOBDets; // not owned: they're also in 'theDets'
114  DetContainer theTECDets; // not owned: they're also in 'theDets'
115 
117  unsigned int theNumberOfLayers[6];
118  std::vector<std::tuple<DetId, TrackerGeometry::ModuleType, float> > theDetTypetList;
119 };
120 
121 #endif
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
GeomDetEnumerators::SubDetector
SubDetector
Definition: GeomDetEnumerators.h:10
TrackerGeometry::ModuleType::Ph1PXF
TrackerGeometry::moduleType
ModuleType moduleType(const std::string &name) const
Definition: TrackerGeometry.cc:265
TrackerGeometry::ModuleType::Ph2PXF
TrackerGeometry::ModuleType::W6
TrackerGeometry::addDet
void addDet(GeomDet const *p)
Definition: TrackerGeometry.cc:139
TrackingGeometry
Definition: TrackingGeometry.h:26
GeomDet
Definition: GeomDet.h:27
TrackerGeometry::thePXFDets
DetContainer thePXFDets
Definition: TrackerGeometry.h:110
TrackerGeometry::ModuleType::Ph2PXB3D
TrackerGeometry::ModuleType::Ph2SS
TrackerGeometry::addDetId
void addDetId(DetId p)
Definition: TrackerGeometry.cc:169
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TrackerGeometry::theTECDets
DetContainer theTECDets
Definition: TrackerGeometry.h:114
TrackerGeometry::ModuleType::W3A
TrackerGeometry::ModuleType::Ph2PXF3D
TrackerGeomDet
Definition: TrackerGeomDet.h:6
TrackerGeometry::ModuleType::PXB
TrackerGeometry::ModuleType::W3B
TrackerGeometry::setEndsetDU
void setEndsetDU(SubDetector sid)
Definition: TrackerGeometry.h:76
GeomDetType
Definition: GeomDetType.h:9
TrackingGeometry.h
TrackerGeometry::theNumberOfLayers
unsigned int theNumberOfLayers[6]
Definition: TrackerGeometry.h:117
TrackerGeometry::detTypes
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
Definition: TrackerGeometry.h:60
TrackerGeometry::ModuleType::Ph2PXB
TrackerGeometry::theDetIds
DetIdContainer theDetIds
Definition: TrackerGeometry.h:105
TrackerGeometry::getDetectorType
ModuleType getDetectorType(DetId) const
Definition: TrackerGeometry.cc:247
TrackerGeometry::addType
void addType(GeomDetType const *p)
Definition: TrackerGeometry.cc:126
TrackerGeometry::TrackerGeometry
TrackerGeometry(GeometricDet const *gd=nullptr)
Definition: TrackerGeometry.cc:58
TrackerGeometry::numberOfLayers
unsigned int numberOfLayers(int subdet) const
Definition: TrackerGeometry.cc:211
TrackerGeometry::idToDetUnit
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: TrackerGeometry.cc:183
TrackerGeometry::detsPXB
const DetContainer & detsPXB() const
Definition: TrackerGeometry.cc:171
TrackerGeometry::SubDetector
GeomDetEnumerators::SubDetector SubDetector
Definition: TrackerGeometry.h:27
TrackerGeometry::ModuleType::W2B
DetId
Definition: DetId.h:17
TrackerGeometry::detsTOB
const DetContainer & detsTOB() const
Definition: TrackerGeometry.cc:179
TrackerGeometry::ModuleType::IB2
TrackerGeometry::endsetDU
unsigned int endsetDU(SubDetector sid) const
Definition: TrackerGeometry.h:73
TrackerGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: TrackerGeometry.h:61
TrackerGeometry::ModuleType::W2A
TrackerGeometry::theTIDDets
DetContainer theTIDDets
Definition: TrackerGeometry.h:112
TrackerGeometry::ModuleType
ModuleType
Definition: TrackerGeometry.h:29
TrackerGeometry::thePXBDets
DetContainer thePXBDets
Definition: TrackerGeometry.h:109
TrackerGeometry::detsPXF
const DetContainer & detsPXF() const
Definition: TrackerGeometry.cc:173
GeometricDet
Definition: GeometricDet.h:30
TrackerGeometry::theTOBDets
DetContainer theTOBDets
Definition: TrackerGeometry.h:113
TrackerGeometry::getDetectorThickness
float getDetectorThickness(DetId) const
Definition: TrackerGeometry.cc:256
TrackerGeometry::isThere
bool isThere(GeomDetEnumerators::SubDetector subdet) const
Definition: TrackerGeometry.cc:219
TrackerGeometry::detsTID
const DetContainer & detsTID() const
Definition: TrackerGeometry.cc:177
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackingGeometry::DetTypeContainer
std::vector< const GeomDetType * > DetTypeContainer
Definition: TrackingGeometry.h:28
TrackerGeometry::theEndsetDU
unsigned int theEndsetDU[6]
Definition: TrackerGeometry.h:102
TrackingGeometry::DetIdContainer
std::vector< DetId > DetIdContainer
Definition: TrackingGeometry.h:30
TrackerGeometry::theSubDetTypeMap
GeomDetEnumerators::SubDetector theSubDetTypeMap[6]
Definition: TrackerGeometry.h:116
TrackerGeometry::ModuleType::W4
TrackerGeometry::geomDetSubDetector
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
Definition: TrackerGeometry.cc:203
TrackerGeometry::ModuleType::W5
TrackerGeometry::ModuleType::OB1
TrackerGeomDet.h
TrackingGeometry::DetContainer
std::vector< const GeomDet * > DetContainer
Definition: TrackingGeometry.h:29
TrackerGeometry::trackerDet
GeometricDet const * trackerDet() const
Definition: TrackerGeometry.h:81
TrackerGeometry::fillTestMap
void fillTestMap(const GeometricDet *gd)
Definition: TrackerGeometry.cc:227
TrackerGeometry::detsTIB
const DetContainer & detsTIB() const
Definition: TrackerGeometry.cc:175
TrackerGeometry::theDetTypes
DetTypeContainer theDetTypes
Definition: TrackerGeometry.h:99
TrackerGeometry::theDetUnits
DetContainer theDetUnits
Definition: TrackerGeometry.h:100
TrackerGeometry::theOffsetDU
unsigned int theOffsetDU[6]
Definition: TrackerGeometry.h:101
TrackerGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: TrackerGeometry.h:62
TrackingGeometry::mapIdToDet
std::unordered_map< unsigned int, const GeomDet * > mapIdToDet
Definition: TrackingGeometry.h:32
TrackerGeometry::ModuleType::Ph2PSS
TrackerGeometry::theTIBDets
DetContainer theTIBDets
Definition: TrackerGeometry.h:111
TrackerGeometry::ModuleType::Ph1PXB
TrackerGeometry::theMap
mapIdToDet theMap
Definition: TrackerGeometry.h:107
TrackerGeometry::ModuleType::W1A
TrackerGeometry::theTrackerDet
GeometricDet const * theTrackerDet
Definition: TrackerGeometry.h:94
TrackerGeometry::theDetTypetList
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
Definition: TrackerGeometry.h:118
TrackerGeometry::detsTEC
const DetContainer & detsTEC() const
Definition: TrackerGeometry.cc:181
TrackerGeometry::theDets
DetContainer theDets
Definition: TrackerGeometry.h:103
TrackingGeometry::mapIdToDetUnit
std::unordered_map< unsigned int, const GeomDet * > mapIdToDetUnit
Definition: TrackingGeometry.h:31
TrackerGeometry::ModuleType::OB2
TrackerGeometry::addDetUnitId
void addDetUnitId(DetId p)
Definition: TrackerGeometry.cc:137
TrackerGeometry::ModuleType::IB1
TrackerGeometry::setOffsetDU
void setOffsetDU(SubDetector sid)
Definition: TrackerGeometry.h:75
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TrackerGeometry::detIds
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: TrackerGeometry.h:64
GeomDetEnumerators.h
TrackerGeometry::theDetUnitIds
DetIdContainer theDetUnitIds
Definition: TrackerGeometry.h:104
TrackerGeometry::ModuleType::W7
TrackerGeomBuilderFromGeometricDet
Definition: TrackerGeomBuilderFromGeometricDet.h:17
TrackerGeometry::ModuleType::PXF
TrackerGeometry::ModuleType::UNKNOWN
TrackerGeometry::detUnitIds
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
Definition: TrackerGeometry.h:63
TrackerGeometry::~TrackerGeometry
~TrackerGeometry() override
Definition: TrackerGeometry.cc:104
TrackerGeometry::offsetDU
unsigned int offsetDU(SubDetector sid) const
Definition: TrackerGeometry.h:72
TrackerGeometry::ModuleType::W1B
GeometryAligner
Class to update a given geometry with a set of alignments.
Definition: GeometryAligner.h:33
TrackerGeometry::ModuleType::Ph2PSP
TrackerGeometry::finalize
void finalize()
Definition: TrackerGeometry.cc:111
TrackerGeometry::addDetUnit
void addDetUnit(GeomDet const *p)
Definition: TrackerGeometry.cc:130
TrackerGeometry
Definition: TrackerGeometry.h:14
TrackerGeometry::theMapUnit
mapIdToDetUnit theMapUnit
Definition: TrackerGeometry.h:106