48const G4double G4IsotopeMagneticMomentTable::levelTolerance = 0.001;
51const G4double G4IsotopeMagneticMomentTable::nuclearMagneton = eplus*hbar_Planck/2./(proton_mass_c2 /c_squared);
58 if ( !getenv(
"G4IONMAGNETICMOMENT")) {
60 if (GetVerboseLevel()>1) {
61 G4cout <<
"G4IsotopeMagneticMomentTable::G4IsotopeMagneticMomentTable(): "
62 <<
"Please setenv G4IONMAGNETICMOMENT for the magnetic moment data."
67 "Please setenv G4IONMAGNETICMOMENT");
73 "Please setenv G4IONMAGNETICMOMENT");
77 G4String file = getenv(
"G4IONMAGNETICMOMENT");
78 std::ifstream DataFile(file);
82 if (GetVerboseLevel()>0) {
83 G4cout <<
"G4IsotopeMagneticMomentTable::G4IsotopeMagneticMomentTable(): "
84 << file <<
" is not found " <<
G4endl;
90 "Can not open G4IONMAGNETICMOMENT file");
94 char inputChars[80]={
' '};
96 while ( !DataFile.eof() ) {
97 DataFile.getline(inputChars, 80);
99 G4int ionA, ionZ, ionJ;
103 if (inputChars[0] !=
'#' && inputLine.length() != 0) {
104 std::istringstream tmpstream(inputLine);
105 tmpstream >> ionZ >> ionName >> ionA >> ionE
106 >> ionLife >> ionLifeUnit
117 fIsotopeList.push_back(fProperty);
132 for (
size_t i = 0 ; i< fIsotopeList.size(); i++) {
133 delete fIsotopeList[i];
135 fIsotopeList.clear();
154 for (
size_t i = 0 ; i< fIsotopeList.size(); ++i) {
187 for (
size_t i = 0 ; i< fIsotopeList.size(); ++i) {
G4DLLIMPORT std::ostream G4cout
G4IsotopeMagneticMomentTable()
virtual G4bool FindIsotope(G4IsotopeProperty *property)
G4IsotopeMagneticMomentTable & operator=(const G4IsotopeMagneticMomentTable &right)
virtual ~G4IsotopeMagneticMomentTable()
virtual G4IsotopeProperty * GetIsotope(G4int Z, G4int A, G4double E)
void SetAtomicMass(G4int A)
void SetEnergy(G4double E)
void SetAtomicNumber(G4int Z)
G4double GetEnergy() const
G4int GetAtomicMass() const
G4int GetAtomicNumber() const
void SetMagneticMoment(G4double M)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)