73 for (
auto& pos : param)
79 for (
auto& pos : excit)
95 G4int id =
Z*100 + parameterIndex;
97 auto pos = param.find(
id);
98 if (pos!= param.end()) {
102 if(shellIndex < nShells) {
105 G4double ee = std::max(ener.front(),std::min(ener.back(),e));
108 G4cout <<
"WARNING: G4IonisationParameters::FindParameter "
109 <<
"has no parameters for shell= " << shellIndex
114 G4cout <<
"WARNING: G4IonisationParameters::Parameter "
115 <<
"did not find ID = "
127 auto pos = excit.find(
Z);
128 if (pos!= excit.end()) {
132 G4double ee = std::max(ener.front(),std::min(ener.back(),e));
135 G4cout <<
"WARNING: G4IonisationParameters::Excitation "
136 <<
"did not find ID = "
145void G4eIonisationParameters::LoadData()
154 if (materialTable ==
nullptr)
160 for (std::size_t mLocal=0; mLocal<nMaterials; ++mLocal) {
162 const G4Material* material= (*materialTable)[mLocal];
166 for (std::size_t iEl=0; iEl<nElements; ++iEl) {
167 G4double Z = (*elementVector)[iEl]->GetZ();
169 activeZ.push_back(
Z);
177 G4Exception(
"G4BremsstrahlungParameters::LoadData",
188 std::size_t nZ = activeZ.size();
190 for (std::size_t i=0; i<nZ; ++i) {
193 std::ostringstream ost;
194 ost << pathString <<
Z <<
".dat";
197 std::ifstream file(name);
198 std::filebuf* lsdp = file.rdbuf();
200 if (! (lsdp->is_open()) ) {
218 std::vector<G4VEMDataSet*> p;
219 for (std::size_t k=0; k<length; ++k)
223 p.push_back(composite);
227 std::vector<G4DataVector*> a;
236 G4String excep(
"invalid data file");
242 if (energy == -2)
break;
249 for (std::size_t j=0; j<length; ++j) {
254 a[0]->push_back(sum);
255 for (std::size_t j=1; j<length; ++j) {
258 a[j]->push_back(qRead);
264 for (std::size_t k=0; k<length; ++k) {
271 std::size_t eSize = e.size();
272 for (std::size_t sLocal=0; sLocal<eSize; ++sLocal) {
273 eVector->push_back(e[sLocal]);
277 p[k]->AddComponent(set);
284 }
while (energy > -2);
297 std::ifstream file_a(name_a);
298 std::filebuf* lsdp_a = file_a.rdbuf();
301 std::ifstream file_b(name_b);
302 std::filebuf* lsdp_b = file_b.rdbuf();
304 if (! (lsdp_a->is_open()) ) {
310 if (! (lsdp_b->is_open()) ) {
332 file_a >> ener >> sig;
333 file_b >> ener1 >> sig1;
336 G4cout <<
"G4eIonisationParameters: problem in excitation data "
338 <<
" ener1= " << ener1
347 }
else if (ener == -1) {
358 std::size_t eSize = e.size();
359 for (std::size_t sLocal2=0; sLocal2<eSize; ++sLocal2) {
360 eVector->push_back(e[sLocal2]);
361 dVector->push_back(d[sLocal2]);
371 e.push_back(ener*MeV);
372 d.push_back(sig1*sig*barn*MeV);
374 }
while (ener != -2);
385 G4cout <<
"===== G4eIonisationParameters =====" <<
G4endl;
388 std::size_t nZ = activeZ.size();
389 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
391 for (std::size_t i=0; i<nZ; i++) {
398 pos = param.find(index);
399 if (pos!= param.cend()) {
405 G4cout <<
"===== Z= " <<
Z <<
" shell= " << k
406 <<
" parameter[" << j <<
"] ====="
414 G4cout <<
"====================================" <<
G4endl;
std::vector< const G4Element * > G4ElementVector
const char * G4FindDataDir(const char *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4Material * > G4MaterialTable
G4GLOB_DLL std::ostream G4cout
G4bool contains(const G4double &) const
const G4ElementVector * GetElementVector() const
static size_t GetNumberOfMaterials()
size_t GetNumberOfElements() const
static G4MaterialTable * GetMaterialTable()
virtual const G4VEMDataSet * GetComponent(G4int componentId) const =0
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual size_t NumberOfComponents(void) const =0
virtual void PrintData(void) const =0
G4eIonisationParameters()
G4double Excitation(G4int Z, G4double e) const
~G4eIonisationParameters()
G4double Parameter(G4int Z, G4int shellIndex, G4int parameterIndex, G4double e) const
G4double energy(const ThreeVector &p, const G4double m)
const char * name(G4int ptype)