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

#include <G4ExtendedMaterial.hh>

+ Inheritance diagram for G4ExtendedMaterial:

Public Member Functions

 G4ExtendedMaterial (const G4String &name, const G4Material *baseMaterial)
 
 G4ExtendedMaterial (const G4String &name, G4double z, G4double a, G4double density, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
 
 G4ExtendedMaterial (const G4String &name, G4double density, G4int nComponents, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
 
 G4ExtendedMaterial (const G4String &name, G4double density, const G4ExtendedMaterial *baseMaterial, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
 
 ~G4ExtendedMaterial () override=default
 
void RegisterExtension (std::unique_ptr< G4VMaterialExtension > extension)
 
G4VMaterialExtensionRetrieveExtension (const G4String &name)
 
G4int GetNumberOfExtensions () const
 
G4MaterialExtensionMap::const_iterator begin () const
 
G4MaterialExtensionMap::const_iterator cbegin () const
 
G4MaterialExtensionMap::const_iterator end () const
 
G4MaterialExtensionMap::const_iterator cend () const
 
G4bool IsExtended () const override
 
void Print (std::ostream &flux) const
 
- Public Member Functions inherited from G4Material
 G4Material (const G4String &name, G4double z, G4double a, G4double density, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
 
 G4Material (const G4String &name, G4double density, G4int nComponents, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
 
 G4Material (const G4String &name, G4double density, const G4Material *baseMaterial, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
 
virtual ~G4Material ()
 
void SetChemicalFormula (const G4String &chF)
 
void SetFreeElectronDensity (G4double val)
 
void ComputeDensityEffectOnFly (G4bool val)
 
 G4Material (const G4Material &)=delete
 
const G4Materialoperator= (const G4Material &)=delete
 
void AddElementByNumberOfAtoms (const G4Element *elm, G4int nAtoms)
 
void AddElement (G4Element *elm, G4int nAtoms)
 
void AddElementByMassFraction (const G4Element *elm, G4double fraction)
 
void AddElement (G4Element *elm, G4double frac)
 
void AddMaterial (G4Material *material, G4double fraction)
 
const G4StringGetName () const
 
const G4StringGetChemicalFormula () const
 
G4double GetFreeElectronDensity () const
 
G4double GetDensity () const
 
G4State GetState () const
 
G4double GetTemperature () const
 
G4double GetPressure () const
 
std::size_t GetNumberOfElements () const
 
const G4ElementVectorGetElementVector () const
 
const G4doubleGetFractionVector () const
 
const G4intGetAtomsVector () const
 
const G4ElementGetElement (G4int iel) const
 
const G4doubleGetVecNbOfAtomsPerVolume () const
 
G4double GetTotNbOfAtomsPerVolume () const
 
G4double GetTotNbOfElectPerVolume () const
 
const G4doubleGetAtomicNumDensityVector () const
 
G4double GetElectronDensity () const
 
G4double GetRadlen () const
 
G4double GetNuclearInterLength () const
 
G4IonisParamMatGetIonisation () const
 
G4SandiaTableGetSandiaTable () const
 
const G4MaterialGetBaseMaterial () const
 
const std::map< G4Material *, G4double > & GetMatComponents () const
 
G4double GetMassOfMolecule () const
 
G4double GetZ () const
 
G4double GetA () const
 
void SetMaterialPropertiesTable (G4MaterialPropertiesTable *anMPT)
 
G4MaterialPropertiesTableGetMaterialPropertiesTable () const
 
std::size_t GetIndex () const
 
void SetName (const G4String &name)
 
G4bool operator== (const G4Material &) const =delete
 
G4bool operator!= (const G4Material &) const =delete
 

Additional Inherited Members

- Static Public Member Functions inherited from G4Material
static G4MaterialTableGetMaterialTable ()
 
static std::size_t GetNumberOfMaterials ()
 
static G4MaterialGetMaterial (const G4String &name, G4bool warning=true)
 
static G4MaterialGetMaterial (G4double z, G4double a, G4double dens)
 
static G4MaterialGetMaterial (std::size_t nComp, G4double dens)
 

Detailed Description

Definition at line 53 of file G4ExtendedMaterial.hh.

Constructor & Destructor Documentation

◆ G4ExtendedMaterial() [1/4]

G4ExtendedMaterial::G4ExtendedMaterial ( const G4String & name,
const G4Material * baseMaterial )

Definition at line 38 of file G4ExtendedMaterial.cc.

39 : G4Material(name, baseMaterial->GetDensity(), baseMaterial, baseMaterial->GetState(),
40 baseMaterial->GetTemperature(), baseMaterial->GetPressure())
41{}
G4double GetPressure() const
G4double GetDensity() const
G4State GetState() const
G4double GetTemperature() const
G4Material(const G4String &name, G4double z, G4double a, G4double density, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
Definition G4Material.cc:88

◆ G4ExtendedMaterial() [2/4]

G4ExtendedMaterial::G4ExtendedMaterial ( const G4String & name,
G4double z,
G4double a,
G4double density,
G4State state = kStateUndefined,
G4double temp = NTP_Temperature,
G4double pressure = CLHEP::STP_Pressure )

Definition at line 45 of file G4ExtendedMaterial.cc.

47 : G4Material(name, z, a, density, state, temp, pressure)
48{}

◆ G4ExtendedMaterial() [3/4]

G4ExtendedMaterial::G4ExtendedMaterial ( const G4String & name,
G4double density,
G4int nComponents,
G4State state = kStateUndefined,
G4double temp = NTP_Temperature,
G4double pressure = CLHEP::STP_Pressure )

Definition at line 53 of file G4ExtendedMaterial.cc.

55 : G4Material(name, density, nComponents, state, temp, pressure)
56{}

◆ G4ExtendedMaterial() [4/4]

G4ExtendedMaterial::G4ExtendedMaterial ( const G4String & name,
G4double density,
const G4ExtendedMaterial * baseMaterial,
G4State state = kStateUndefined,
G4double temp = NTP_Temperature,
G4double pressure = CLHEP::STP_Pressure )

Definition at line 60 of file G4ExtendedMaterial.cc.

62 : G4Material(name, density, bmat, state, temp, pressure)
63{}

◆ ~G4ExtendedMaterial()

G4ExtendedMaterial::~G4ExtendedMaterial ( )
overridedefault

Member Function Documentation

◆ begin()

G4MaterialExtensionMap::const_iterator G4ExtendedMaterial::begin ( ) const
inline

Definition at line 102 of file G4ExtendedMaterial.hh.

102{ return fExtensionMap.begin(); }

◆ cbegin()

G4MaterialExtensionMap::const_iterator G4ExtendedMaterial::cbegin ( ) const
inline

Definition at line 103 of file G4ExtendedMaterial.hh.

103{ return fExtensionMap.cbegin(); }

◆ cend()

G4MaterialExtensionMap::const_iterator G4ExtendedMaterial::cend ( ) const
inline

Definition at line 105 of file G4ExtendedMaterial.hh.

105{ return fExtensionMap.cend(); }

◆ end()

G4MaterialExtensionMap::const_iterator G4ExtendedMaterial::end ( ) const
inline

Definition at line 104 of file G4ExtendedMaterial.hh.

104{ return fExtensionMap.end(); }

◆ GetNumberOfExtensions()

G4int G4ExtendedMaterial::GetNumberOfExtensions ( ) const
inline

Definition at line 98 of file G4ExtendedMaterial.hh.

98{ return G4int(fExtensionMap.size()); }
int G4int
Definition G4Types.hh:85

◆ IsExtended()

G4bool G4ExtendedMaterial::IsExtended ( ) const
overridevirtual

Reimplemented from G4Material.

Definition at line 94 of file G4ExtendedMaterial.cc.

94{ return true; }

◆ Print()

void G4ExtendedMaterial::Print ( std::ostream & flux) const

Definition at line 96 of file G4ExtendedMaterial.cc.

97{
98 flux << "\n Registered material extensions :\n";
99 auto iter = fExtensionMap.begin();
100 for (; iter != fExtensionMap.end(); iter++) {
101 flux << " " << iter->first << "\n";
102 }
103}

◆ RegisterExtension()

void G4ExtendedMaterial::RegisterExtension ( std::unique_ptr< G4VMaterialExtension > extension)

Definition at line 67 of file G4ExtendedMaterial.cc.

68{
69 auto iter = fExtensionMap.find(extension->GetName());
70 if (iter != fExtensionMap.end()) {
72 msg << "G4ExtendedMaterial <" << GetName() << "> already has extension for "
73 << extension->GetName() << ". Extension is replaced.";
74 G4Exception("G4ExtendedMaterial::RegisterExtension(...)", "MatExt001", JustWarning, msg);
75 }
76 fExtensionMap.insert(std::make_pair(extension->GetName(), std::move(extension)));
77}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
const G4String & GetName() const

◆ RetrieveExtension()

G4VMaterialExtension * G4ExtendedMaterial::RetrieveExtension ( const G4String & name)

Definition at line 81 of file G4ExtendedMaterial.cc.

82{
83 const auto iter = fExtensionMap.find(name);
84 if (iter != fExtensionMap.end()) {
85 return iter->second.get();
86 }
87
89 msg << "G4ExtendedMAterial <" << GetName() << "> cannot find extension for " << name;
90 G4Exception("G4ExtendedMaterial::RetreiveExtension(...)", "MatExt002", JustWarning, msg);
91 return nullptr;
92}
const char * name(G4int ptype)

Referenced by G4PenelopeRayleighModelMI::CrossSectionPerVolume(), and G4LogicalCrystalVolume::GetCrystal().


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