CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DDMaterial.cc File Reference
#include "DetectorDescription/Base/interface/DDdebug.h"
#include "CLHEP/Units/GlobalSystemOfUnits.h"
#include "DetectorDescription/Core/interface/DDMaterial.h"
#include "DetectorDescription/Core/src/Material.h"
#include "DetectorDescription/Base/interface/DDException.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const DDMaterial &mat)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const DDMaterial mat 
)

Definition at line 132 of file DDMaterial.cc.

References DDMaterial::a(), DDMaterial::constituent(), DDMaterial::density(), f, g, i, testEve_cfg::level, DDBase< N, C >::name(), DDMaterial::noOfConstituents(), asciidump::s, and DDMaterial::z().

133 {
134  static int level=0;
135  ++level;
136  if (mat) {
137  os << '[' << mat.name() <<']' << " z=" << mat.z()
138  << " a=" << mat.a()/g*mole << "*g/mole"
139  << " d=" << mat.density()/g*cm3 << "*g/cm3";
140  std::string s(2*level,' ');
141  for (int i=0; i<mat.noOfConstituents(); ++i) {
143  os << std::endl << s << i+1 << " : fm=" << f.second
144  << " : " << f.first;
145  }
146  //--level;
147  }
148  else
149  os << "* material not declared * ";
150  --level;
151  return os;
152 }
double a() const
returns the atomic mass
Definition: DDMaterial.cc:103
int i
Definition: DBlmapReader.cc:9
const N & name() const
Definition: DDBase.h:88
Container::value_type value_type
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
double z() const
retruns the atomic number
Definition: DDMaterial.cc:109
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
Definition: DDMaterial.cc:95
double f[11][100]
double density() const
returns the density
Definition: DDMaterial.cc:115
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
Definition: DDMaterial.cc:89
tuple level
Definition: testEve_cfg.py:34
string s
Definition: asciidump.py:422