Geant4-11
Public Member Functions | Protected Attributes | Private Attributes | Friends
G4tgrMaterialSimple Class Reference

#include <G4tgrMaterialSimple.hh>

Inheritance diagram for G4tgrMaterialSimple:
G4tgrMaterial

Public Member Functions

 G4tgrMaterialSimple ()
 
 G4tgrMaterialSimple (const G4String &matType, const std::vector< G4String > &wl)
 
G4double GetA () const
 
const G4StringGetComponent (G4int i) const
 
G4double GetDensity () const
 
G4double GetFraction (G4int i)
 
G4double GetIonisationMeanExcitationEnergy () const
 
const G4StringGetName () const
 
G4int GetNumberOfComponents () const
 
G4double GetPressure () const
 
const G4StateGetState () const
 
G4double GetTemperature () const
 
const G4StringGetType () const
 
G4double GetZ () const
 
void SetIonisationMeanExcitationEnergy (G4double mee)
 
void SetPressure (G4double val)
 
void SetState (const G4String &val)
 
void SetTemperature (G4double val)
 
 ~G4tgrMaterialSimple ()
 

Protected Attributes

G4double theDensity = 0.0
 
G4double theIonisationMeanExcitationEnergy = -1.0
 
G4String theMateType = "Material"
 
G4String theName = "Material"
 
G4int theNoComponents = 0
 
G4double thePressure = 0.0
 
G4State theState = kStateUndefined
 
G4double theTemperature = 0.0
 

Private Attributes

G4String name = "MaterialSimple"
 
G4double theA = 0.0
 
G4double theZ = 0.0
 

Friends

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

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
62 theA = G4tgrUtils::GetDouble(wl[3], g / mole);
65#ifdef G4VERBOSE
67 {
68 G4cout << " Created " << *this << G4endl;
69 }
70#endif
71}
static constexpr double mole
Definition: G4SIunits.hh:279
static constexpr double cm3
Definition: G4SIunits.hh:101
static constexpr double g
Definition: G4SIunits.hh:168
#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

References G4tgrUtils::CheckWLsize(), cm3, g, G4cout, G4endl, G4tgrUtils::GetDouble(), G4tgrUtils::GetString(), G4tgrMessenger::GetVerboseLevel(), mole, theA, G4tgrMaterial::theDensity, G4tgrMaterial::theMateType, G4tgrMaterial::theName, G4tgrMaterial::theNoComponents, theZ, and WLSIZE_EQ.

Member Function Documentation

◆ GetA()

G4double G4tgrMaterialSimple::GetA ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 57 of file G4tgrMaterialSimple.hh.

57{ return theA; }

References 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:445

References G4UIcommand::ConvertToString(), FatalException, G4Exception(), and name.

◆ GetDensity()

G4double G4tgrMaterial::GetDensity ( ) const
inlineinherited

◆ 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}

References G4UIcommand::ConvertToString(), FatalException, and G4Exception().

◆ GetIonisationMeanExcitationEnergy()

G4double G4tgrMaterial::GetIonisationMeanExcitationEnergy ( ) const
inlineinherited

◆ GetName()

const G4String & G4tgrMaterial::GetName ( ) const
inlineinherited

◆ GetNumberOfComponents()

G4int G4tgrMaterial::GetNumberOfComponents ( ) const
inlineinherited

◆ GetPressure()

G4double G4tgrMaterial::GetPressure ( ) const
inlineinherited

◆ GetState()

const G4State & G4tgrMaterial::GetState ( ) const
inlineinherited

◆ GetTemperature()

G4double G4tgrMaterial::GetTemperature ( ) const
inlineinherited

◆ GetType()

const G4String & G4tgrMaterial::GetType ( ) const
inlineinherited

◆ GetZ()

G4double G4tgrMaterialSimple::GetZ ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 58 of file G4tgrMaterialSimple.hh.

58{ return theZ; }

References theZ.

Referenced by G4tgbMaterialSimple::G4tgbMaterialSimple().

◆ SetIonisationMeanExcitationEnergy()

void G4tgrMaterial::SetIonisationMeanExcitationEnergy ( G4double  mee)
inlineinherited

◆ SetPressure()

void G4tgrMaterial::SetPressure ( G4double  val)
inlineinherited

Definition at line 79 of file G4tgrMaterial.hh.

79{ thePressure = val; }

References G4tgrMaterial::thePressure.

Referenced by G4tgrLineProcessor::ProcessLine().

◆ SetState()

void G4tgrMaterial::SetState ( const G4String val)
inherited

Definition at line 47 of file G4tgrMaterial.cc.

48{
49 if(val == "Undefined")
50 {
52 }
53 else if(val == "Solid")
54 {
56 }
57 else if(val == "Liquid")
58 {
60 }
61 else if(val == "Gas")
62 {
64 }
65 else
66 {
67 G4Exception("G4tgrMaterial::SetState", "Wrong state", FatalErrorInArgument,
68 "Only possible states are Undefined/Solid/Liquid/Gas!");
69 }
70}
@ FatalErrorInArgument
@ kStateSolid
Definition: G4Material.hh:111
@ kStateLiquid
Definition: G4Material.hh:111
@ kStateGas
Definition: G4Material.hh:111
@ kStateUndefined
Definition: G4Material.hh:111

References FatalErrorInArgument, G4Exception(), kStateGas, kStateLiquid, kStateSolid, kStateUndefined, and G4tgrMaterial::theState.

Referenced by G4tgrLineProcessor::ProcessLine().

◆ SetTemperature()

void G4tgrMaterial::SetTemperature ( G4double  val)
inlineinherited

Definition at line 76 of file G4tgrMaterial.hh.

76{ theTemperature = val; }

References G4tgrMaterial::theTemperature.

Referenced by G4tgrLineProcessor::ProcessLine().

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}

Field Documentation

◆ name

G4String G4tgrMaterialSimple::name = "MaterialSimple"
private

◆ theA

G4double G4tgrMaterialSimple::theA = 0.0
private

Definition at line 66 of file G4tgrMaterialSimple.hh.

Referenced by G4tgrMaterialSimple(), and GetA().

◆ theDensity

G4double G4tgrMaterial::theDensity = 0.0
protectedinherited

◆ theIonisationMeanExcitationEnergy

G4double G4tgrMaterial::theIonisationMeanExcitationEnergy = -1.0
protectedinherited

◆ theMateType

G4String G4tgrMaterial::theMateType = "Material"
protectedinherited

◆ theName

G4String G4tgrMaterial::theName = "Material"
protectedinherited

◆ theNoComponents

G4int G4tgrMaterial::theNoComponents = 0
protectedinherited

◆ thePressure

G4double G4tgrMaterial::thePressure = 0.0
protectedinherited

Definition at line 90 of file G4tgrMaterial.hh.

Referenced by G4tgrMaterial::GetPressure(), and G4tgrMaterial::SetPressure().

◆ theState

G4State G4tgrMaterial::theState = kStateUndefined
protectedinherited

Definition at line 88 of file G4tgrMaterial.hh.

Referenced by G4tgrMaterial::GetState(), and G4tgrMaterial::SetState().

◆ theTemperature

G4double G4tgrMaterial::theTemperature = 0.0
protectedinherited

◆ theZ

G4double G4tgrMaterialSimple::theZ = 0.0
private

Definition at line 67 of file G4tgrMaterialSimple.hh.

Referenced by G4tgrMaterialSimple(), and GetZ().


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