Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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, G4MaterialTable MaterialTable)
 

Function Documentation

◆ operator<<() [1/3]

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

Definition at line 772 of file G4Material.cc.

773{
774 flux << &material;
775 return flux;
776}

◆ operator<<() [2/3]

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

Definition at line 727 of file G4Material.cc.

728{
729 std::ios::fmtflags mode = flux.flags();
730 flux.setf(std::ios::fixed,std::ios::floatfield);
731 G4long prec = flux.precision(3);
732
733 flux
734 << " Material: " << std::setw(8) << material->fName
735 << " " << material->fChemicalFormula << " "
736 << " density: " << std::setw(6) << std::setprecision(3)
737 << G4BestUnit(material->fDensity,"Volumic Mass")
738 << " RadL: " << std::setw(7) << std::setprecision(3)
739 << G4BestUnit(material->fRadlen,"Length")
740 << " Nucl.Int.Length: " << std::setw(7) << std::setprecision(3)
741 << G4BestUnit(material->fNuclInterLen,"Length")
742 << "\n" << std::setw(30)
743 << " Imean: " << std::setw(7) << std::setprecision(3)
744 << G4BestUnit(material->GetIonisation()->GetMeanExcitationEnergy(),"Energy")
745 << " temperature: " << std::setw(6) << std::setprecision(2)
746 << (material->fTemp)/CLHEP::kelvin << " K"
747 << " pressure: " << std::setw(6) << std::setprecision(2)
748 << (material->fPressure)/CLHEP::atmosphere << " atm" << "\n";
749
750 for (G4int i=0; i<material->fNumberOfElements; i++) {
751 flux
752 << "\n ---> " << (*(material->theElementVector))[i]
753 << "\n ElmMassFraction: "
754 << std::setw(6)<< std::setprecision(2)
755 << (material->fMassFractionVector[i])/perCent << " %"
756 << " ElmAbundance " << std::setw(6)<< std::setprecision(2)
757 << 100*(material->fVecNbOfAtomsPerVolume[i])
758 /(material->fTotNbOfAtomsPerVolume)
759 << " % \n";
760 }
761 flux.precision(prec);
762 flux.setf(mode,std::ios::floatfield);
763
764 if(material->IsExtended())
765 { static_cast<const G4ExtendedMaterial*>(material)->Print(flux); }
766
767 return flux;
768}
#define G4BestUnit(a, b)
long G4long
Definition: G4Types.hh:87
int G4int
Definition: G4Types.hh:85
G4double GetMeanExcitationEnergy() const
virtual G4bool IsExtended() const
Definition: G4Material.cc:795
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:224

◆ operator<<() [3/3]

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

Definition at line 780 of file G4Material.cc.

781{
782 //Dump info for all known materials
783 flux << "\n***** Table : Nb of materials = " << MaterialTable.size()
784 << " *****\n" << G4endl;
785
786 for (size_t i=0; i<MaterialTable.size(); ++i) {
787 flux << MaterialTable[i] << G4endl << G4endl;
788 }
789
790 return flux;
791}
#define G4endl
Definition: G4ios.hh:57