Geant4-11
Functions
G4Material.cc File Reference
#include <iomanip>
#include "G4Material.hh"
#include "G4NistManager.hh"
#include "G4UnitsTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4Exp.hh"
#include "G4Log.hh"
#include "G4ExtendedMaterial.hh"
#include "G4AtomicShells.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &flux, const G4Material &material)
 
std::ostream & operator<< (std::ostream &flux, const G4Material *material)
 
std::ostream & operator<< (std::ostream &flux, const G4MaterialTable &MaterialTable)
 

Function Documentation

◆ operator<<() [1/3]

std::ostream & operator<< ( std::ostream &  flux,
const G4Material material 
)

Definition at line 809 of file G4Material.cc.

810{
811 flux << &material;
812 return flux;
813}
string material
Definition: eplot.py:19

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream &  flux,
const G4Material material 
)

Definition at line 764 of file G4Material.cc.

765{
766 std::ios::fmtflags mode = flux.flags();
767 flux.setf(std::ios::fixed,std::ios::floatfield);
768 G4long prec = flux.precision(3);
769
770 flux
771 << " Material: " << std::setw(8) << material->fName
772 << " " << material->fChemicalFormula << " "
773 << " density: " << std::setw(6) << std::setprecision(3)
774 << G4BestUnit(material->fDensity,"Volumic Mass")
775 << " RadL: " << std::setw(7) << std::setprecision(3)
776 << G4BestUnit(material->fRadlen,"Length")
777 << " Nucl.Int.Length: " << std::setw(7) << std::setprecision(3)
778 << G4BestUnit(material->fNuclInterLen,"Length")
779 << "\n" << std::setw(30)
780 << " Imean: " << std::setw(7) << std::setprecision(3)
781 << G4BestUnit(material->GetIonisation()->GetMeanExcitationEnergy(),"Energy")
782 << " temperature: " << std::setw(6) << std::setprecision(2)
783 << (material->fTemp)/CLHEP::kelvin << " K"
784 << " pressure: " << std::setw(6) << std::setprecision(2)
785 << (material->fPressure)/CLHEP::atmosphere << " atm" << "\n";
786
787 for (G4int i=0; i<material->fNumberOfElements; i++) {
788 flux
789 << "\n ---> " << (*(material->theElementVector))[i]
790 << "\n ElmMassFraction: "
791 << std::setw(6)<< std::setprecision(2)
792 << (material->fMassFractionVector[i])/perCent << " %"
793 << " ElmAbundance " << std::setw(6)<< std::setprecision(2)
794 << 100*(material->fVecNbOfAtomsPerVolume[i])
795 /(material->fTotNbOfAtomsPerVolume)
796 << " % \n";
797 }
798 flux.precision(prec);
799 flux.setf(mode,std::ios::floatfield);
800
801 if(material->IsExtended())
802 { static_cast<const G4ExtendedMaterial*>(material)->Print(flux); }
803
804 return flux;
805}
static constexpr double perCent
Definition: G4SIunits.hh:325
#define G4BestUnit(a, b)
long G4long
Definition: G4Types.hh:87
int G4int
Definition: G4Types.hh:85
static const double prec
Definition: RanecuEngine.cc:61
static constexpr double kelvin
static constexpr double atmosphere
void Print(G4Element &ele)
Definition: pyG4Element.cc:55

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream &  flux,
const G4MaterialTable MaterialTable 
)

Definition at line 817 of file G4Material.cc.

818{
819 //Dump info for all known materials
820 flux << "\n***** Table : Nb of materials = " << MaterialTable.size()
821 << " *****\n" << G4endl;
822
823 for (size_t i=0; i<MaterialTable.size(); ++i) {
824 flux << MaterialTable[i] << G4endl << G4endl;
825 }
826
827 return flux;
828}
#define G4endl
Definition: G4ios.hh:57