Geant4 10.7.0
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)
 
virtual ~G4ExtendedMaterial ()
 
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
 
virtual G4bool IsExtended () const
 
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)
 
void AddElement (G4Element *element, G4int nAtoms)
 
void AddElementByNumberOfAtoms (G4Element *elm, G4int nAtoms)
 
void AddElement (G4Element *element, G4double fraction)
 
void AddElementByMassFraction (G4Element *elm, G4double frac)
 
void AddMaterial (G4Material *material, G4double fraction)
 
virtual ~G4Material ()
 
const G4StringGetName () const
 
const G4StringGetChemicalFormula () const
 
G4double GetFreeElectronDensity () const
 
G4double GetDensity () const
 
G4State GetState () const
 
G4double GetTemperature () const
 
G4double GetPressure () const
 
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
 
void SetChemicalFormula (const G4String &chF)
 
void SetFreeElectronDensity (G4double)
 
void ComputeDensityEffectOnFly (G4bool)
 
G4double GetZ () const
 
G4double GetA () const
 
void SetMaterialPropertiesTable (G4MaterialPropertiesTable *anMPT)
 
G4MaterialPropertiesTableGetMaterialPropertiesTable () const
 
size_t GetIndex () const
 
 G4Material (__void__ &)
 
void SetName (const G4String &name)
 
virtual G4bool IsExtended () const
 

Additional Inherited Members

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

Detailed Description

Definition at line 62 of file G4ExtendedMaterial.hh.

Constructor & Destructor Documentation

◆ G4ExtendedMaterial() [1/4]

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

Definition at line 44 of file G4ExtendedMaterial.cc.

46 : G4Material(name,baseMaterial->GetDensity(),baseMaterial,
47 baseMaterial->GetState(),baseMaterial->GetTemperature(),
48 baseMaterial->GetPressure())
49{;}
G4double GetPressure() const
Definition: G4Material.hh:181
G4double GetDensity() const
Definition: G4Material.hh:178
G4State GetState() const
Definition: G4Material.hh:179
G4double GetTemperature() const
Definition: G4Material.hh:180

◆ 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 53 of file G4ExtendedMaterial.cc.

56 : G4Material(name,z,a,density,state,temp,pressure)
57{;}

◆ 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 64 of file G4ExtendedMaterial.cc.

67 : G4Material(name,density,nComponents,state,temp,pressure)
68{;}

◆ 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 74 of file G4ExtendedMaterial.cc.

77 : G4Material(name,density,bmat,state,temp,pressure)
78{;}

◆ ~G4ExtendedMaterial()

virtual G4ExtendedMaterial::~G4ExtendedMaterial ( )
inlinevirtual

Definition at line 104 of file G4ExtendedMaterial.hh.

104{};

Member Function Documentation

◆ begin()

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

Definition at line 125 of file G4ExtendedMaterial.hh.

125{ return fExtensionMap.begin(); }

◆ cbegin()

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

Definition at line 126 of file G4ExtendedMaterial.hh.

126{ return fExtensionMap.cbegin(); }

◆ cend()

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

Definition at line 128 of file G4ExtendedMaterial.hh.

128{ return fExtensionMap.cend(); }

◆ end()

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

Definition at line 127 of file G4ExtendedMaterial.hh.

127{ return fExtensionMap.end(); }

◆ GetNumberOfExtensions()

G4int G4ExtendedMaterial::GetNumberOfExtensions ( ) const
inline

Definition at line 120 of file G4ExtendedMaterial.hh.

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

◆ IsExtended()

G4bool G4ExtendedMaterial::IsExtended ( ) const
virtual

Reimplemented from G4Material.

Definition at line 120 of file G4ExtendedMaterial.cc.

121{ return true; }

◆ Print()

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

Definition at line 125 of file G4ExtendedMaterial.cc.

126{
127 flux << "\n Registered material extensions :\n";
128 auto iter = fExtensionMap.begin();
129 for(;iter!=fExtensionMap.end();iter++)
130 { flux << " " << iter->first << "\n"; }
131}

◆ RegisterExtension()

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

Definition at line 85 of file G4ExtendedMaterial.cc.

86{
87 auto iter = fExtensionMap.find(extension->GetName());
88 if(iter!=fExtensionMap.end())
89 {
91 msg << "G4ExtendedMaterial <"<<GetName()<<"> already has extension for "
92 << extension->GetName()
93 << ". Extension is replaced.";
94 G4Exception("G4ExtendedMaterial::RegisterExtension(...)","MatExt001",JustWarning,msg);
95 }
96 fExtensionMap.insert(std::make_pair(extension->GetName(),std::move(extension)));
97}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
const G4String & GetName() const
Definition: G4Material.hh:175

◆ RetrieveExtension()

G4VMaterialExtension * G4ExtendedMaterial::RetrieveExtension ( const G4String name)

Definition at line 103 of file G4ExtendedMaterial.cc.

104{
105 const auto iter = fExtensionMap.find(name);
106 if(iter!=fExtensionMap.end())
107 { return iter->second.get(); }
108 else
109 {
111 msg << "G4ExtendedMAterial <"<<GetName()<<"> cannot find extension for "
112 << name;
113 G4Exception("G4ExtendedMaterial::RetreiveExtension(...)","MatExt002",JustWarning,msg);
114 return nullptr;
115 }
116}
const char * name(G4int ptype)

Referenced by G4PenelopeRayleighModelMI::CrossSectionPerVolume().


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