CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h

Go to the documentation of this file.
00001 #ifndef Geometry_TrackerGeometryBuilder_TrackerGeometry_H
00002 #define Geometry_TrackerGeometryBuilder_TrackerGeometry_H
00003 
00004 #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
00005 
00006 class GeometricDet;
00007 
00008 #include "Geometry/TrackerGeometryBuilder/interface/trackerHierarchy.h"
00009 
00010 #include "DataFormats/Common/interface/Trie.h"
00011 
00012 // FIXME here just to allow prototyping...
00013 namespace trackerTrie {
00014   typedef GeomDet const* PDet;
00015   typedef edm::Trie<PDet> DetTrie;
00016   typedef edm::TrieNode<PDet> Node;
00017   typedef Node const * node_pointer; // sigh....
00018   typedef edm::TrieNodeIter<PDet> node_iterator;
00019 }
00020 
00021 
00026 class TrackerGeometry : public TrackingGeometry {
00027 public:
00028 
00029   explicit TrackerGeometry(GeometricDet const* gd=0);  
00030 
00031   virtual ~TrackerGeometry() ;
00032 
00033   virtual const DetTypeContainer&  detTypes()         const;
00034   virtual const DetUnitContainer&  detUnits()         const;
00035   virtual const DetContainer&      dets()             const;
00036   virtual const DetIdContainer&    detUnitIds()       const;
00037   virtual const DetIdContainer&    detIds()           const;
00038   virtual const GeomDetUnit*       idToDetUnit(DetId) const;
00039   virtual const GeomDet*           idToDet(DetId)     const;
00040 
00041 
00042   void addType(GeomDetType* p);
00043   void addDetUnit(GeomDetUnit* p);
00044   void addDetUnitId(DetId p);
00045   void addDet(GeomDet* p);
00046   void addDetId(DetId p);
00047 
00048 
00049 
00050 
00051   GeometricDet const * trackerDet() const; 
00052 
00053   const DetContainer& detsPXB() const;
00054   const DetContainer& detsPXF() const;
00055   const DetContainer& detsTIB() const;
00056   const DetContainer& detsTID() const;
00057   const DetContainer& detsTOB() const;
00058   const DetContainer& detsTEC() const;
00059 
00060 private:
00061 
00062   GeometricDet const * theTrackerDet; 
00063 
00065   friend class GeometryAligner;
00066 
00067   DetTypeContainer  theDetTypes;  // owns the DetTypes
00068   DetUnitContainer  theDetUnits;  // they're all also into 'theDets', so we assume 'theDets' owns them
00069   DetContainer      theDets;      // owns *ONLY* the GeomDet * corresponding to GluedDets.
00070   DetIdContainer    theDetUnitIds;
00071   DetIdContainer    theDetIds; 
00072   mapIdToDetUnit    theMapUnit; // does not own GeomDetUnit *
00073   mapIdToDet        theMap;     // does not own GeomDet *
00074 
00075   DetContainer      thePXBDets; // not owned: they're also in 'theDets'
00076   DetContainer      thePXFDets; // not owned: they're also in 'theDets'
00077   DetContainer      theTIBDets; // not owned: they're also in 'theDets'
00078   DetContainer      theTIDDets; // not owned: they're also in 'theDets'
00079   DetContainer      theTOBDets; // not owned: they're also in 'theDets'
00080   DetContainer      theTECDets; // not owned: they're also in 'theDets'
00081 
00082 
00083 };
00084 
00085 #endif