Go to the documentation of this file.00001 #ifndef Geometry_TrackerNumberingBuilder_GeometricDetExtra_H
00002 #define Geometry_TrackerNumberingBuilder_GeometricDetExtra_H
00003
00004
00005 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
00006 #include "DetectorDescription/Core/interface/DDExpandedView.h"
00007
00008
00009
00010
00011
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
00019
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) { };
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
00048
00049
00050
00055 GeometricDet const * geometricDet() const { return _mygd; }
00056
00057
00061 void setGeographicalId(DetId id) const {
00062 _geographicalId = id;
00063
00064 }
00065 DetId geographicalId() const { return _geographicalId; }
00066
00070 GeoHistory const & parents() const {
00071
00072 return _parents;
00073 }
00074
00075 int copyno() const {
00076
00077 return _copy;
00078 }
00079 double volume() const {
00080
00081 return _volume;
00082 }
00083 double density() const {
00084
00085 return _density;
00086 }
00087 double weight() const {
00088
00089 return _weight;
00090 }
00091 std::string const & material() const {
00092
00093 return _material;
00094 }
00095
00099 bool wasBuiltFromDD() const {
00100
00101 return _fromDD;
00102 }
00103
00104 std::string const& name() const { return _name; }
00105
00106 private:
00107
00110 GeometricDet const* _mygd;
00111
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;
00121 };
00122
00123 #undef PoolAlloc
00124 #endif