test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackerGeometry.h
Go to the documentation of this file.
1 #ifndef Geometry_TrackerGeometryBuilder_TrackerGeometry_H
2 #define Geometry_TrackerGeometryBuilder_TrackerGeometry_H
3 
6 
7 class GeometricDet;
8 
10 
12 
13 // FIXME here just to allow prototyping...
14 namespace trackerTrie {
15  typedef GeomDet const* PDet;
18  typedef Node const * node_pointer; // sigh....
20 }
21 
22 
28 public:
30 
31  explicit TrackerGeometry(GeometricDet const* gd=0);
32 
33  virtual ~TrackerGeometry() ;
34 
35  virtual const DetTypeContainer& detTypes() const;
36  virtual const DetUnitContainer& detUnits() const;
37  virtual const DetContainer& dets() const;
38  virtual const DetIdContainer& detUnitIds() const;
39  virtual const DetIdContainer& detIds() const;
40  virtual const GeomDetUnit* idToDetUnit(DetId) const;
41  virtual const GeomDet* idToDet(DetId) const;
42 
43 
44  void addType(GeomDetType const * p);
45  void addDetUnit(GeomDetUnit const * p);
46  void addDetUnitId(DetId p);
47  void addDet(GeomDet const * p);
48  void addDetId(DetId p);
49 
50  unsigned int offsetDU(SubDetector sid) const { return theOffsetDU[sid];}
51  unsigned int endsetDU(SubDetector sid) const { return theEndsetDU[sid];}
52  // Magic : better be called at the right moment...
53  void setOffsetDU(SubDetector sid) { theOffsetDU[sid]=detUnits().size();}
54  void setEndsetDU(SubDetector sid) { theEndsetDU[sid]=detUnits().size();}
55 
56  GeometricDet const * trackerDet() const;
57 
58  const DetContainer& detsPXB() const;
59  const DetContainer& detsPXF() const;
60  const DetContainer& detsTIB() const;
61  const DetContainer& detsTID() const;
62  const DetContainer& detsTOB() const;
63  const DetContainer& detsTEC() const;
64 
65 private:
66 
68 
70  friend class GeometryAligner;
71 
72  DetTypeContainer theDetTypes; // owns the DetTypes
73  DetUnitContainer theDetUnits; // they're all also into 'theDets', so we assume 'theDets' owns them
74  unsigned int theOffsetDU[6]; // offsets in the above
75  unsigned int theEndsetDU[6]; // 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 thePXBDets; // not owned: they're also in 'theDets'
83  DetContainer thePXFDets; // not owned: they're also in 'theDets'
84  DetContainer theTIBDets; // not owned: they're also in 'theDets'
85  DetContainer theTIDDets; // not owned: they're also in 'theDets'
86  DetContainer theTOBDets; // not owned: they're also in 'theDets'
87  DetContainer theTECDets; // not owned: they're also in 'theDets'
88 
89 
90 };
91 
92 #endif
unsigned int theOffsetDU[6]
std::vector< GeomDetType const * > DetTypeContainer
void addDet(GeomDet const *p)
mapIdToDet theMap
Node const * node_pointer
edm::TrieNodeIter< PDet > node_iterator
void setEndsetDU(SubDetector sid)
this class represent the node of a trie, it contains a link to a sub node and a link to a brother (no...
Definition: Trie.h:34
Class to update a given geometry with a set of alignments.
__gnu_cxx::hash_map< unsigned int, GeomDet const * > mapIdToDet
TrackerGeometry(GeometricDet const *gd=0)
DetIdContainer theDetIds
DetIdContainer theDetUnitIds
DetContainer theTECDets
DetContainer theDets
void addDetId(DetId p)
DetUnitContainer theDetUnits
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
void addDetUnit(GeomDetUnit const *p)
virtual const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
unsigned int endsetDU(SubDetector sid) const
mapIdToDetUnit theMapUnit
void setOffsetDU(SubDetector sid)
const DetContainer & detsTEC() const
DetTypeContainer theDetTypes
virtual ~TrackerGeometry()
void addType(GeomDetType const *p)
unsigned int offsetDU(SubDetector sid) const
virtual const DetTypeContainer & detTypes() const
Return a vector of all det types.
edm::Trie< PDet > DetTrie
const DetContainer & detsPXB() const
GeometricDet const * trackerDet() const
GeomDet const * PDet
__gnu_cxx::hash_map< unsigned int, GeomDetUnit const * > mapIdToDetUnit
unsigned int theEndsetDU[6]
virtual const GeomDet * idToDet(DetId) const
DetContainer theTIDDets
const DetContainer & detsTIB() const
Definition: DetId.h:18
DetContainer thePXBDets
DetContainer thePXFDets
GeomDetEnumerators::SubDetector SubDetector
void addDetUnitId(DetId p)
DetContainer theTIBDets
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
DetContainer theTOBDets
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
const DetContainer & detsPXF() const
const DetContainer & detsTOB() const
edm::TrieNode< PDet > Node
std::vector< GeomDet const * > DetContainer
std::vector< GeomDetUnit const * > DetUnitContainer
GeometricDet const * theTrackerDet
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
const DetContainer & detsTID() const
std::vector< DetId > DetIdContainer