CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Geometry/TrackerNumberingBuilder/interface/GeometricDetExtra.h

Go to the documentation of this file.
00001 #ifndef Geometry_TrackerNumberingBuilder_GeometricDetExtra_H
00002 #define Geometry_TrackerNumberingBuilder_GeometricDetExtra_H
00003 
00004 //#include "CondFormats/GeometryObjects/interface/PGeometricDetExtra.h"
00005 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
00006 #include "DetectorDescription/Core/interface/DDExpandedView.h"
00007 /* #include "DetectorDescription/Base/interface/DDRotationMatrix.h" */
00008 /* #include "DetectorDescription/Base/interface/DDTranslation.h" */
00009 /* #include "DetectorDescription/Core/interface/DDSolidShapes.h" */
00010 /* #include "DataFormats/GeometrySurface/interface/Surface.h" */
00011 /* #include "DataFormats/GeometrySurface/interface/Bounds.h" */
00012 #include "DataFormats/DetId/interface/DetId.h"
00013 
00014 #include <vector>
00015 #include "FWCore/ParameterSet/interface/types.h"
00016 
00017 #include <ext/pool_allocator.h>
00018 // waiting for template-alias
00019 //#define PoolAlloc  __gnu_cxx::__pool_alloc
00025 class GeometricDetExtra {
00026  public:
00027   typedef DDExpandedView::NavRange NavRange;
00028 #ifdef PoolAlloc
00029   typedef std::vector< DDExpandedNode, PoolAlloc<DDExpandedNode> > GeoHistory;
00030 #endif
00031 #ifndef PoolAlloc
00032   typedef std::vector<DDExpandedNode> GeoHistory;
00033 #endif
00034 
00037   GeometricDetExtra( GeometricDet const *gd ) : _mygd(gd) { }; // this better be "copied into" or it will never have any valid numbers/info.
00038     
00039     GeometricDetExtra( GeometricDet const *gd, DetId id, GeoHistory& gh,  double vol, double dens, double wgt, double cpy, const std::string& mat, const std::string& name, bool dd=false );
00040 
00044   ~GeometricDetExtra();
00045   
00046   /*
00047     GeometricDetExtra(const GeometricDetExtra &);
00048   
00049   GeometricDetExtra & operator=( const GeometricDetExtra & );
00050   */
00055   GeometricDet const * geometricDet() const { return _mygd; } 
00056   //  void setGeometricDet( GeometricDet* gd )  { _mygd=gd; }
00057   
00061   void setGeographicalId(DetId id) const {
00062     _geographicalId = id; 
00063     //std::cout <<"setGeographicalId " << int(id) << std::endl;
00064   }
00065   DetId geographicalId() const { return _geographicalId; }
00066   //rr
00070   GeoHistory const &  parents() const {
00071     //std::cout<<"parents"<<std::endl;
00072     return _parents;
00073   }
00074   //rr  
00075   int copyno() const {
00076     //std::cout<<"copyno"<<std::endl;
00077     return _copy;
00078   }
00079   double volume() const {
00080     //std::cout<<"volume"<<std::endl;
00081     return _volume;
00082   }
00083   double density() const {
00084     //std::cout<<"density"<<std::endl;
00085     return _density;
00086   }
00087   double weight() const {
00088     //std::cout<<"weight"<<std::endl;
00089     return _weight;
00090   }
00091   std::string const &  material() const {
00092     //std::cout<<"material"<<std::endl;
00093     return _material;
00094   }
00095   
00099   bool wasBuiltFromDD() const {
00100     //std::cout<<"wasBuildFromDD"<<std::endl;
00101     return _fromDD;
00102   }
00103 
00104   std::string const& name() const { return _name; }
00105   
00106  private:
00107 
00110   GeometricDet const* _mygd;  
00111   //FIXME WHY? FROM GeometricDet comment 
00112   mutable DetId _geographicalId;
00113   GeoHistory _parents;
00114   double _volume;
00115   double _density;
00116   double _weight;
00117   int    _copy;
00118   std::string _material;
00119   std::string _name;
00120   bool _fromDD; // may not need this, keep an eye on it.
00121 };
00122 
00123 #undef PoolAlloc
00124 #endif