Geant4 9.6.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 (const G4String &matType, const std::vector< G4String > &wl)
 
G4double GetA () const
 
G4double GetZ () const
 
const G4StringGetComponent (G4int i) const
 
G4double GetFraction (G4int i)
 
G4tgrMaterialMixture operator= (const G4tgrMaterialMixture &)
 
 G4tgrMaterialMixture ()
 
 ~G4tgrMaterialMixture ()
 
- 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)
 
G4State GetState () const
 
void SetState (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
 
G4double theDensity
 
G4int theNoComponents
 
G4String theMateType
 
G4double theIonisationMeanExcitationEnergy
 
G4State theState
 
G4double theTemperature
 
G4double thePressure
 

Friends

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

Detailed Description

Definition at line 50 of file G4tgrMaterialMixture.hh.

Constructor & Destructor Documentation

◆ G4tgrMaterialMixture() [1/2]

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

Definition at line 55 of file G4tgrMaterialMixture.cc.

57{
58 //---------- Check for miminum number of words read
60 "G4tgrMaterialMixture::G4tgrMaterialMixture" );
61
62 theMateType = matType;
63
64 //---------- Fill private data
66 theDensity = std::fabs(G4tgrUtils::GetDouble( wl[2], g/cm3 ) );
68
70 "G4tgrMaterialMixture::G4tgrMaterialMixture" );
71 for(G4int ii=0; ii<theNoComponents; ii++)
72 {
73#ifdef G4VERBOSE
75 {
76 G4cout << " G4tgrMaterialMixture::G4tgrMaterialMixture() -"
77 << " adding component: " << wl[ii*2+4] << " Fraction= "
78 << G4tgrUtils::GetDouble(wl[ii*2+1+4]) << G4endl;
79 }
80#endif
81 theComponents.push_back( G4tgrUtils::GetString( wl[ii*2+4] ) );
82 theFractions.push_back( G4tgrUtils::GetDouble(wl[ii*2+1+4]) );
83 }
84
85#ifdef G4VERBOSE
87 {
88 G4cout << " Created " << *this << G4endl;
89 }
90#endif
91}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
@ WLSIZE_GE
Definition: G4tgrUtils.hh:52
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:178
static void CheckWLsize(const std::vector< G4String > &wl, unsigned int nWCheck, WLSIZEtype st, const G4String &methodName)
Definition: G4tgrUtils.cc:472
static G4int GetInt(const G4String &str)
Definition: G4tgrUtils.cc:427
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:203

◆ G4tgrMaterialMixture() [2/2]

G4tgrMaterialMixture::G4tgrMaterialMixture ( )

Definition at line 43 of file G4tgrMaterialMixture.cc.

44{
45}

◆ ~G4tgrMaterialMixture()

G4tgrMaterialMixture::~G4tgrMaterialMixture ( )

Definition at line 49 of file G4tgrMaterialMixture.cc.

50{
51}

Member Function Documentation

◆ GetA()

G4double G4tgrMaterialMixture::GetA ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 62 of file G4tgrMaterialMixture.hh.

62{ return 0.; }

◆ GetComponent()

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

Implements G4tgrMaterial.

Definition at line 64 of file G4tgrMaterialMixture.hh.

64{ return theComponents[i]; }

◆ GetFraction()

G4double G4tgrMaterialMixture::GetFraction ( G4int  i)
inlinevirtual

Implements G4tgrMaterial.

Definition at line 65 of file G4tgrMaterialMixture.hh.

65{ return theFractions[i]; }

◆ GetZ()

G4double G4tgrMaterialMixture::GetZ ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 63 of file G4tgrMaterialMixture.hh.

63{ return 0.; }

◆ operator=()

G4tgrMaterialMixture G4tgrMaterialMixture::operator= ( const G4tgrMaterialMixture )

◆ TransformToFractionsByWeight()

void G4tgrMaterialMixture::TransformToFractionsByWeight ( )
inlineprotected

Definition at line 76 of file G4tgrMaterialMixture.hh.

76{};

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 95 of file G4tgrMaterialMixture.cc.

96{
97 os << "G4tgrMaterialMixture=: " << mate.theName << G4endl
98 << "density= " << mate.theDensity/g*cm3
99 << " g/cm3. Number of Components: " << mate.theNoComponents << G4endl;
100 for (G4int ii=0; ii<mate.theNoComponents; ii++)
101 {
102 os << '\t' << mate.theComponents[ii]
103 << '\t' << mate.theFractions[ii] << G4endl;
104 }
105 return os;
106}

Member Data Documentation

◆ theComponents

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

Definition at line 80 of file G4tgrMaterialMixture.hh.

Referenced by G4tgrMaterialMixture(), and GetComponent().

◆ theFractions

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

Definition at line 81 of file G4tgrMaterialMixture.hh.

Referenced by G4tgrMaterialMixture(), and GetFraction().


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