Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // >> 24 // $Id: G4eIonisationParameters.cc,v 1.22 2005/11/30 16:34:11 gcosmo Exp $ >> 25 // GEANT4 tag $Name: geant4-08-00-patch-01 $ 27 // 26 // 28 // Author: Maria Grazia Pia (Maria.Grazia.Pia@ 27 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) 29 // 28 // 30 // History: 29 // History: 31 // ----------- 30 // ----------- 32 // 31 Jul 2001 MGP Created, with dumm 31 // 31 Jul 2001 MGP Created, with dummy implementation 33 // 12.09.01 V.Ivanchenko Add param and inte 32 // 12.09.01 V.Ivanchenko Add param and interpolation of parameters 34 // 04.10.01 V.Ivanchenko Add BindingEnergy 33 // 04.10.01 V.Ivanchenko Add BindingEnergy method 35 // 25.10.01 MGP Many bug fixes, mo 34 // 25.10.01 MGP Many bug fixes, mostly related to the 36 // management of poin 35 // management of pointers 37 // 29.11.01 V.Ivanchenko New parametrisatio 36 // 29.11.01 V.Ivanchenko New parametrisation + Excitation 38 // 30.05.02 V.Ivanchenko Format and names o 37 // 30.05.02 V.Ivanchenko Format and names of the data files were 39 // chenged to "ion-.. 38 // chenged to "ion-..." 40 // 17.02.04 V.Ivanchenko Increase buffer si 39 // 17.02.04 V.Ivanchenko Increase buffer size 41 // 23.03.09 L.Pandola Updated warning me << 42 // 03.12.10 V.Ivanchenko Fixed memory leak << 43 // 40 // 44 // ------------------------------------------- 41 // ------------------------------------------------------------------- 45 42 46 #include "G4eIonisationParameters.hh" 43 #include "G4eIonisationParameters.hh" 47 #include "G4SystemOfUnits.hh" << 48 #include "G4VEMDataSet.hh" 44 #include "G4VEMDataSet.hh" 49 #include "G4ShellEMDataSet.hh" 45 #include "G4ShellEMDataSet.hh" 50 #include "G4EMDataSet.hh" 46 #include "G4EMDataSet.hh" 51 #include "G4CompositeEMDataSet.hh" 47 #include "G4CompositeEMDataSet.hh" 52 #include "G4LinInterpolation.hh" 48 #include "G4LinInterpolation.hh" 53 #include "G4LogLogInterpolation.hh" 49 #include "G4LogLogInterpolation.hh" 54 #include "G4LinLogLogInterpolation.hh" 50 #include "G4LinLogLogInterpolation.hh" 55 #include "G4SemiLogInterpolation.hh" 51 #include "G4SemiLogInterpolation.hh" 56 #include "G4Material.hh" 52 #include "G4Material.hh" 57 #include "G4DataVector.hh" 53 #include "G4DataVector.hh" 58 #include <fstream> 54 #include <fstream> 59 #include <sstream> 55 #include <sstream> 60 56 61 //....oooOO0OOooo........oooOO0OOooo........oo << 62 57 63 G4eIonisationParameters:: G4eIonisationParamet << 58 G4eIonisationParameters:: G4eIonisationParameters(G4int minZ, G4int maxZ) >> 59 : zMin(minZ), zMax(maxZ), >> 60 length(24) 64 { 61 { 65 LoadData(); 62 LoadData(); 66 } 63 } 67 64 68 //....oooOO0OOooo........oooOO0OOooo........oo << 69 65 70 G4eIonisationParameters::~G4eIonisationParamet 66 G4eIonisationParameters::~G4eIonisationParameters() 71 { 67 { 72 // Reset the map of data sets: remove the da 68 // Reset the map of data sets: remove the data sets from the map 73 for (auto& pos : param) << 69 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos; >> 70 >> 71 for (pos = param.begin(); pos != param.end(); ++pos) 74 { 72 { 75 G4VEMDataSet* dataSet = pos.second; << 73 G4VEMDataSet* dataSet = (*pos).second; 76 delete dataSet; 74 delete dataSet; 77 dataSet = nullptr; << 78 } 75 } 79 for (auto& pos : excit) << 76 80 { << 77 for (pos = excit.begin(); pos != excit.end(); ++pos) 81 G4VEMDataSet* dataSet = pos.second; << 78 { >> 79 G4VEMDataSet* dataSet = (*pos).second; 82 delete dataSet; 80 delete dataSet; 83 dataSet = nullptr; << 84 } 81 } >> 82 85 activeZ.clear(); 83 activeZ.clear(); 86 } 84 } 87 85 88 //....oooOO0OOooo........oooOO0OOooo........oo << 89 86 90 G4double G4eIonisationParameters::Parameter(G4 87 G4double G4eIonisationParameters::Parameter(G4int Z, G4int shellIndex, 91 88 G4int parameterIndex, 92 89 G4double e) const 93 { 90 { 94 G4double value = 0.; 91 G4double value = 0.; 95 G4int id = Z*100 + parameterIndex; 92 G4int id = Z*100 + parameterIndex; >> 93 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos; 96 94 97 auto pos = param.find(id); << 95 pos = param.find(id); 98 if (pos!= param.end()) { 96 if (pos!= param.end()) { 99 G4VEMDataSet* dataSet = (*pos).second; 97 G4VEMDataSet* dataSet = (*pos).second; 100 G4int nShells = (G4int)dataSet->NumberOfCo << 98 G4int nShells = dataSet->NumberOfComponents(); 101 99 102 if(shellIndex < nShells) { 100 if(shellIndex < nShells) { 103 const G4VEMDataSet* component = dataSet- 101 const G4VEMDataSet* component = dataSet->GetComponent(shellIndex); 104 const G4DataVector ener = component->Get 102 const G4DataVector ener = component->GetEnergies(0); 105 G4double ee = std::max(ener.front(),std: 103 G4double ee = std::max(ener.front(),std::min(ener.back(),e)); 106 value = component->FindValue(ee); 104 value = component->FindValue(ee); 107 } else { 105 } else { 108 G4cout << "WARNING: G4IonisationParamete 106 G4cout << "WARNING: G4IonisationParameters::FindParameter " 109 << "has no parameters for shell= 107 << "has no parameters for shell= " << shellIndex 110 << "; Z= " << Z 108 << "; Z= " << Z 111 << G4endl; 109 << G4endl; 112 } 110 } 113 } else { 111 } else { 114 G4cout << "WARNING: G4IonisationParameters 112 G4cout << "WARNING: G4IonisationParameters::Parameter " 115 << "did not find ID = " 113 << "did not find ID = " 116 << shellIndex << G4endl; 114 << shellIndex << G4endl; 117 } 115 } 118 116 119 return value; 117 return value; 120 } 118 } 121 119 122 //....oooOO0OOooo........oooOO0OOooo........oo << 123 << 124 G4double G4eIonisationParameters::Excitation(G 120 G4double G4eIonisationParameters::Excitation(G4int Z, G4double e) const 125 { 121 { 126 G4double value = 0.; 122 G4double value = 0.; 127 auto pos = excit.find(Z); << 123 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos; >> 124 >> 125 pos = excit.find(Z); 128 if (pos!= excit.end()) { 126 if (pos!= excit.end()) { 129 G4VEMDataSet* dataSet = (*pos).second; 127 G4VEMDataSet* dataSet = (*pos).second; 130 128 131 const G4DataVector ener = dataSet->GetEner 129 const G4DataVector ener = dataSet->GetEnergies(0); 132 G4double ee = std::max(ener.front(),std::m 130 G4double ee = std::max(ener.front(),std::min(ener.back(),e)); 133 value = dataSet->FindValue(ee); 131 value = dataSet->FindValue(ee); 134 } else { 132 } else { 135 G4cout << "WARNING: G4IonisationParameters 133 G4cout << "WARNING: G4IonisationParameters::Excitation " 136 << "did not find ID = " 134 << "did not find ID = " 137 << Z << G4endl; 135 << Z << G4endl; 138 } 136 } 139 137 140 return value; 138 return value; 141 } 139 } 142 140 143 //....oooOO0OOooo........oooOO0OOooo........oo << 144 141 145 void G4eIonisationParameters::LoadData() 142 void G4eIonisationParameters::LoadData() 146 { 143 { 147 // --------------------------------------- 144 // --------------------------------------- 148 // Please document what are the parameters 145 // Please document what are the parameters 149 // --------------------------------------- 146 // --------------------------------------- 150 147 151 // define active elements 148 // define active elements 152 149 153 const G4MaterialTable* materialTable = G4Mat 150 const G4MaterialTable* materialTable = G4Material::GetMaterialTable(); 154 if (materialTable == nullptr) << 151 if (materialTable == 0) 155 G4Exception("G4eIonisationParameters::Loa << 152 G4Exception("G4eIonisationParameters: no MaterialTable found)"); 156 "em1001",FatalException,"Unable to fin << 157 153 158 std::size_t nMaterials = G4Material::GetNumb << 154 G4int nMaterials = G4Material::GetNumberOfMaterials(); 159 155 160 for (std::size_t mLocal=0; mLocal<nMaterials << 156 for (G4int m=0; m<nMaterials; m++) { 161 157 162 const G4Material* material= (*materialTabl << 158 const G4Material* material= (*materialTable)[m]; 163 const G4ElementVector* elementVector = mat 159 const G4ElementVector* elementVector = material->GetElementVector(); 164 const std::size_t nElements = material->Ge << 160 const size_t nElements = material->GetNumberOfElements(); 165 161 166 for (std::size_t iEl=0; iEl<nElements; ++i << 162 for (size_t iEl=0; iEl<nElements; iEl++) { 167 G4double Z = (*elementVector)[iEl]->GetZ << 163 G4Element* element = (*elementVector)[iEl]; >> 164 G4double Z = element->GetZ(); 168 if (!(activeZ.contains(Z))) { 165 if (!(activeZ.contains(Z))) { 169 activeZ.push_back(Z); 166 activeZ.push_back(Z); 170 } 167 } 171 } 168 } 172 } 169 } 173 170 174 const char* path = G4FindDataDir("G4LEDATA") << 171 char* path = getenv("G4LEDATA"); 175 if (!path) 172 if (!path) 176 { 173 { 177 G4Exception("G4BremsstrahlungParameters: << 174 G4String excep("G4eIonisationParameters - G4LEDATA environment variable not set"); 178 "em0006",FatalException,"G4LEDATA envi << 175 G4Exception(excep); 179 return; << 180 } 176 } 181 177 182 G4String pathString(path); 178 G4String pathString(path); 183 G4String path2("/ioni/ion-sp-"); 179 G4String path2("/ioni/ion-sp-"); 184 pathString += path2; 180 pathString += path2; 185 181 186 G4double energy, sum; 182 G4double energy, sum; 187 183 188 std::size_t nZ = activeZ.size(); << 184 size_t nZ = activeZ.size(); 189 185 190 for (std::size_t i=0; i<nZ; ++i) { << 186 for (size_t i=0; i<nZ; i++) { 191 187 192 G4int Z = (G4int)activeZ[i]; 188 G4int Z = (G4int)activeZ[i]; 193 std::ostringstream ost; 189 std::ostringstream ost; 194 ost << pathString << Z << ".dat"; 190 ost << pathString << Z << ".dat"; 195 G4String name(ost.str()); 191 G4String name(ost.str()); 196 192 197 std::ifstream file(name); 193 std::ifstream file(name); 198 std::filebuf* lsdp = file.rdbuf(); 194 std::filebuf* lsdp = file.rdbuf(); 199 195 200 if (! (lsdp->is_open()) ) { 196 if (! (lsdp->is_open()) ) { 201 G4String excep = G4String("data file: ") << 197 G4String excep = G4String("G4IonisationParameters - data file: ") 202 + name + G4String(" not found"); << 198 + name + G4String(" not found. The version 1.# of G4LEDATA should be used"); 203 G4Exception("G4eIonisationParameters::Lo << 199 G4Exception(excep); 204 "em0003",FatalException,excep); << 205 } 200 } 206 201 207 // The file is organized into: 202 // The file is organized into: 208 // For each shell there are two lines: 203 // For each shell there are two lines: 209 // 1st line: 204 // 1st line: 210 // 1st column is the energy of incident e- 205 // 1st column is the energy of incident e-, 211 // 2d column is the parameter of screan t 206 // 2d column is the parameter of screan term; 212 // 2d line: 207 // 2d line: 213 // 3 energy (MeV) subdividing different ap 208 // 3 energy (MeV) subdividing different approximation area of the spectrum 214 // 20 point on the spectrum 209 // 20 point on the spectrum 215 // The shell terminates with the pattern: 210 // The shell terminates with the pattern: -1 -1 216 // The file terminates with the pattern: - 211 // The file terminates with the pattern: -2 -2 217 212 218 std::vector<G4VEMDataSet*> p; 213 std::vector<G4VEMDataSet*> p; 219 for (std::size_t k=0; k<length; ++k) << 214 for (size_t k=0; k<length; k++) 220 { 215 { 221 G4VDataSetAlgorithm* inter = new G4LinLogLog 216 G4VDataSetAlgorithm* inter = new G4LinLogLogInterpolation(); 222 G4VEMDataSet* composite = new G4CompositeEMD 217 G4VEMDataSet* composite = new G4CompositeEMDataSet(inter,1.,1.); 223 p.push_back(composite); 218 p.push_back(composite); 224 } 219 } 225 220 226 G4int shell = 0; 221 G4int shell = 0; 227 std::vector<G4DataVector*> a; 222 std::vector<G4DataVector*> a; 228 a.resize(length); << 223 for (size_t j=0; j<length; j++) >> 224 { >> 225 G4DataVector* aa = new G4DataVector(); >> 226 a.push_back(aa); >> 227 } 229 G4DataVector e; 228 G4DataVector e; 230 G4bool isReady = false; << 229 e.clear(); 231 do { 230 do { 232 file >> energy >> sum; 231 file >> energy >> sum; 233 //Check if energy is valid << 234 if (energy < -2) << 235 { << 236 G4String excep("invalid data file"); << 237 G4Exception("G4eIonisationParameters << 238 "em0005",FatalException,excep); << 239 return; << 240 } << 241 << 242 if (energy == -2) break; 232 if (energy == -2) break; 243 233 244 if (energy > -1) { 234 if (energy > -1) { 245 // new energy << 246 if(!isReady) { << 247 isReady = true; << 248 e.clear(); << 249 for (std::size_t j=0; j<length; ++j) { << 250 a[j] = new G4DataVector(); << 251 } << 252 } << 253 e.push_back(energy); 235 e.push_back(energy); 254 a[0]->push_back(sum); 236 a[0]->push_back(sum); 255 for (std::size_t j=1; j<length; ++j) { << 237 for (size_t j=0; j<length-1; j++) { 256 G4double qRead; 238 G4double qRead; 257 file >> qRead; 239 file >> qRead; 258 a[j]->push_back(qRead); << 240 a[j + 1]->push_back(qRead); 259 } 241 } 260 242 261 } else { 243 } else { 262 244 263 // End of set for a shell, fill the ma 245 // End of set for a shell, fill the map 264 for (std::size_t k=0; k<length; ++k) { << 246 for (size_t k=0; k<length; k++) { 265 247 266 G4VDataSetAlgorithm* interp; 248 G4VDataSetAlgorithm* interp; 267 if(0 == k) { interp = new G4LinLogL << 249 if(0 == k) interp = new G4LinLogLogInterpolation(); 268 else { interp = new G4LogLogI << 250 else interp = new G4LogLogInterpolation(); 269 251 270 G4DataVector* eVector = new G4DataVector; 252 G4DataVector* eVector = new G4DataVector; 271 std::size_t eSize = e.size(); << 253 size_t eSize = e.size(); 272 for (std::size_t sLocal=0; sLocal<eSize; + << 254 for (size_t s=0; s<eSize; s++) { 273 eVector->push_back(e[sLocal]); << 255 eVector->push_back(e[s]); 274 } 256 } 275 G4VEMDataSet* set = new G4EMDataSet(shell, 257 G4VEMDataSet* set = new G4EMDataSet(shell,eVector,a[k],interp,1.,1.); 276 258 277 p[k]->AddComponent(set); 259 p[k]->AddComponent(set); 278 } 260 } 279 261 280 // next shell << 262 // clear vectors 281 ++shell; << 263 for (size_t j2=0; j2<length; j2++) { 282 isReady = false; << 264 a[j2] = new G4DataVector(); >> 265 } >> 266 shell++; >> 267 e.clear(); 283 } 268 } 284 } while (energy > -2); 269 } while (energy > -2); 285 270 286 file.close(); 271 file.close(); 287 272 288 for (G4int kk=0; kk<(G4int)length; ++kk) << 273 for (size_t kk=0; kk<length; kk++) 289 { 274 { 290 G4int id = Z*100 + kk; << 275 G4int id = Z*100 + kk; 291 param[id] = p[kk]; << 276 param[id] = p[kk]; 292 } 277 } 293 } 278 } 294 279 295 G4String pathString_a(path); 280 G4String pathString_a(path); 296 G4String name_a = pathString_a + G4String("/ 281 G4String name_a = pathString_a + G4String("/ioni/ion-ex-av.dat"); 297 std::ifstream file_a(name_a); 282 std::ifstream file_a(name_a); 298 std::filebuf* lsdp_a = file_a.rdbuf(); 283 std::filebuf* lsdp_a = file_a.rdbuf(); 299 G4String pathString_b(path); 284 G4String pathString_b(path); 300 G4String name_b = pathString_b + G4String("/ 285 G4String name_b = pathString_b + G4String("/ioni/ion-ex-sig.dat"); 301 std::ifstream file_b(name_b); 286 std::ifstream file_b(name_b); 302 std::filebuf* lsdp_b = file_b.rdbuf(); 287 std::filebuf* lsdp_b = file_b.rdbuf(); 303 288 304 if (! (lsdp_a->is_open()) ) { 289 if (! (lsdp_a->is_open()) ) { 305 G4String excep = G4String("cannot open fi << 290 G4String excep = G4String("G4eIonisationParameters: cannot open file ") 306 + name_a; 291 + name_a; 307 G4Exception("G4eIonisationParameters::Loa << 292 G4Exception(excep); 308 "em0003",FatalException,excep); << 309 } 293 } 310 if (! (lsdp_b->is_open()) ) { 294 if (! (lsdp_b->is_open()) ) { 311 G4String excep = G4String("cannot open fi << 295 G4String excep = G4String("G4eIonisationParameters: cannot open file ") 312 + name_b; 296 + name_b; 313 G4Exception("G4eIonisationParameters::Loa << 297 G4Exception(excep); 314 "em0003",FatalException,excep); << 315 } 298 } 316 299 317 // The file is organized into two columns: 300 // The file is organized into two columns: 318 // 1st column is the energy 301 // 1st column is the energy 319 // 2nd column is the corresponding value 302 // 2nd column is the corresponding value 320 // The file terminates with the pattern: -1 303 // The file terminates with the pattern: -1 -1 321 // -2 304 // -2 -2 322 305 323 G4double ener, ener1, sig, sig1; 306 G4double ener, ener1, sig, sig1; 324 G4int z = 0; 307 G4int z = 0; 325 308 326 G4DataVector e; 309 G4DataVector e; 327 e.clear(); 310 e.clear(); 328 G4DataVector d; 311 G4DataVector d; 329 d.clear(); 312 d.clear(); 330 313 331 do { 314 do { 332 file_a >> ener >> sig; 315 file_a >> ener >> sig; 333 file_b >> ener1 >> sig1; 316 file_b >> ener1 >> sig1; 334 317 335 if(ener != ener1) { 318 if(ener != ener1) { 336 G4cout << "G4eIonisationParameters: prob 319 G4cout << "G4eIonisationParameters: problem in excitation data " 337 << "ener= " << ener 320 << "ener= " << ener 338 << " ener1= " << ener1 321 << " ener1= " << ener1 339 << G4endl; 322 << G4endl; 340 } 323 } 341 324 342 // End of file 325 // End of file 343 if (ener == -2) { 326 if (ener == -2) { 344 break; 327 break; 345 328 346 // End of next element 329 // End of next element 347 } else if (ener == -1) { 330 } else if (ener == -1) { 348 331 349 z++; 332 z++; 350 G4double Z = (G4double)z; 333 G4double Z = (G4double)z; 351 334 352 // fill map if Z is used 335 // fill map if Z is used 353 if (activeZ.contains(Z)) { 336 if (activeZ.contains(Z)) { 354 337 355 G4VDataSetAlgorithm* inter = new G4LinInter 338 G4VDataSetAlgorithm* inter = new G4LinInterpolation(); 356 G4DataVector* eVector = new G4DataVector; 339 G4DataVector* eVector = new G4DataVector; 357 G4DataVector* dVector = new G4DataVector; 340 G4DataVector* dVector = new G4DataVector; 358 std::size_t eSize = e.size(); << 341 size_t eSize = e.size(); 359 for (std::size_t sLocal2=0; sLocal2<eSize; + << 342 for (size_t s=0; s<eSize; s++) { 360 eVector->push_back(e[sLocal2]); << 343 eVector->push_back(e[s]); 361 dVector->push_back(d[sLocal2]); << 344 dVector->push_back(d[s]); 362 } 345 } 363 G4VEMDataSet* set = new G4EMDataSet(z,eVecto 346 G4VEMDataSet* set = new G4EMDataSet(z,eVector,dVector,inter,1.,1.); 364 excit[z] = set; 347 excit[z] = set; 365 } 348 } 366 e.clear(); 349 e.clear(); 367 d.clear(); 350 d.clear(); 368 351 369 } else { 352 } else { 370 353 371 e.push_back(ener*MeV); 354 e.push_back(ener*MeV); 372 d.push_back(sig1*sig*barn*MeV); 355 d.push_back(sig1*sig*barn*MeV); 373 } 356 } 374 } while (ener != -2); 357 } while (ener != -2); 375 358 376 file_a.close(); 359 file_a.close(); 377 360 378 } 361 } 379 362 380 //....oooOO0OOooo........oooOO0OOooo........oo << 381 363 382 void G4eIonisationParameters::PrintData() cons 364 void G4eIonisationParameters::PrintData() const 383 { 365 { 384 G4cout << G4endl; 366 G4cout << G4endl; 385 G4cout << "===== G4eIonisationParameters === 367 G4cout << "===== G4eIonisationParameters =====" << G4endl; 386 G4cout << G4endl; 368 G4cout << G4endl; 387 369 388 std::size_t nZ = activeZ.size(); << 370 size_t nZ = activeZ.size(); 389 std::map<G4int,G4VEMDataSet*,std::less<G4int 371 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos; 390 372 391 for (std::size_t i=0; i<nZ; i++) { << 373 for (size_t i=0; i<nZ; i++) { 392 G4int Z = (G4int)activeZ[i]; 374 G4int Z = (G4int)activeZ[i]; 393 375 394 for (G4int j=0; j<(G4int)length; ++j) { << 376 for (size_t j=0; j<length; j++) { 395 377 396 G4int index = Z*100 + j; 378 G4int index = Z*100 + j; 397 379 398 pos = param.find(index); 380 pos = param.find(index); 399 if (pos!= param.cend()) { << 381 if (pos!= param.end()) { 400 G4VEMDataSet* dataSet = (*pos).second; 382 G4VEMDataSet* dataSet = (*pos).second; 401 std::size_t nShells = dataSet->NumberO << 383 size_t nShells = dataSet->NumberOfComponents(); 402 384 403 for (G4int k=0; k<(G4int)nShells; ++k) << 385 for (size_t k=0; k<nShells; k++) { 404 386 405 G4cout << "===== Z= " << Z << " shel 387 G4cout << "===== Z= " << Z << " shell= " << k 406 << " parameter[" << j << "] 388 << " parameter[" << j << "] =====" 407 << G4endl; 389 << G4endl; 408 const G4VEMDataSet* comp = dataSet-> 390 const G4VEMDataSet* comp = dataSet->GetComponent(k); 409 comp->PrintData(); 391 comp->PrintData(); 410 } 392 } 411 } 393 } 412 } 394 } 413 } 395 } 414 G4cout << "================================= 396 G4cout << "====================================" << G4endl; 415 } 397 } 416 398 417 399 418 400