CMS 3D CMS Logo

GeometricDetExtra.h
Go to the documentation of this file.
1 #ifndef Geometry_TrackerNumberingBuilder_GeometricDetExtra_H
2 #define Geometry_TrackerNumberingBuilder_GeometricDetExtra_H
3 
7 
8 #include <vector>
10 
11 #include <ext/pool_allocator.h>
18 public:
19 #ifdef PoolAlloc
20  using GeoHistory = std::vector<DDExpandedNode, PoolAlloc<DDExpandedNode> >;
21 #else
22  using GeoHistory = std::vector<DDExpandedNode>;
23 #endif
24 
27  explicit GeometricDetExtra(GeometricDet const* gd,
28  DetId id,
29  GeoHistory& gh,
30  double vol,
31  double dens,
32  double wgt,
33  double cpy,
34  const std::string& mat,
35  const std::string& name,
36  bool dd = false);
37 
42  GeometricDet const* geometricDet() const { return _mygd; }
43 
48  DetId geographicalId() const { return _geographicalId; }
49  GeoHistory const& parents() const { return _parents; }
50  int copyno() const { return _copy; }
51  double volume() const { return _volume; }
52  double density() const { return _density; }
53  double weight() const { return _weight; }
54  std::string const& material() const { return _material; }
55 
59  bool wasBuiltFromDD() const { return _fromDD; }
60 
61  std::string const& name() const { return _name; }
62 
63 private:
69  double _volume;
70  double _density;
71  double _weight;
72  int _copy;
75  bool _fromDD; // may not need this, keep an eye on it.
76 };
77 
78 #undef PoolAlloc
79 #endif
GeometricDet const * geometricDet() const
std::string const & material() const
GeoHistory const & parents() const
double weight() const
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)
GeometricDet const * _mygd
double density() const
Definition: DetId.h:17
DetId geographicalId() const
double volume() const
void setGeographicalId(DetId id)
std::vector< DDExpandedNode > GeoHistory
bool wasBuiltFromDD() const
std::string const & name() const