Problem 832 - Unsupported Z (atomic number) for G4StableIsotopes
Summary: Unsupported Z (atomic number) for G4StableIsotopes
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/management (show other problems)
Version: 7.1
Hardware: PC Linux
: P2 normal
Assignee: dennis.herbert.wright
URL:
Depends on:
Blocks:
 
Reported: 2006-01-17 07:16 CET by nanjo
Modified: 2006-03-13 16:54 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description nanjo 2006-01-17 07:16:56 CET
The member functions of G4StableIsotopes class such as
G4StableIsotopes::GetNumberOfIsotopes(G4int Z) take an argument of an atomic
number , Z. The maximum atomic number allowed is  obviously Z=92 according to
the source code but there is no protection against a larger value of Z.

This function is used in  G4HadronicProcess::ChooseAandZ(...) as follows.

217       G4double * running = new G4double[theIso.GetNumberOfIsotopes(localZ)];
     218       for (i=0; i<theIso.GetNumberOfIsotopes(localZ); i++)
     219       {
     220         G4double
fracInPercent=theIso.GetAbundance(theIso.GetFirstIsotope(localZ)+i);
     221         G4double
runningA=theIso.GetIsotopeNucleonCount(theIso.GetFirstIsotope(localZ)+i);
     222         running[i]=fracInPercent*std::pow(runningA, 2./3.);
     223         // rough approximation; to get it better, redesign getMSC to
not use G4Element, see also below
     224         if(i!=0) running[i] += running[i-1];
     225       }
     226       G4double trial = G4UniformRand();
     227       G4double sum = running[theIso.GetNumberOfIsotopes(localZ)-1];
     228       for(i=0; i<theIso.GetNumberOfIsotopes(localZ); i++)
     229       {
     230         currentN =
theIso.GetIsotopeNucleonCount(theIso.GetFirstIsotope(localZ)+i);
     231         if(running[i]/sum>trial) break;
     232       }
     233       delete [] running;
     234     }
     235     targetNucleus.SetParameters(currentN, currentZ);
Here, a bad value of currentN makes G4Exception.
Could you add some protection in G4StableIsotopes and add some treatment for
Z>92  in G4HadronicProcess::ChooseAandZ(...) ?

Best regards,
Hajiem Nanjo

         High Energy Physics, Department of Physics, Kyoto University,
                             Hajime Nanjo
Comment 1 dennis.herbert.wright 2006-03-13 16:54:59 CET
Currently, there is no isotope with Z > 92 in our tables.  Until such entries are
created, G4HadronicProcess will test for Z > 92 and throw a G4Exception (fatal)
whenever this is the case.