- Timestamp:
- May 28, 2009, 4:26:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationSpectrum.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisationSpectrum.cc,v 1.2 5 2006/06/29 19:42:04 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4eIonisationSpectrum.cc,v 1.26 2009/03/23 09:13:44 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 46 46 // 30.05.2002 VI Update to 24-parameters data 47 47 // 11.07.2002 VI Fix in integration over spectrum 48 // 23.03.2009 LP Added protection against division by zero (for 49 // faulty database files), Bug Report 1042 48 50 // 49 51 // ------------------------------------------------------------------- … … 125 127 p.push_back((2.0*g - 1.0)/(g*g)); 126 128 127 p[iMax-1] = Function(p[3], p); 129 //Add protection against division by zero: actually in Function() 130 //parameter p[3] appears in the denominator. Bug report 1042 131 if (p[3] > 0) 132 p[iMax-1] = Function(p[3], p); 133 else 134 { 135 G4cout << "WARNING: G4eIonisationSpectrum::Probability " 136 << "parameter p[3] <= 0. G4LEDATA dabatase might be corrupted for Z = " 137 << Z << ". Please check and/or update it " << G4endl; 138 } 128 139 129 140 if(e >= 1. && e <= 0. && Z == 4) p.push_back(0.0); … … 210 221 p.push_back((2.0*g - 1.0)/(g*g)); 211 222 212 p[iMax-1] = Function(p[3], p); 223 224 //Add protection against division by zero: actually in Function() 225 //parameter p[3] appears in the denominator. Bug report 1042 226 if (p[3] > 0) 227 p[iMax-1] = Function(p[3], p); 228 else 229 { 230 G4cout << "WARNING: G4eIonisationSpectrum::AverageEnergy " 231 << "parameter p[3] <= 0. G4LEDATA dabatase might be corrupted for Z = " 232 << Z << ". Please check and/or update it " << G4endl; 233 } 213 234 214 235 G4double val = AverageValue(x1, x2, p); … … 288 309 p.push_back((2.0*g - 1.0)/(g*g)); 289 310 290 p[iMax-1] = Function(p[3], p); 311 312 //Add protection against division by zero: actually in Function() 313 //parameter p[3] appears in the denominator. Bug report 1042 314 if (p[3] > 0) 315 p[iMax-1] = Function(p[3], p); 316 else 317 { 318 G4cout << "WARNING: G4eIonisationSpectrum::SampleSpectrum " 319 << "parameter p[3] <= 0. G4LEDATA dabatase might be corrupted for Z = " 320 << Z << ". Please check and/or update it " << G4endl; 321 } 291 322 292 323 G4double aria1 = 0.0;
Note: See TracChangeset
for help on using the changeset viewer.