CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GeometricDetExtra.h
Go to the documentation of this file.
1 #ifndef Geometry_TrackerNumberingBuilder_GeometricDetExtra_H
2 #define Geometry_TrackerNumberingBuilder_GeometricDetExtra_H
3 
4 //#include "CondFormats/GeometryObjects/interface/PGeometricDetExtra.h"
7 /* #include "DetectorDescription/Base/interface/DDRotationMatrix.h" */
8 /* #include "DetectorDescription/Base/interface/DDTranslation.h" */
9 /* #include "DetectorDescription/Core/interface/DDSolidShapes.h" */
10 /* #include "DataFormats/GeometrySurface/interface/Surface.h" */
11 /* #include "DataFormats/GeometrySurface/interface/Bounds.h" */
13 
14 #include <vector>
16 
17 #include <ext/pool_allocator.h>
18 // waiting for template-alias
19 //#define PoolAlloc __gnu_cxx::__pool_alloc
26  public:
28 #ifdef PoolAlloc
29  typedef std::vector< DDExpandedNode, PoolAlloc<DDExpandedNode> > GeoHistory;
30 #endif
31 #ifndef PoolAlloc
32  typedef std::vector<DDExpandedNode> GeoHistory;
33 #endif
34 
37  GeometricDetExtra( GeometricDet const *gd ) : _mygd(gd) { }; // this better be "copied into" or it will never have any valid numbers/info.
38 
39  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 );
40 
45 
46  /*
47  GeometricDetExtra(const GeometricDetExtra &);
48 
49  GeometricDetExtra & operator=( const GeometricDetExtra & );
50  */
55  GeometricDet const * geometricDet() const { return _mygd; }
56  // void setGeometricDet( GeometricDet* gd ) { _mygd=gd; }
57 
61  void setGeographicalId(DetId id) const {
63  //std::cout <<"setGeographicalId " << int(id) << std::endl;
64  }
65  DetId geographicalId() const { return _geographicalId; }
66  //rr
70  GeoHistory const & parents() const {
71  //std::cout<<"parents"<<std::endl;
72  return _parents;
73  }
74  //rr
75  int copyno() const {
76  //std::cout<<"copyno"<<std::endl;
77  return _copy;
78  }
79  double volume() const {
80  //std::cout<<"volume"<<std::endl;
81  return _volume;
82  }
83  double density() const {
84  //std::cout<<"density"<<std::endl;
85  return _density;
86  }
87  double weight() const {
88  //std::cout<<"weight"<<std::endl;
89  return _weight;
90  }
91  std::string const & material() const {
92  //std::cout<<"material"<<std::endl;
93  return _material;
94  }
95 
99  bool wasBuiltFromDD() const {
100  //std::cout<<"wasBuildFromDD"<<std::endl;
101  return _fromDD;
102  }
103 
104  std::string const& name() const { return _name; }
105 
106  private:
107 
111  //FIXME WHY? FROM GeometricDet comment
114  double _volume;
115  double _density;
116  double _weight;
117  int _copy;
118  std::string _material;
119  std::string _name;
120  bool _fromDD; // may not need this, keep an eye on it.
121 };
122 
123 #undef PoolAlloc
124 #endif
GeometricDet const * geometricDet() const
std::string const & material() const
DDExpandedView::NavRange NavRange
GeoHistory const & parents() const
double weight() const
std::pair< int const *, size_t > NavRange
std::vector< DDExpandedNode > GeoHistory
GeometricDet const * _mygd
double density() const
void setGeographicalId(DetId id) const
Definition: DetId.h:20
DetId geographicalId() const
GeometricDetExtra(GeometricDet const *gd)
double volume() const
bool wasBuiltFromDD() const
std::string const & name() const