83 materialName = matName;
84 if (matName ==
"Vacuum" || matName ==
"uum") {
91 nLevels = (
G4int)energyConstant.size();
100 if (materialName[0] ==
'G' && materialName[1] ==
'4') {
102 materialName.erase(0, 1);
103 materialName.erase(0, 1);
104 materialName.erase(0, 1);
107 std::ostringstream fileName;
108 fileName << path <<
"/microelec/Structure/Data_" + materialName +
".dat";
109 std::ifstream fichier(fileName.str().c_str());
122 fichier >> filler >> type;
123 materialName = filler;
124 if (type ==
"Compound") {isCompound =
true; Z = 0; }
125 else { isCompound =
false; Z = std::stoi(type); }
126 while(!fichier.eof()) {
128 getline(fichier, filler);
129 std::stringstream line(filler);
131 if (filler[0] ==
'#' || filler.empty()) {
continue;}
134 line >> nameParameter;
138 for (
int i = 0; i < varLength; i++)
140 line >> data; data = data*unitValue;
142 if(nameParameter ==
"WorkFunction")
146 if(nameParameter ==
"EnergyGap")
151 if(nameParameter ==
"EnergyPeak")
153 energyConstant.push_back(data);
155 if(nameParameter ==
"EnergyLimit")
157 LimitEnergy.push_back(data);
159 if(nameParameter ==
"EADL")
161 EADL_Enumerator.push_back(data);
164 if (nameParameter ==
"WeaklyBoundShell")
165 {
if (data == 0) { isShellWeaklyBoundVector.push_back(
false); }
166 else {isShellWeaklyBoundVector.push_back(
true);}}
168 if(nameParameter ==
"WeaklyBoundInitialEnergy")
170 initialEnergy = data;
173 if(nameParameter ==
"ShellAtomicNumber")
175 compoundShellZ.push_back(data);
178 if(nameParameter ==
"DielectricModelLowEnergyLimit_e")
180 limitInelastic[0] = data;
182 if(nameParameter ==
"DielectricModelHighEnergyLimit_e")
184 limitInelastic[1] = data;
186 if(nameParameter ==
"DielectricModelLowEnergyLimit_p")
188 limitInelastic[2] = data;
190 if(nameParameter ==
"DielectricModelHighEnergyLimit_p")
192 limitInelastic[3] = data;
195 if(nameParameter ==
"ElasticModelLowEnergyLimit")
197 limitElastic[0] = data;
199 if(nameParameter ==
"ElasticModelHighEnergyLimit")
201 limitElastic[1] = data;
209 str += fileName.str() +
" not found!";
218 return (level >= 0 && level < nLevels) ? energyConstant[level] : 0.0;
225 if (Shell >= 0 && Shell < nLevels) {
232 return compoundShellZ[Shell];
246 if(unitName ==
"meV")
248 unitValue = 1e-3 * CLHEP::eV;
250 else if(unitName ==
"eV")
252 unitValue = CLHEP::eV;
254 else if(unitName ==
"keV")
256 unitValue = CLHEP::keV;
258 else if(unitName ==
"MeV")
260 unitValue = CLHEP::MeV;
262 else if(unitName ==
"noUnit")
286 res = limitInelastic[0];
290 res = limitInelastic[2];
302 res = limitInelastic[1];
306 res = limitInelastic[3];
315 return isShellWeaklyBoundVector[level];
const char * G4FindDataDir(const char *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double GetInelasticModelHighLimit(G4int pdg)
G4bool IsShellWeaklyBound(G4int level)
G4double GetLimitEnergy(G4int level)
G4double GetZ(G4int Shell)
G4double ConvertUnit(const G4String &unitName)
G4MicroElecMaterialStructure(const G4String &matName="")
G4double Energy(G4int level)
G4double GetInelasticModelLowLimit(G4int pdg)