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"

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 126 of file DDMaterial.cc.

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

127 {
128  static int level=0;
129  ++level;
130  if (mat) {
131  os << '[' << mat.name() <<']' << " z=" << mat.z()
132  << " a=" << mat.a()/g*mole << "*g/mole"
133  << " d=" << mat.density()/g*cm3 << "*g/cm3";
134  std::string s(2*level,' ');
135  for (int i=0; i<mat.noOfConstituents(); ++i) {
137  os << std::endl << s << i+1 << " : fm=" << f.second
138  << " : " << f.first;
139  }
140  //--level;
141  }
142  else
143  os << "* material not declared * ";
144  --level;
145  return os;
146 }
double a() const
returns the atomic mass
Definition: DDMaterial.cc:97
int i
Definition: DBlmapReader.cc:9
const N & name() const
Definition: DDBase.h:82
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:103
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
Definition: DDMaterial.cc:89
double f[11][100]
Container::value_type value_type
double density() const
returns the density
Definition: DDMaterial.cc:109
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
Definition: DDMaterial.cc:83
tuple level
Definition: testEve_cfg.py:34