Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4tgrMaterialMixture Class Reference

#include <G4tgrMaterialMixture.hh>

+ Inheritance diagram for G4tgrMaterialMixture:

Public Member Functions

 G4tgrMaterialMixture ()
 
 ~G4tgrMaterialMixture ()
 
 G4tgrMaterialMixture (const G4String &matType, const std::vector< G4String > &wl)
 
G4double GetA () const
 
G4double GetZ () const
 
const G4StringGetComponent (G4int i) const
 
G4double GetFraction (G4int i)
 
- Public Member Functions inherited from G4tgrMaterial
 G4tgrMaterial ()
 
virtual ~G4tgrMaterial ()
 
const G4StringGetName () const
 
G4double GetDensity () const
 
G4int GetNumberOfComponents () const
 
const G4StringGetType () const
 
virtual G4double GetA () const =0
 
virtual G4double GetZ () const =0
 
virtual const G4StringGetComponent (G4int i) const =0
 
virtual G4double GetFraction (G4int i)=0
 
G4double GetIonisationMeanExcitationEnergy () const
 
void SetIonisationMeanExcitationEnergy (G4double mee)
 
const G4StateGetState () const
 
void SetState (const G4String &val)
 
G4double GetTemperature () const
 
void SetTemperature (G4double val)
 
G4double GetPressure () const
 
void SetPressure (G4double val)
 

Protected Member Functions

void TransformToFractionsByWeight ()
 

Protected Attributes

std::vector< G4StringtheComponents
 
std::vector< G4doubletheFractions
 
- Protected Attributes inherited from G4tgrMaterial
G4String theName = "Material"
 
G4double theDensity = 0.0
 
G4int theNoComponents = 0
 
G4String theMateType = "Material"
 
G4double theIonisationMeanExcitationEnergy = -1.0
 
G4State theState = kStateUndefined
 
G4double theTemperature = 0.0
 
G4double thePressure = 0.0
 

Friends

std::ostream & operator<< (std::ostream &, const G4tgrMaterialMixture &)
 

Detailed Description

Definition at line 43 of file G4tgrMaterialMixture.hh.

Constructor & Destructor Documentation

◆ G4tgrMaterialMixture() [1/2]

G4tgrMaterialMixture::G4tgrMaterialMixture ( )

Definition at line 38 of file G4tgrMaterialMixture.cc.

39{
40}

◆ ~G4tgrMaterialMixture()

G4tgrMaterialMixture::~G4tgrMaterialMixture ( )

Definition at line 43 of file G4tgrMaterialMixture.cc.

44{
45}

◆ G4tgrMaterialMixture() [2/2]

G4tgrMaterialMixture::G4tgrMaterialMixture ( const G4String matType,
const std::vector< G4String > &  wl 
)

Definition at line 48 of file G4tgrMaterialMixture.cc.

50{
51 //---------- Check for miminum number of words read
53 "G4tgrMaterialMixture::G4tgrMaterialMixture");
54
55 theMateType = matType;
56
57 //---------- Fill private data
59 theDensity = std::fabs(G4tgrUtils::GetDouble(wl[2], g / cm3));
61
63 "G4tgrMaterialMixture::G4tgrMaterialMixture");
64 for(G4int ii = 0; ii < theNoComponents; ++ii)
65 {
66#ifdef G4VERBOSE
68 {
69 G4cout << " G4tgrMaterialMixture::G4tgrMaterialMixture() -"
70 << " adding component: " << wl[ii * 2 + 4]
71 << " Fraction= " << G4tgrUtils::GetDouble(wl[ii * 2 + 1 + 4])
72 << G4endl;
73 }
74#endif
75 theComponents.push_back(G4tgrUtils::GetString(wl[ii * 2 + 4]));
76 theFractions.push_back(G4tgrUtils::GetDouble(wl[ii * 2 + 1 + 4]));
77 }
78
79#ifdef G4VERBOSE
81 {
82 G4cout << " Created " << *this << G4endl;
83 }
84#endif
85}
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
@ WLSIZE_GE
Definition: G4tgrUtils.hh:51
std::vector< G4double > theFractions
std::vector< G4String > theComponents
G4double theDensity
G4String theMateType
G4String theName
G4int theNoComponents
static G4int GetVerboseLevel()
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:173
static void CheckWLsize(const std::vector< G4String > &wl, unsigned int nWCheck, WLSIZEtype st, const G4String &methodName)
Definition: G4tgrUtils.cc:490
static G4int GetInt(const G4String &str)
Definition: G4tgrUtils.cc:447
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:198

Member Function Documentation

◆ GetA()

G4double G4tgrMaterialMixture::GetA ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 58 of file G4tgrMaterialMixture.hh.

58{ return 0.; }

◆ GetComponent()

const G4String & G4tgrMaterialMixture::GetComponent ( G4int  i) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 60 of file G4tgrMaterialMixture.hh.

60{ return theComponents[i]; }

◆ GetFraction()

G4double G4tgrMaterialMixture::GetFraction ( G4int  i)
inlinevirtual

Implements G4tgrMaterial.

Definition at line 61 of file G4tgrMaterialMixture.hh.

61{ return theFractions[i]; }

◆ GetZ()

G4double G4tgrMaterialMixture::GetZ ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 59 of file G4tgrMaterialMixture.hh.

59{ return 0.; }

◆ TransformToFractionsByWeight()

void G4tgrMaterialMixture::TransformToFractionsByWeight ( )
inlineprotected

Definition at line 65 of file G4tgrMaterialMixture.hh.

65{}

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4tgrMaterialMixture mate 
)
friend

Definition at line 88 of file G4tgrMaterialMixture.cc.

89{
90 os << "G4tgrMaterialMixture=: " << mate.theName << G4endl
91 << "density= " << mate.theDensity / g * cm3
92 << " g/cm3. Number of Components: " << mate.theNoComponents << G4endl;
93 for(G4int ii = 0; ii < mate.theNoComponents; ii++)
94 {
95 os << '\t' << mate.theComponents[ii] << '\t' << mate.theFractions[ii]
96 << G4endl;
97 }
98 return os;
99}

Member Data Documentation

◆ theComponents

std::vector<G4String> G4tgrMaterialMixture::theComponents
protected

Definition at line 69 of file G4tgrMaterialMixture.hh.

Referenced by G4tgrMaterialMixture(), and GetComponent().

◆ theFractions

std::vector<G4double> G4tgrMaterialMixture::theFractions
protected

Definition at line 70 of file G4tgrMaterialMixture.hh.

Referenced by G4tgrMaterialMixture(), and GetFraction().


The documentation for this class was generated from the following files: