63 : zMin(minZ), zMax(maxZ),
73 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
75 for (pos = param.begin(); pos != param.end(); ++pos)
81 for (pos = excit.begin(); pos != excit.end(); ++pos)
96 G4int id = Z*100 + parameterIndex;
97 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
100 if (pos!= param.end()) {
104 if(shellIndex < nShells) {
107 G4double ee = std::max(ener.front(),std::min(ener.back(),e));
110 G4cout <<
"WARNING: G4IonisationParameters::FindParameter "
111 <<
"has no parameters for shell= " << shellIndex
116 G4cout <<
"WARNING: G4IonisationParameters::Parameter "
117 <<
"did not find ID = "
127 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
130 if (pos!= excit.end()) {
134 G4double ee = std::max(ener.front(),std::min(ener.back(),e));
137 G4cout <<
"WARNING: G4IonisationParameters::Excitation "
138 <<
"did not find ID = "
146void G4eIonisationParameters::LoadData()
155 if (materialTable == 0)
161 for (
G4int mLocal=0; mLocal<nMaterials; mLocal++) {
163 const G4Material* material= (*materialTable)[mLocal];
167 for (
size_t iEl=0; iEl<nElements; iEl++) {
168 G4Element* element = (*elementVector)[iEl];
171 activeZ.push_back(Z);
176 char* path = std::getenv(
"G4LEDATA");
179 G4Exception(
"G4BremsstrahlungParameters::LoadData",
190 size_t nZ = activeZ.size();
192 for (
size_t i=0; i<nZ; i++) {
195 std::ostringstream ost;
196 ost << pathString << Z <<
".dat";
199 std::ifstream file(name);
200 std::filebuf* lsdp = file.rdbuf();
202 if (! (lsdp->is_open()) ) {
220 std::vector<G4VEMDataSet*> p;
221 for (
size_t k=0; k<length; k++)
225 p.push_back(composite);
229 std::vector<G4DataVector*> a;
238 G4String excep(
"invalid data file");
244 if (energy == -2)
break;
251 for (
size_t j=0; j<length; ++j) {
256 a[0]->push_back(sum);
257 for (
size_t j=1; j<length; ++j) {
260 a[j]->push_back(qRead);
266 for (
size_t k=0; k<length; k++) {
273 size_t eSize = e.size();
274 for (
size_t sLocal=0; sLocal<eSize; sLocal++) {
275 eVector->push_back(e[sLocal]);
279 p[k]->AddComponent(set);
286 }
while (energy > -2);
290 for (
size_t kk=0; kk<length; kk++)
292 G4int id = Z*100 + kk;
299 std::ifstream file_a(name_a);
300 std::filebuf* lsdp_a = file_a.rdbuf();
303 std::ifstream file_b(name_b);
304 std::filebuf* lsdp_b = file_b.rdbuf();
306 if (! (lsdp_a->is_open()) ) {
312 if (! (lsdp_b->is_open()) ) {
334 file_a >> ener >> sig;
335 file_b >> ener1 >> sig1;
338 G4cout <<
"G4eIonisationParameters: problem in excitation data "
340 <<
" ener1= " << ener1
349 }
else if (ener == -1) {
360 size_t eSize = e.size();
361 for (
size_t sLocal2=0; sLocal2<eSize; sLocal2++) {
362 eVector->push_back(e[sLocal2]);
363 dVector->push_back(d[sLocal2]);
373 e.push_back(ener*MeV);
374 d.push_back(sig1*sig*barn*MeV);
376 }
while (ener != -2);
386 G4cout <<
"===== G4eIonisationParameters =====" <<
G4endl;
389 size_t nZ = activeZ.size();
390 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
392 for (
size_t i=0; i<nZ; i++) {
395 for (
size_t j=0; j<length; j++) {
397 G4int index = Z*100 + j;
399 pos = param.find(index);
400 if (pos!= param.end()) {
404 for (
size_t k=0; k<nShells; k++) {
406 G4cout <<
"===== Z= " << Z <<
" shell= " << k
407 <<
" parameter[" << j <<
"] ====="
415 G4cout <<
"====================================" <<
G4endl;
std::vector< G4Element * > G4ElementVector
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
G4double Excitation(G4int Z, G4double e) const
G4eIonisationParameters(G4int minZ=1, G4int maxZ=99)
~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)