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

#include <G4tgrMaterialSimple.hh>

+ Inheritance diagram for G4tgrMaterialSimple:

Public Member Functions

 G4tgrMaterialSimple ()
 
 ~G4tgrMaterialSimple ()
 
 G4tgrMaterialSimple (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)
 

Friends

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

Additional Inherited Members

- 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
 

Detailed Description

Definition at line 44 of file G4tgrMaterialSimple.hh.

Constructor & Destructor Documentation

◆ G4tgrMaterialSimple() [1/2]

G4tgrMaterialSimple::G4tgrMaterialSimple ( )

Definition at line 39 of file G4tgrMaterialSimple.cc.

40{
41}

◆ ~G4tgrMaterialSimple()

G4tgrMaterialSimple::~G4tgrMaterialSimple ( )

Definition at line 44 of file G4tgrMaterialSimple.cc.

45{
46}

◆ G4tgrMaterialSimple() [2/2]

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

Definition at line 49 of file G4tgrMaterialSimple.cc.

51 : name("MaterialSimple")
52{
53 //---------- Check for miminum number of words read
55 "G4tgrMaterialSimple::G4tgrMaterialSimple");
56
57 theMateType = matType;
58
59 //---------- Fill private data
61 theZ = G4tgrUtils::GetDouble(wl[2]);
62 theA = G4tgrUtils::GetDouble(wl[3], g / mole);
63 theDensity = G4tgrUtils::GetDouble(wl[4], g / cm3);
65#ifdef G4VERBOSE
67 {
68 G4cout << " Created " << *this << G4endl;
69 }
70#endif
71}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
@ WLSIZE_EQ
Definition: G4tgrUtils.hh:47
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 G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:198

Member Function Documentation

◆ GetA()

G4double G4tgrMaterialSimple::GetA ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 57 of file G4tgrMaterialSimple.hh.

57{ return theA; }

Referenced by G4tgbMaterialSimple::G4tgbMaterialSimple().

◆ GetComponent()

const G4String & G4tgrMaterialSimple::GetComponent ( G4int  i) const
virtual

Implements G4tgrMaterial.

Definition at line 74 of file G4tgrMaterialSimple.cc.

75{
76 G4String ErrMessage = "Should never be called for a MaterialSimple - i:" +
78 G4Exception("G4tgrMaterialSimple::GetComponent()", "InvalidCall",
79 FatalException, ErrMessage);
80
81 return name; // dummy, to avoid compilation warnings...
82}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:430

◆ GetFraction()

G4double G4tgrMaterialSimple::GetFraction ( G4int  i)
virtual

Implements G4tgrMaterial.

Definition at line 85 of file G4tgrMaterialSimple.cc.

86{
87 G4String ErrMessage = "Should never be called for a MaterialSimple - i:" +
89 G4Exception("G4tgrMaterialSimple::GetFraction()", "InvalidCall",
90 FatalException, ErrMessage);
91
92 return 0.; // dummy, to avoid compilation warnings...
93}

◆ GetZ()

G4double G4tgrMaterialSimple::GetZ ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 58 of file G4tgrMaterialSimple.hh.

58{ return theZ; }

Referenced by G4tgbMaterialSimple::G4tgbMaterialSimple().

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 96 of file G4tgrMaterialSimple.cc.

97{
98 os << "G4tgrMaterialSimple= " << mate.theName << " Z " << mate.theZ << " A "
99 << mate.theA << "density= " << mate.theDensity / g * cm3
100 << " g/cm3. Number of Components: " << mate.theNoComponents << G4endl;
101 return os;
102}

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