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 {
12  class Material;
13 }
14 
16 
45 class DDMaterial : public DDBase<DDName, std::unique_ptr<DDI::Material>> {
46  friend std::ostream &operator<<(std::ostream &, const DDMaterial &);
47 
48 public:
49  using FractionV = std::vector<std::pair<DDMaterial, double>>;
50 
52  DDMaterial();
53 
55  DDMaterial(const DDName &name);
56 
58  DDMaterial(const DDName &name, double z, double a, double d);
59 
61  DDMaterial(const DDName &name, double density);
62 
64  int noOfConstituents() const;
65 
68 
70  int addMaterial(const DDMaterial &m, double fm);
71 
73  double a() const;
74 
76  double z() const;
77 
79  double density() const;
80 };
81 
82 std::ostream &operator<<(std::ostream &, const DDMaterial &);
83 
84 #endif
DDBase.h
DDI
Definition: DDCompactView.h:24
DDMaterial::FractionV
std::vector< std::pair< DDMaterial, double > > FractionV
Definition: DDMaterial.h:49
mps_fire.i
i
Definition: mps_fire.py:355
g4SimHits_cfi.Material
Material
Definition: g4SimHits_cfi.py:547
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
DDMaterial::density
double density() const
returns the density
Definition: DDMaterial.cc:80
DDMaterial::z
double z() const
retruns the atomic number
Definition: DDMaterial.cc:78
DDMaterial::noOfConstituents
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
Definition: DDMaterial.cc:72
DDMaterial::constituent
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
Definition: DDMaterial.cc:74
operator<<
std::ostream & operator<<(std::ostream &, const DDMaterial &)
Definition: DDMaterial.cc:101
DDMaterial
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
DDBase< DDName, std::unique_ptr< DDI::Material > >::name
const DDName & name() const
Definition: DDBase.h:59
DDMaterial::operator<<
friend std::ostream & operator<<(std::ostream &, const DDMaterial &)
Definition: DDMaterial.cc:101
DDMaterial::a
double a() const
returns the atomic mass
Definition: DDMaterial.cc:76
DDMaterial::DDMaterial
DDMaterial()
Creates a uninitialized reference-object (see DDLogicalPart documentation for details on reference ob...
Definition: DDMaterial.cc:15
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
DDName.h
ztail.d
d
Definition: ztail.py:151
DDBase
Definition: DDBase.h:10
DDMaterial::addMaterial
int addMaterial(const DDMaterial &m, double fm)
adds a material to the mixture proportional to its fraction-mass fm.
Definition: DDMaterial.cc:63