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

#include <G4MicroElecMaterialStructure.hh>

Public Member Functions

 G4MicroElecMaterialStructure (const G4String &matName="")
 
virtual ~G4MicroElecMaterialStructure ()
 
void ReadMaterialFile ()
 
G4double Energy (G4int level)
 
G4int NumberOfLevels ()
 
G4double GetZ (G4int Shell)
 
G4double ConvertUnit (const G4String &unitName)
 
G4double GetEnergyGap ()
 
G4double GetInitialEnergy ()
 
G4int GetEADL_Enumerator (G4int shell)
 
G4double GetWorkFunction ()
 
G4String GetMaterialName ()
 
G4double GetLimitEnergy (G4int level)
 
G4double GetElasticModelLowLimit ()
 
G4double GetElasticModelHighLimit ()
 
G4double GetInelasticModelLowLimit (G4int pdg)
 
G4double GetInelasticModelHighLimit (G4int pdg)
 
G4bool IsShellWeaklyBound (G4int level)
 

Detailed Description

Definition at line 83 of file G4MicroElecMaterialStructure.hh.

Constructor & Destructor Documentation

◆ G4MicroElecMaterialStructure()

G4MicroElecMaterialStructure::G4MicroElecMaterialStructure ( const G4String matName = "")

Definition at line 81 of file G4MicroElecMaterialStructure.cc.

82{
83 materialName = matName;
84 if (matName == "Vacuum" || matName == "uum") {
85 workFunction = 0;
86 initialEnergy = 0;
87 }
88 else {
90 }
91 nLevels = energyConstant.size();
92}

◆ ~G4MicroElecMaterialStructure()

G4MicroElecMaterialStructure::~G4MicroElecMaterialStructure ( )
virtual

Definition at line 96 of file G4MicroElecMaterialStructure.cc.

97{}

Member Function Documentation

◆ ConvertUnit()

G4double G4MicroElecMaterialStructure::ConvertUnit ( const G4String unitName)

Definition at line 200 of file G4MicroElecMaterialStructure.cc.

201{
202 G4double unitValue = 0;
203 if (unitName == "meV") unitValue = 1e-3*CLHEP::eV;
204 else if (unitName == "eV") unitValue = CLHEP::eV;
205 else if (unitName == "keV") unitValue = CLHEP::keV;
206 else if (unitName == "MeV") unitValue = CLHEP::MeV;
207 else if (unitName == "noUnit") unitValue = 1;
208
209 return unitValue;
210}
double G4double
Definition: G4Types.hh:83

Referenced by ReadMaterialFile().

◆ Energy()

G4double G4MicroElecMaterialStructure::Energy ( G4int  level)

Definition at line 182 of file G4MicroElecMaterialStructure.cc.

183{
184 return (level >= 0 && level < nLevels) ? energyConstant[level] : 0.0;
185}

Referenced by G4MicroElecInelasticModel_new::CrossSectionPerVolume(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetEADL_Enumerator()

G4int G4MicroElecMaterialStructure::GetEADL_Enumerator ( G4int  shell)
inline

Definition at line 96 of file G4MicroElecMaterialStructure.hh.

96{ return EADL_Enumerator[shell]; };

Referenced by G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetElasticModelHighLimit()

G4double G4MicroElecMaterialStructure::GetElasticModelHighLimit ( )
inline

Definition at line 101 of file G4MicroElecMaterialStructure.hh.

101{ return limitElastic[1]; }

Referenced by G4MicroElecElasticModel_new::Initialise().

◆ GetElasticModelLowLimit()

G4double G4MicroElecMaterialStructure::GetElasticModelLowLimit ( )
inline

Definition at line 100 of file G4MicroElecMaterialStructure.hh.

100{return limitElastic[0];}

Referenced by G4MicroElecElasticModel_new::Initialise().

◆ GetEnergyGap()

G4double G4MicroElecMaterialStructure::GetEnergyGap ( )
inline

Definition at line 94 of file G4MicroElecMaterialStructure.hh.

94{ return energyGap; }

◆ GetInelasticModelHighLimit()

G4double G4MicroElecMaterialStructure::GetInelasticModelHighLimit ( G4int  pdg)

Definition at line 233 of file G4MicroElecMaterialStructure.cc.

234{
235 G4double res = 0.0;
236 if (pdg == 11) res = limitInelastic[1];
237 else if (pdg == 2212) res = limitInelastic[3];
238 return res;
239}

Referenced by G4MicroElecInelasticModel_new::CrossSectionPerVolume(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetInelasticModelLowLimit()

G4double G4MicroElecMaterialStructure::GetInelasticModelLowLimit ( G4int  pdg)

Definition at line 223 of file G4MicroElecMaterialStructure.cc.

224{
225 G4double res = 0.0;
226 if (pdg == 11) res = limitInelastic[0];
227 else if (pdg == 2212) res = limitInelastic[2];
228 return res;
229}

Referenced by G4MicroElecInelasticModel_new::CrossSectionPerVolume(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetInitialEnergy()

G4double G4MicroElecMaterialStructure::GetInitialEnergy ( )
inline

Definition at line 95 of file G4MicroElecMaterialStructure.hh.

95{ return initialEnergy; }

◆ GetLimitEnergy()

G4double G4MicroElecMaterialStructure::GetLimitEnergy ( G4int  level)

Definition at line 214 of file G4MicroElecMaterialStructure.cc.

215{
216 G4double E = LimitEnergy[level];
217 if (IsShellWeaklyBound(level)) { E = energyGap+ initialEnergy; }
218 return E;
219}

Referenced by G4MicroElecInelasticModel_new::DifferentialCrossSection(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetMaterialName()

G4String G4MicroElecMaterialStructure::GetMaterialName ( )
inline

Definition at line 98 of file G4MicroElecMaterialStructure.hh.

98{ return materialName; };

Referenced by G4MicroElecInelasticModel_new::Initialise().

◆ GetWorkFunction()

G4double G4MicroElecMaterialStructure::GetWorkFunction ( )
inline

Definition at line 97 of file G4MicroElecMaterialStructure.hh.

97{ return workFunction; };

Referenced by G4MicroElecSurface::BuildPhysicsTable(), and G4MicroElecElasticModel_new::Initialise().

◆ GetZ()

G4double G4MicroElecMaterialStructure::GetZ ( G4int  Shell)

Definition at line 189 of file G4MicroElecMaterialStructure.cc.

190{
191 if (Shell >= 0 && Shell < nLevels) {
192 if (!isCompound) return Z;
193 else return compoundShellZ[Shell];
194 }
195 else return 0;
196}

Referenced by G4MicroElecInelasticModel_new::SampleSecondaries().

◆ IsShellWeaklyBound()

G4bool G4MicroElecMaterialStructure::IsShellWeaklyBound ( G4int  level)

Definition at line 243 of file G4MicroElecMaterialStructure.cc.

244{
245 return isShellWeaklyBoundVector[level];
246}

Referenced by GetLimitEnergy(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ NumberOfLevels()

G4int G4MicroElecMaterialStructure::NumberOfLevels ( )
inline

◆ ReadMaterialFile()

void G4MicroElecMaterialStructure::ReadMaterialFile ( )

Definition at line 101 of file G4MicroElecMaterialStructure.cc.

102{
103 char *path = std::getenv("G4LEDATA");
104
105 if (materialName(0) == 'G' && materialName(1) == '4') {
106 //in the case the NIST database is used
107 materialName.erase(0, 1);
108 materialName.erase(0, 1);
109 materialName.erase(0, 1);
110 }
111
112 std::ostringstream fileName;
113 fileName << path << "/microelec/Structure/Data_" + materialName + ".dat";
114 std::ifstream fichier(fileName.str().c_str());
115
116 int varLength = 0;
117 G4String nameParameter;
118
119 G4String unitName;
120 G4double unitValue;
121 G4double data;
122 G4String filler;
123 G4String type;
124
125 if (fichier)
126 {
127 fichier >> filler >> type;
128 materialName = filler;
129 if (type == "Compound") {isCompound = true; Z = 0; }
130 else { isCompound = false; Z = std::stoi(type); }
131 while(!fichier.eof()) {
132
133 getline(fichier, filler);
134 std::stringstream line(filler);
135
136 if (filler(0) == '#' || filler.empty()) {continue;}
137
138 line >> varLength;
139 line >> nameParameter;
140 line >> unitName;
141 unitValue = ConvertUnit(unitName);
142
143 for (int i = 0; i < varLength; i++)
144 {
145 line >> data; data = data*unitValue;
146
147 if (nameParameter == "WorkFunction") workFunction = data;
148 if (nameParameter == "EnergyGap") energyGap = data;
149
150 if (nameParameter == "EnergyPeak") energyConstant.push_back(data);
151 if (nameParameter == "EnergyLimit") LimitEnergy.push_back(data);
152 if (nameParameter == "EADL") EADL_Enumerator.push_back(data);
153
154 if (nameParameter == "WeaklyBoundShell")
155 {if (data == 0) { isShellWeaklyBoundVector.push_back(false); }
156 else {isShellWeaklyBoundVector.push_back(true);}}
157
158 if (nameParameter == "WeaklyBoundInitialEnergy") initialEnergy = data;
159
160 if (nameParameter == "ShellAtomicNumber") compoundShellZ.push_back(data);
161
162 if (nameParameter == "DielectricModelLowEnergyLimit_e") limitInelastic[0]=data;
163 if (nameParameter == "DielectricModelHighEnergyLimit_e") limitInelastic[1] = data;
164 if (nameParameter == "DielectricModelLowEnergyLimit_p") limitInelastic[2] = data;
165 if (nameParameter == "DielectricModelHighEnergyLimit_p") limitInelastic[3] = data;
166
167 if (nameParameter == "ElasticModelLowEnergyLimit") limitElastic[0] = data;
168 if (nameParameter == "ElasticModelHighEnergyLimit") limitElastic[1] = data;
169 }
170 }
171 fichier.close(); // on ferme le fichier
172 }
173 else {
174 G4String str = "file ";
175 str += fileName.str() + " not found!";
176 G4Exception("G4MicroElecMaterialStructure::ReadMaterialFile", "em0002", FatalException, str);
177 }
178}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
G4double ConvertUnit(const G4String &unitName)

Referenced by G4MicroElecMaterialStructure().


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