64 : zMin(minZ), zMax(maxZ),
74 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
76 for (pos = param.begin(); pos != param.end(); ++pos)
82 for (pos = excit.begin(); pos != excit.end(); ++pos)
97 G4int id = Z*100 + parameterIndex;
98 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
100 pos = param.find(
id);
101 if (pos!= param.end()) {
105 if(shellIndex < nShells) {
111 G4cout <<
"WARNING: G4IonisationParameters::FindParameter "
112 <<
"has no parameters for shell= " << shellIndex
117 G4cout <<
"WARNING: G4IonisationParameters::Parameter "
118 <<
"did not find ID = "
128 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
131 if (pos!= excit.end()) {
138 G4cout <<
"WARNING: G4IonisationParameters::Excitation "
139 <<
"did not find ID = "
147 void G4eIonisationParameters::LoadData()
156 if (materialTable == 0)
162 for (
G4int mLocal=0; mLocal<nMaterials; mLocal++) {
168 for (
size_t iEl=0; iEl<nElements; iEl++) {
169 G4Element* element = (*elementVector)[iEl];
172 activeZ.push_back(Z);
177 char* path = getenv(
"G4LEDATA");
180 G4Exception(
"G4BremsstrahlungParameters::LoadData",
191 size_t nZ = activeZ.size();
193 for (
size_t i=0; i<nZ; i++) {
196 std::ostringstream ost;
197 ost << pathString << Z <<
".dat";
201 std::filebuf* lsdp =
file.rdbuf();
203 if (! (lsdp->is_open()) ) {
221 std::vector<G4VEMDataSet*>
p;
222 for (
size_t k=0; k<length; k++)
226 p.push_back(composite);
230 std::vector<G4DataVector*>
a;
235 file >> energy >> sum;
239 G4String excep(
"invalid data file");
245 if (energy == -2)
break;
252 for (
size_t j=0; j<length; ++j) {
257 a[0]->push_back(sum);
258 for (
size_t j=1; j<length; ++j) {
261 a[j]->push_back(qRead);
267 for (
size_t k=0; k<length; k++) {
274 size_t eSize = e.size();
275 for (
size_t sLocal=0; sLocal<eSize; sLocal++) {
276 eVector->push_back(e[sLocal]);
280 p[k]->AddComponent(set);
287 }
while (energy > -2);
291 for (
size_t kk=0; kk<length; kk++)
293 G4int id = Z*100 + kk;
300 std::ifstream file_a(name_a);
301 std::filebuf* lsdp_a = file_a.rdbuf();
304 std::ifstream file_b(name_b);
305 std::filebuf* lsdp_b = file_b.rdbuf();
307 if (! (lsdp_a->is_open()) ) {
313 if (! (lsdp_b->is_open()) ) {
335 file_a >> ener >> sig;
336 file_b >> ener1 >> sig1;
339 G4cout <<
"G4eIonisationParameters: problem in excitation data "
341 <<
" ener1= " << ener1
350 }
else if (ener == -1) {
361 size_t eSize = e.size();
362 for (
size_t sLocal2=0; sLocal2<eSize; sLocal2++) {
363 eVector->push_back(e[sLocal2]);
364 dVector->push_back(d[sLocal2]);
374 e.push_back(ener*
MeV);
375 d.push_back(sig1*sig*
barn*MeV);
377 }
while (ener != -2);
387 G4cout <<
"===== G4eIonisationParameters =====" <<
G4endl;
390 size_t nZ = activeZ.size();
391 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
393 for (
size_t i=0; i<nZ; i++) {
396 for (
size_t j=0; j<length; j++) {
400 pos = param.find(index);
401 if (pos!= param.end()) {
405 for (
size_t k=0; k<nShells; k++) {
407 G4cout <<
"===== Z= " << Z <<
" shell= " << k
408 <<
" parameter[" << j <<
"] ====="
416 G4cout <<
"====================================" <<
G4endl;
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
std::vector< G4Element * > G4ElementVector
G4double Excitation(G4int Z, G4double e) const
G4double Parameter(G4int Z, G4int shellIndex, G4int parameterIndex, G4double e) const
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
const G4ElementVector * GetElementVector() const
virtual const G4VEMDataSet * GetComponent(G4int componentId) const =0
G4GLOB_DLL std::ostream G4cout
virtual size_t NumberOfComponents(void) const =0
~G4eIonisationParameters()
static size_t GetNumberOfMaterials()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4eIonisationParameters(G4int minZ=1, G4int maxZ=99)
virtual void PrintData(void) const =0
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
const XML_Char int const XML_Char * value
size_t GetNumberOfElements() const
G4bool contains(const G4double &) const