CMS 3D CMS Logo

DDMaterial.h
Go to the documentation of this file.
1 #ifndef DDMaterial_h
2 #define DDMaterial_h
3 
4 #include <iostream>
5 #include <memory>
6 #include <vector>
7 #include <utility>
10 
11 namespace DDI { class Material; }
12 
14 
43 class DDMaterial : public DDBase<DDName,std::unique_ptr<DDI::Material>>
44 {
45  friend std::ostream & operator<<(std::ostream &, const DDMaterial &);
46 
47 public:
48  using FractionV = std::vector<std::pair<DDMaterial, double>>;
49 
51  DDMaterial();
52 
54  DDMaterial(const DDName & name);
55 
57  DDMaterial(const DDName & name, double z, double a, double d);
58 
60  DDMaterial(const DDName & name, double density);
61 
63  int noOfConstituents() const;
64 
66  FractionV::value_type constituent(int i) const;
67 
69  int addMaterial(const DDMaterial & m, double fm);
70 
72  double a() const;
73 
75  double z() const;
76 
78  double density() const;
79 };
80 
81 std::ostream & operator<<(std::ostream &, const DDMaterial &);
82 
83 #endif
Definition: DDBase.h:10
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
std::ostream & operator<<(std::ostream &, const DDMaterial &)
Definition: DDMaterial.cc:132
double a
Definition: hdecay.h:121
std::vector< std::pair< DDMaterial, double >> FractionV
Definition: DDMaterial.h:48