Geant4 9.6.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 (const G4String &matType, const std::vector< G4String > &wl)
 
G4tgrMaterialSimpleoperator= (const G4tgrMaterialSimple &)
 
G4double GetA () const
 
G4double GetZ () const
 
const G4StringGetComponent (G4int i) const
 
G4double GetFraction (G4int i)
 
 G4tgrMaterialSimple ()
 
 ~G4tgrMaterialSimple ()
 
- 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)
 

Friends

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

Additional Inherited Members

- Protected Attributes inherited from G4tgrMaterial
G4String theName
 
G4double theDensity
 
G4int theNoComponents
 
G4String theMateType
 
G4double theIonisationMeanExcitationEnergy
 
G4State theState
 
G4double theTemperature
 
G4double thePressure
 

Detailed Description

Definition at line 50 of file G4tgrMaterialSimple.hh.

Constructor & Destructor Documentation

◆ G4tgrMaterialSimple() [1/2]

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

Definition at line 57 of file G4tgrMaterialSimple.cc.

59 : name("MaterialSimple")
60{
61 //---------- Check for miminum number of words read
63 "G4tgrMaterialSimple::G4tgrMaterialSimple");
64
65 theMateType = matType;
66
67 //---------- Fill private data
69 theZ = G4tgrUtils::GetDouble( wl[2] );
70 theA = G4tgrUtils::GetDouble( wl[3], g/mole);
71 theDensity = G4tgrUtils::GetDouble( wl[4], g/cm3);
73#ifdef G4VERBOSE
75 {
76 G4cout << " Created " << *this << G4endl;
77 }
78#endif
79}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
@ WLSIZE_EQ
Definition: G4tgrUtils.hh:52
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 G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:203

◆ G4tgrMaterialSimple() [2/2]

G4tgrMaterialSimple::G4tgrMaterialSimple ( )

Definition at line 44 of file G4tgrMaterialSimple.cc.

45 : name("MaterialSimple"), theA(0.), theZ(0.)
46{
47}

◆ ~G4tgrMaterialSimple()

G4tgrMaterialSimple::~G4tgrMaterialSimple ( )

Definition at line 51 of file G4tgrMaterialSimple.cc.

52{
53}

Member Function Documentation

◆ GetA()

G4double G4tgrMaterialSimple::GetA ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 62 of file G4tgrMaterialSimple.hh.

62{ return theA; }

Referenced by G4tgbMaterialSimple::G4tgbMaterialSimple().

◆ GetComponent()

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

Implements G4tgrMaterial.

Definition at line 83 of file G4tgrMaterialSimple.cc.

84{
85 G4String ErrMessage = "Should never be called for a MaterialSimple - i:"
87 G4Exception("G4tgrMaterialSimple::GetComponent()",
88 "InvalidCall", FatalException, ErrMessage);
89
90 return name; // dummy, to avoid compilation warnings...
91}
@ FatalException
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:349
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ GetFraction()

G4double G4tgrMaterialSimple::GetFraction ( G4int  i)
virtual

Implements G4tgrMaterial.

Definition at line 95 of file G4tgrMaterialSimple.cc.

96{
97 G4String ErrMessage = "Should never be called for a MaterialSimple - i:"
99 G4Exception("G4tgrMaterialSimple::GetFraction()",
100 "InvalidCall", FatalException, ErrMessage);
101
102 return 0.; // dummy, to avoid compilation warnings...
103}

◆ GetZ()

G4double G4tgrMaterialSimple::GetZ ( ) const
inlinevirtual

Implements G4tgrMaterial.

Definition at line 63 of file G4tgrMaterialSimple.hh.

63{ return theZ; }

Referenced by G4tgbMaterialSimple::G4tgbMaterialSimple().

◆ operator=()

G4tgrMaterialSimple & G4tgrMaterialSimple::operator= ( const G4tgrMaterialSimple )

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 107 of file G4tgrMaterialSimple.cc.

108{
109 os << "G4tgrMaterialSimple= " << mate.theName
110 << " Z " << mate.theZ << " A " << mate.theA
111 << "density= " << mate.theDensity/g*cm3
112 << " g/cm3. Number of Components: " << mate.theNoComponents << G4endl;
113 return os;
114}

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