Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
G4tgrMaterialMixture Class Reference

#include <G4tgrMaterialMixture.hh>

Inheritance diagram for G4tgrMaterialMixture:
G4tgrMaterial

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
 
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::G4tgrMaterialMixture ( const G4String matType,
const std::vector< G4String > &  wl 
)

Definition at line 55 of file G4tgrMaterialMixture.cc.

References G4tgrUtils::CheckWLsize(), python.hepunit::cm3, g(), G4cout, G4endl, G4tgrUtils::GetDouble(), G4tgrUtils::GetInt(), G4tgrUtils::GetString(), G4tgrMessenger::GetVerboseLevel(), theComponents, G4tgrMaterial::theDensity, theFractions, G4tgrMaterial::theMateType, G4tgrMaterial::theName, G4tgrMaterial::theNoComponents, and WLSIZE_GE.

57 {
58  //---------- Check for miminum number of words read
60  "G4tgrMaterialMixture::G4tgrMaterialMixture" );
61 
62  theMateType = matType;
63 
64  //---------- Fill private data
65  theName = G4tgrUtils::GetString( wl[1] );
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 }
static void CheckWLsize(const std::vector< G4String > &wl, unsigned int nWCheck, WLSIZEtype st, const G4String &methodName)
Definition: G4tgrUtils.cc:475
int G4int
Definition: G4Types.hh:78
G4double theDensity
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
G4String theName
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
G4int theNoComponents
static G4int GetInt(const G4String &str)
Definition: G4tgrUtils.cc:430
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:205
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:180
#define G4endl
Definition: G4ios.hh:61
G4String theMateType
std::vector< G4double > theFractions
std::vector< G4String > theComponents
G4tgrMaterialMixture::G4tgrMaterialMixture ( )

Definition at line 43 of file G4tgrMaterialMixture.cc.

44 {
45 }
G4tgrMaterialMixture::~G4tgrMaterialMixture ( )

Definition at line 49 of file G4tgrMaterialMixture.cc.

50 {
51 }

Member Function Documentation

G4double G4tgrMaterialMixture::GetA ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 62 of file G4tgrMaterialMixture.hh.

62 { return 0.; }
const G4String& G4tgrMaterialMixture::GetComponent ( G4int  i) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 64 of file G4tgrMaterialMixture.hh.

References theComponents.

64 { return theComponents[i]; }
std::vector< G4String > theComponents
G4double G4tgrMaterialMixture::GetFraction ( G4int  i)
inlinevirtual

Implements G4tgrMaterial.

Definition at line 65 of file G4tgrMaterialMixture.hh.

References theFractions.

65 { return theFractions[i]; }
std::vector< G4double > theFractions
G4double G4tgrMaterialMixture::GetZ ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 63 of file G4tgrMaterialMixture.hh.

63 { return 0.; }
G4tgrMaterialMixture G4tgrMaterialMixture::operator= ( const G4tgrMaterialMixture )
void G4tgrMaterialMixture::TransformToFractionsByWeight ( )
inlineprotected

Definition at line 76 of file G4tgrMaterialMixture.hh.

76 {};

Friends And Related Function Documentation

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 }
int G4int
Definition: G4Types.hh:78
G4double theDensity
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
G4String theName
G4int theNoComponents
#define G4endl
Definition: G4ios.hh:61
std::vector< G4double > theFractions
std::vector< G4String > theComponents

Field Documentation

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

Definition at line 76 of file G4tgrMaterialMixture.hh.

Referenced by G4tgrMaterialMixture(), GetComponent(), and operator<<().

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

Definition at line 81 of file G4tgrMaterialMixture.hh.

Referenced by G4tgrMaterialMixture(), GetFraction(), and operator<<().


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