CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DetectorDescription/Core/interface/DDMaterial.h

Go to the documentation of this file.
00001 #ifndef DDMaterial_h
00002 #define DDMaterial_h
00003 
00004 #include <iostream>
00005 #include <vector>
00006 #include <utility>
00007 #include "DetectorDescription/Core/interface/DDName.h"
00008 #include "DetectorDescription/Core/interface/DDBase.h"
00009 
00010 namespace DDI { class Material; }
00011 
00013 
00041 class DDMaterial : public DDBase<DDName,DDI::Material*>
00042 {
00043   friend std::ostream & operator<<(std::ostream &, const DDMaterial &);
00044   
00045 public:
00046   typedef std::vector<std::pair<DDMaterial,double> > FractionV;
00047   
00049   DDMaterial();
00050   
00052   DDMaterial(const DDName & name);
00053 
00055   DDMaterial(const DDName & name, double z, double a, double d);
00056   
00058   DDMaterial(const DDName & name, double density);
00059   
00061   int noOfConstituents() const;
00062   
00064   FractionV::value_type constituent(int i) const; 
00065   
00067   int addMaterial(const DDMaterial & m, double fm); 
00068   
00070   double a() const; 
00071   
00073   double z() const; 
00074   
00076   double density() const;
00077 };
00078 
00079 std::ostream & operator<<(std::ostream &, const DDMaterial &);
00080 
00081 #endif