Geant4  10.02.p03
G4Element Class Reference

#include <G4Element.hh>

Collaboration diagram for G4Element:

Public Member Functions

 G4Element (const G4String &name, const G4String &symbol, G4double Zeff, G4double Aeff)
 
 G4Element (const G4String &name, const G4String &symbol, G4int nbIsotopes)
 
void AddIsotope (G4Isotope *isotope, G4double RelativeAbundance)
 
virtual ~G4Element ()
 
const G4StringGetName () const
 
const G4StringGetSymbol () const
 
G4double GetZ () const
 
G4double GetN () const
 
G4double GetAtomicMassAmu () const
 
G4double GetA () const
 
G4bool GetNaturalAbundanceFlag () const
 
void SetNaturalAbundanceFlag (G4bool)
 
G4int GetNbOfAtomicShells () const
 
G4double GetAtomicShell (G4int index) const
 
G4int GetNbOfShellElectrons (G4int index) const
 
size_t GetNumberOfIsotopes () const
 
G4IsotopeVectorGetIsotopeVector () const
 
G4doubleGetRelativeAbundanceVector () const
 
const G4IsotopeGetIsotope (G4int iso) const
 
size_t GetIndex () const
 
G4double GetfCoulomb () const
 
G4double GetfRadTsai () const
 
G4IonisParamElmGetIonisation () const
 
G4int operator== (const G4Element &) const
 
G4int operator!= (const G4Element &) const
 
 G4Element (__void__ &)
 
void SetName (const G4String &name)
 

Static Public Member Functions

static G4ElementTableGetElementTable ()
 
static size_t GetNumberOfElements ()
 
static G4ElementGetElement (G4String name, G4bool warning=true)
 

Private Member Functions

 G4Element (G4Element &)
 
const G4Elementoperator= (const G4Element &)
 
void InitializePointers ()
 
void ComputeDerivedQuantities ()
 
void ComputeCoulombFactor ()
 
void ComputeLradTsaiFactor ()
 
void AddNaturalIsotopes ()
 

Private Attributes

G4String fName
 
G4String fSymbol
 
G4double fZeff
 
G4double fNeff
 
G4double fAeff
 
G4int fNbOfAtomicShells
 
G4doublefAtomicShells
 
G4intfNbOfShellElectrons
 
G4int fNumberOfIsotopes
 
G4IsotopeVectortheIsotopeVector
 
G4doublefRelativeAbundanceVector
 
size_t fIndexInTable
 
G4bool fNaturalAbundance
 
G4double fCoulomb
 
G4double fRadTsai
 
G4IonisParamElmfIonisation
 

Static Private Attributes

static G4ElementTable theElementTable
 

Friends

std::ostream & operator<< (std::ostream &, const G4Element *)
 
std::ostream & operator<< (std::ostream &, const G4Element &)
 
std::ostream & operator<< (std::ostream &, G4ElementTable)
 

Detailed Description

Definition at line 97 of file G4Element.hh.

Constructor & Destructor Documentation

◆ G4Element() [1/4]

G4Element::G4Element ( const G4String name,
const G4String symbol,
G4double  Zeff,
G4double  Aeff 
)

Definition at line 74 of file G4Element.cc.

76  : fName(name), fSymbol(symbol)
77 {
78  G4int iz = G4lrint(zeff);
79  if (iz < 1) {
81  ed << "Fail to create G4Element " << name
82  << " Z= " << zeff << " < 1 !";
83  G4Exception ("G4Element::G4Element()", "mat011", FatalException, ed);
84  }
85  if (std::abs(zeff - iz) > perMillion) {
87  ed << "G4Element Warning: " << name << " Z= " << zeff
88  << " A= " << aeff/(g/mole);
89  G4Exception("G4Element::G4Element()", "mat017", JustWarning, ed);
90  }
91 
93 
94  fZeff = zeff;
95  fAeff = aeff;
96  fNeff = fAeff/(g/mole);
97 
98  if(fNeff < 1.0) fNeff = 1.0;
99 
100  if (fNeff < zeff) {
102  ed << "Fail to create G4Element " << name
103  << " with Z= " << zeff << " N= " << fNeff
104  << " N < Z is not allowed" << G4endl;
105  G4Exception("G4Element::G4Element()", "mat012", FatalException, ed);
106  }
107 
111 
113 
114  for (G4int i=0;i<fNbOfAtomicShells;i++)
115  {
118  }
120 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void AddNaturalIsotopes()
Definition: G4Element.cc:323
G4int * fNbOfShellElectrons
Definition: G4Element.hh:242
G4double * fAtomicShells
Definition: G4Element.hh:241
int G4int
Definition: G4Types.hh:78
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
void InitializePointers()
Definition: G4Element.cc:219
static G4double GetBindingEnergy(G4int Z, G4int SubshellNb)
G4double iz
Definition: TRTMaterials.hh:39
G4String fSymbol
Definition: G4Element.hh:235
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4double fNeff
Definition: G4Element.hh:237
static const double perMillion
Definition: G4SIunits.hh:331
int G4lrint(double ad)
Definition: templates.hh:163
static G4int GetNumberOfElectrons(G4int Z, G4int SubshellNb)
G4String fName
Definition: G4Element.hh:234
static const double mole
Definition: G4SIunits.hh:283
#define G4endl
Definition: G4ios.hh:61
G4int fNbOfAtomicShells
Definition: G4Element.hh:240
G4double fZeff
Definition: G4Element.hh:236
double G4double
Definition: G4Types.hh:76
G4double fAeff
Definition: G4Element.hh:238
static G4int GetNumberOfShells(G4int Z)
void ComputeDerivedQuantities()
Definition: G4Element.cc:268
Here is the call graph for this function:
Here is the caller graph for this function:

◆ G4Element() [2/4]

G4Element::G4Element ( const G4String name,
const G4String symbol,
G4int  nbIsotopes 
)

Definition at line 127 of file G4Element.cc.

129  : fName(name),fSymbol(symbol)
130 {
132 
133  size_t n = size_t(nIsotopes);
134 
135  if(0 >= nIsotopes) {
137  ed << "Fail to create G4Element " << name
138  << " <" << symbol << "> with " << nIsotopes
139  << " isotopes";
140  G4Exception ("G4Element::G4Element()", "mat012", FatalException, ed);
141  } else {
143  fRelativeAbundanceVector = new G4double[nIsotopes];
144  }
145 }
std::vector< G4Isotope * > G4IsotopeVector
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
Char_t n[5]
void InitializePointers()
Definition: G4Element.cc:219
G4String fSymbol
Definition: G4Element.hh:235
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4String fName
Definition: G4Element.hh:234
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ ~G4Element()

G4Element::~G4Element ( )
virtual

Definition at line 252 of file G4Element.cc.

253 {
254  // G4cout << "### Destruction of element " << fName << " started" <<G4endl;
255 
256  if (theIsotopeVector) { delete theIsotopeVector; }
258  if (fAtomicShells) { delete [] fAtomicShells; }
259  if (fNbOfShellElectrons) { delete [] fNbOfShellElectrons; }
260  if (fIonisation) { delete fIonisation; }
261 
262  //remove this element from theElementTable
264 }
static G4ElementTable theElementTable
Definition: G4Element.hh:251
G4int * fNbOfShellElectrons
Definition: G4Element.hh:242
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
G4double * fAtomicShells
Definition: G4Element.hh:241
G4IonisParamElm * fIonisation
Definition: G4Element.hh:260
size_t fIndexInTable
Definition: G4Element.hh:252
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247

◆ G4Element() [3/4]

G4Element::G4Element ( __void__ &  )

Definition at line 244 of file G4Element.cc.

245  : fZeff(0), fNeff(0), fAeff(0)
246 {
248 }
void InitializePointers()
Definition: G4Element.cc:219
G4double fNeff
Definition: G4Element.hh:237
G4double fZeff
Definition: G4Element.hh:236
G4double fAeff
Definition: G4Element.hh:238
Here is the call graph for this function:

◆ G4Element() [4/4]

G4Element::G4Element ( G4Element right)
private

Definition at line 429 of file G4Element.cc.

430 {
432  *this = right;
433 
434  // Store this new element in table and set the index
435  theElementTable.push_back(this);
436  fIndexInTable = theElementTable.size() - 1;
437 }
static G4ElementTable theElementTable
Definition: G4Element.hh:251
void InitializePointers()
Definition: G4Element.cc:219
size_t fIndexInTable
Definition: G4Element.hh:252
Here is the call graph for this function:

Member Function Documentation

◆ AddIsotope()

void G4Element::AddIsotope ( G4Isotope isotope,
G4double  RelativeAbundance 
)

Definition at line 151 of file G4Element.cc.

152 {
153  if (theIsotopeVector == 0) {
155  ed << "Fail to add Isotope to G4Element " << fName
156  << " with Z= " << fZeff << " N= " << fNeff;
157  G4Exception ("G4Element::AddIsotope()", "mat013", FatalException, ed);
158  return;
159  }
160  G4int iz = isotope->GetZ();
161 
162  // filling ...
163  if ( fNumberOfIsotopes < (G4int)theIsotopeVector->size() ) {
164  // check same Z
165  if (fNumberOfIsotopes==0) { fZeff = G4double(iz); }
166  else if (G4double(iz) != fZeff) {
168  ed << "Fail to add Isotope Z= " << iz << " to G4Element " << fName
169  << " with different Z= " << fZeff << fNeff;
170  G4Exception ("G4Element::AddIsotope()", "mat014", FatalException, ed);
171  return;
172  }
173  //Z ok
175  (*theIsotopeVector)[fNumberOfIsotopes] = isotope;
177 
178  } else {
180  ed << "Fail to add Isotope Z= " << iz << " to G4Element " << fName
181  << " - more isotopes than declaired ";
182  G4Exception ("G4Element::AddIsotope()", "mat015", FatalException, ed);
183  return;
184  }
185 
186  // filled.
187  if ( fNumberOfIsotopes == (G4int)theIsotopeVector->size() ) {
188  G4double wtSum=0.0;
189  fAeff = 0.0;
190  for (G4int i=0; i<fNumberOfIsotopes; i++) {
191  fAeff += fRelativeAbundanceVector[i]*(*theIsotopeVector)[i]->GetA();
192  wtSum += fRelativeAbundanceVector[i];
193  }
194  if(wtSum > 0.0) { fAeff /= wtSum; }
195  fNeff = fAeff/(g/mole);
196 
197  if(wtSum != 1.0) {
198  for(G4int i=0; i<fNumberOfIsotopes; ++i) {
199  fRelativeAbundanceVector[i] /= wtSum;
200  }
201  }
202 
206 
207  for ( G4int j = 0; j < fNbOfAtomicShells; j++ )
208  {
211  }
213 
214  }
215 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4int * fNbOfShellElectrons
Definition: G4Element.hh:242
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
G4double * fAtomicShells
Definition: G4Element.hh:241
int G4int
Definition: G4Types.hh:78
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
static G4double GetBindingEnergy(G4int Z, G4int SubshellNb)
G4double iz
Definition: TRTMaterials.hh:39
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4int fNumberOfIsotopes
Definition: G4Element.hh:245
G4double fNeff
Definition: G4Element.hh:237
static G4int GetNumberOfElectrons(G4int Z, G4int SubshellNb)
G4String fName
Definition: G4Element.hh:234
static const double mole
Definition: G4SIunits.hh:283
G4int fNbOfAtomicShells
Definition: G4Element.hh:240
G4double fZeff
Definition: G4Element.hh:236
G4int GetZ() const
Definition: G4Isotope.hh:91
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247
double G4double
Definition: G4Types.hh:76
G4double fAeff
Definition: G4Element.hh:238
static G4int GetNumberOfShells(G4int Z)
void ComputeDerivedQuantities()
Definition: G4Element.cc:268
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddNaturalIsotopes()

void G4Element::AddNaturalIsotopes ( )
private

Definition at line 323 of file G4Element.cc.

324 {
325  G4int Z = G4lrint(fZeff);
327  G4int n = nist->GetNumberOfNistIsotopes(Z);
328  G4int N0 = nist->GetNistFirstIsotopeN(Z);
329 
330  if("" == fSymbol) {
331  const std::vector<G4String> elmnames =
333  if(Z < (G4int)elmnames.size()) { fSymbol = elmnames[Z]; }
334  else { fSymbol = fName; }
335  }
336 
337  fNumberOfIsotopes = 0;
338  for(G4int i=0; i<n; ++i) {
339  if(nist->GetIsotopeAbundance(Z, N0+i) > 0.0) { ++fNumberOfIsotopes; }
340  }
341  theIsotopeVector = new G4IsotopeVector((unsigned int)fNumberOfIsotopes,0);
343  G4int idx = 0;
344  G4double xsum = 0.0;
345  for(G4int i=0; i<n; ++i) {
346  G4int N = N0 + i;
347  G4double x = nist->GetIsotopeAbundance(Z, N);
348  if(x > 0.0) {
349  std::ostringstream strm;
350  strm << fSymbol << N;
351  (*theIsotopeVector)[idx] = new G4Isotope(strm.str(), Z, N, 0.0, 0);
353  xsum += x;
354  ++idx;
355  }
356  }
357  if(xsum != 0.0 && xsum != 1.0) {
358  for(G4int i=0; i<idx; ++i) { fRelativeAbundanceVector[i] /= xsum; }
359  }
360  fNaturalAbundance = true;
361 }
G4int GetNistFirstIsotopeN(G4int Z) const
std::vector< G4Isotope * > G4IsotopeVector
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
G4double GetIsotopeAbundance(G4int Z, G4int N) const
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
G4bool fNaturalAbundance
Definition: G4Element.hh:253
Char_t n[5]
Float_t Z
G4String fSymbol
Definition: G4Element.hh:235
G4int fNumberOfIsotopes
Definition: G4Element.hh:245
int G4lrint(double ad)
Definition: templates.hh:163
G4String fName
Definition: G4Element.hh:234
const std::vector< G4String > & GetNistElementNames() const
**D E S C R I P T I O N
G4double fZeff
Definition: G4Element.hh:236
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247
double G4double
Definition: G4Types.hh:76
G4int GetNumberOfNistIsotopes(G4int Z) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeCoulombFactor()

void G4Element::ComputeCoulombFactor ( )
private

Definition at line 287 of file G4Element.cc.

288 {
289  //
290  // Compute Coulomb correction factor (Phys Rev. D50 3-1 (1994) page 1254)
291 
292  static const G4double k1 = 0.0083 , k2 = 0.20206 ,k3 = 0.0020 , k4 = 0.0369 ;
293 
295  G4double az4 = az2 * az2;
296 
297  fCoulomb = (k1*az4 + k2 + 1./(1.+az2))*az2 - (k3*az4 + k4)*az4;
298 }
G4double fCoulomb
Definition: G4Element.hh:258
int fine_structure_const
Definition: hepunit.py:287
G4double fZeff
Definition: G4Element.hh:236
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ ComputeDerivedQuantities()

void G4Element::ComputeDerivedQuantities ( )
private

Definition at line 268 of file G4Element.cc.

269 {
270  // some basic functions of the atomic number
271 
272  // Store in table
273  theElementTable.push_back(this);
274  fIndexInTable = theElementTable.size() - 1;
275 
276  // Radiation Length
279 
280  // parameters for energy loss by ionisation
281  if (fIonisation) { delete fIonisation; }
283 }
void ComputeCoulombFactor()
Definition: G4Element.cc:287
static G4ElementTable theElementTable
Definition: G4Element.hh:251
G4IonisParamElm * fIonisation
Definition: G4Element.hh:260
void ComputeLradTsaiFactor()
Definition: G4Element.cc:302
size_t fIndexInTable
Definition: G4Element.hh:252
G4double fZeff
Definition: G4Element.hh:236
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeLradTsaiFactor()

void G4Element::ComputeLradTsaiFactor ( )
private

Definition at line 302 of file G4Element.cc.

303 {
304  //
305  // Compute Tsai's Expression for the Radiation Length
306  // (Phys Rev. D50 3-1 (1994) page 1254)
307 
308  static const G4double Lrad_light[] = {5.31 , 4.79 , 4.74 , 4.71} ;
309  static const G4double Lprad_light[] = {6.144 , 5.621 , 5.805 , 5.924} ;
310 
311  const G4double logZ3 = std::log(fZeff)/3.;
312 
313  G4double Lrad, Lprad;
314  G4int iz = (G4int)(fZeff+0.5) - 1 ;
315  if (iz <= 3) { Lrad = Lrad_light[iz] ; Lprad = Lprad_light[iz] ; }
316  else { Lrad = std::log(184.15) - logZ3 ; Lprad = std::log(1194.) - 2*logZ3;}
317 
318  fRadTsai = 4*alpha_rcl2*fZeff*(fZeff*(Lrad-fCoulomb) + Lprad);
319 }
G4double fRadTsai
Definition: G4Element.hh:259
G4double fCoulomb
Definition: G4Element.hh:258
int G4int
Definition: G4Types.hh:78
G4double iz
Definition: TRTMaterials.hh:39
int alpha_rcl2
Definition: hepunit.py:292
G4double fZeff
Definition: G4Element.hh:236
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ GetA()

G4double G4Element::GetA ( ) const
inline

Definition at line 138 of file G4Element.hh.

138 {return fAeff;}
G4double fAeff
Definition: G4Element.hh:238
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAtomicMassAmu()

G4double G4Element::GetAtomicMassAmu ( ) const
inline

Definition at line 135 of file G4Element.hh.

135 {return fNeff;}
G4double fNeff
Definition: G4Element.hh:237

◆ GetAtomicShell()

G4double G4Element::GetAtomicShell ( G4int  index) const

Definition at line 365 of file G4Element.cc.

366 {
367  if (i<0 || i>=fNbOfAtomicShells) {
369  ed << "Invalid argument " << i << " in for G4Element " << fName
370  << " with Z= " << fZeff
371  << " and Nshells= " << fNbOfAtomicShells;
372  G4Exception("G4Element::GetAtomicShell()", "mat016", FatalException, ed);
373  return 0.0;
374  }
375  return fAtomicShells[i];
376 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4double * fAtomicShells
Definition: G4Element.hh:241
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4String fName
Definition: G4Element.hh:234
G4int fNbOfAtomicShells
Definition: G4Element.hh:240
G4double fZeff
Definition: G4Element.hh:236
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElement()

G4Element * G4Element::GetElement ( G4String  name,
G4bool  warning = true 
)
static

Definition at line 409 of file G4Element.cc.

410 {
411  // search the element by its name
412  for (size_t J=0 ; J<theElementTable.size() ; J++)
413  {
414  if (theElementTable[J]->GetName() == elementName)
415  return theElementTable[J];
416  }
417 
418  // the element does not exist in the table
419  if (warning) {
420  G4cout << "\n---> warning from G4Element::GetElement(). The element: "
421  << elementName << " does not exist in the table. Return NULL pointer."
422  << G4endl;
423  }
424  return 0;
425 }
static G4ElementTable theElementTable
Definition: G4Element.hh:251
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
Definition: G4Element.hh:127
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElementTable()

G4ElementTable * G4Element::GetElementTable ( )
static

Definition at line 395 of file G4Element.cc.

396 {
397  return &theElementTable;
398 }
static G4ElementTable theElementTable
Definition: G4Element.hh:251
Here is the caller graph for this function:

◆ GetfCoulomb()

G4double G4Element::GetfCoulomb ( ) const
inline

Definition at line 190 of file G4Element.hh.

190 {return fCoulomb;}
G4double fCoulomb
Definition: G4Element.hh:258
Here is the caller graph for this function:

◆ GetfRadTsai()

G4double G4Element::GetfRadTsai ( ) const
inline

Definition at line 194 of file G4Element.hh.

194 {return fRadTsai;}
G4double fRadTsai
Definition: G4Element.hh:259
Here is the caller graph for this function:

◆ GetIndex()

size_t G4Element::GetIndex ( ) const
inline

Definition at line 181 of file G4Element.hh.

181 {return fIndexInTable;}
size_t fIndexInTable
Definition: G4Element.hh:252
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetIonisation()

G4IonisParamElm* G4Element::GetIonisation ( ) const
inline

Definition at line 198 of file G4Element.hh.

198 {return fIonisation;}
G4IonisParamElm * fIonisation
Definition: G4Element.hh:260
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetIsotope()

const G4Isotope* G4Element::GetIsotope ( G4int  iso) const
inline

Definition at line 169 of file G4Element.hh.

170  {return (*theIsotopeVector)[iso];}
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetIsotopeVector()

G4IsotopeVector* G4Element::GetIsotopeVector ( ) const
inline

Definition at line 162 of file G4Element.hh.

162 {return theIsotopeVector;}
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
Here is the caller graph for this function:

◆ GetN()

G4double G4Element::GetN ( ) const
inline

Definition at line 134 of file G4Element.hh.

134 {return fNeff;}
G4double fNeff
Definition: G4Element.hh:237
Here is the caller graph for this function:

◆ GetName()

const G4String& G4Element::GetName ( void  ) const
inline

Definition at line 127 of file G4Element.hh.

127 {return fName;}
G4String fName
Definition: G4Element.hh:234
Here is the caller graph for this function:

◆ GetNaturalAbundanceFlag()

G4bool G4Element::GetNaturalAbundanceFlag ( ) const
inline

Definition at line 263 of file G4Element.hh.

264 {
265  return fNaturalAbundance;
266 }
G4bool fNaturalAbundance
Definition: G4Element.hh:253
Here is the caller graph for this function:

◆ GetNbOfAtomicShells()

G4int G4Element::GetNbOfAtomicShells ( ) const
inline

Definition at line 146 of file G4Element.hh.

146 {return fNbOfAtomicShells;}
G4int fNbOfAtomicShells
Definition: G4Element.hh:240
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNbOfShellElectrons()

G4int G4Element::GetNbOfShellElectrons ( G4int  index) const

Definition at line 380 of file G4Element.cc.

381 {
382  if (i<0 || i>=fNbOfAtomicShells) {
384  ed << "Invalid argument " << i << " for G4Element " << fName
385  << " with Z= " << fZeff
386  << " and Nshells= " << fNbOfAtomicShells;
387  G4Exception("G4Element::GetNbOfShellElectrons()", "mat016", FatalException, ed);
388  return 0;
389  }
390  return fNbOfShellElectrons[i];
391 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4int * fNbOfShellElectrons
Definition: G4Element.hh:242
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4String fName
Definition: G4Element.hh:234
G4int fNbOfAtomicShells
Definition: G4Element.hh:240
G4double fZeff
Definition: G4Element.hh:236
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNumberOfElements()

size_t G4Element::GetNumberOfElements ( )
static

Definition at line 402 of file G4Element.cc.

403 {
404  return theElementTable.size();
405 }
static G4ElementTable theElementTable
Definition: G4Element.hh:251
Here is the caller graph for this function:

◆ GetNumberOfIsotopes()

size_t G4Element::GetNumberOfIsotopes ( ) const
inline

Definition at line 158 of file G4Element.hh.

158 {return fNumberOfIsotopes;}
G4int fNumberOfIsotopes
Definition: G4Element.hh:245
Here is the caller graph for this function:

◆ GetRelativeAbundanceVector()

G4double* G4Element::GetRelativeAbundanceVector ( ) const
inline

Definition at line 166 of file G4Element.hh.

167  {return fRelativeAbundanceVector;}
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247
Here is the caller graph for this function:

◆ GetSymbol()

const G4String& G4Element::GetSymbol ( ) const
inline

Definition at line 128 of file G4Element.hh.

128 {return fSymbol;}
G4String fSymbol
Definition: G4Element.hh:235
Here is the caller graph for this function:

◆ GetZ()

G4double G4Element::GetZ ( ) const
inline

Definition at line 131 of file G4Element.hh.

131 {return fZeff;}
G4double fZeff
Definition: G4Element.hh:236

◆ InitializePointers()

void G4Element::InitializePointers ( )
private

Definition at line 219 of file G4Element.cc.

220 {
221  theIsotopeVector = 0;
223  fAtomicShells = 0;
225  fIonisation = 0;
226  fNumberOfIsotopes = 0;
227  fNaturalAbundance = false;
228 
229  // add initialisation of all remaining members
230  fZeff = 0;
231  fNeff = 0;
232  fAeff = 0;
233  fNbOfAtomicShells = 0;
234  fIndexInTable = 0;
235  fCoulomb = 0.0;
236  fRadTsai = 0.0;
237 }
G4double fRadTsai
Definition: G4Element.hh:259
G4double fCoulomb
Definition: G4Element.hh:258
G4int * fNbOfShellElectrons
Definition: G4Element.hh:242
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
G4double * fAtomicShells
Definition: G4Element.hh:241
G4IonisParamElm * fIonisation
Definition: G4Element.hh:260
G4bool fNaturalAbundance
Definition: G4Element.hh:253
G4int fNumberOfIsotopes
Definition: G4Element.hh:245
G4double fNeff
Definition: G4Element.hh:237
size_t fIndexInTable
Definition: G4Element.hh:252
G4int fNbOfAtomicShells
Definition: G4Element.hh:240
G4double fZeff
Definition: G4Element.hh:236
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247
G4double fAeff
Definition: G4Element.hh:238
Here is the caller graph for this function:

◆ operator!=()

G4int G4Element::operator!= ( const G4Element right) const

Definition at line 492 of file G4Element.cc.

493 {
494  return (this != (G4Element*) &right);
495 }
Here is the caller graph for this function:

◆ operator=()

const G4Element & G4Element::operator= ( const G4Element right)
private

Definition at line 441 of file G4Element.cc.

442 {
443  if (this != &right)
444  {
445  fName = right.fName;
446  fSymbol = right.fSymbol;
447  fZeff = right.fZeff;
448  fNeff = right.fNeff;
449  fAeff = right.fAeff;
450 
451  if (fAtomicShells) delete [] fAtomicShells;
454 
458 
459  for ( G4int i = 0; i < fNbOfAtomicShells; i++ )
460  {
461  fAtomicShells[i] = right.fAtomicShells[i];
463  }
466 
468  if (fNumberOfIsotopes > 0)
469  {
470  theIsotopeVector = new G4IsotopeVector((unsigned int)fNumberOfIsotopes,0);
472  for (G4int i=0;i<fNumberOfIsotopes;i++)
473  {
474  (*theIsotopeVector)[i] = (*right.theIsotopeVector)[i];
476  }
477  }
479  }
480  return *this;
481 }
std::vector< G4Isotope * > G4IsotopeVector
G4int * fNbOfShellElectrons
Definition: G4Element.hh:242
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
G4double * fAtomicShells
Definition: G4Element.hh:241
int G4int
Definition: G4Types.hh:78
G4String fSymbol
Definition: G4Element.hh:235
G4int fNumberOfIsotopes
Definition: G4Element.hh:245
G4double fNeff
Definition: G4Element.hh:237
G4String fName
Definition: G4Element.hh:234
G4int fNbOfAtomicShells
Definition: G4Element.hh:240
G4double fZeff
Definition: G4Element.hh:236
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247
double G4double
Definition: G4Types.hh:76
G4double fAeff
Definition: G4Element.hh:238
void ComputeDerivedQuantities()
Definition: G4Element.cc:268
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator==()

G4int G4Element::operator== ( const G4Element right) const

Definition at line 485 of file G4Element.cc.

486 {
487  return (this == (G4Element*) &right);
488 }
Here is the caller graph for this function:

◆ SetName()

void G4Element::SetName ( const G4String name)
inline

Definition at line 216 of file G4Element.hh.

216 {fName=name;}
G4String name
Definition: TRTMaterials.hh:40
G4String fName
Definition: G4Element.hh:234
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNaturalAbundanceFlag()

void G4Element::SetNaturalAbundanceFlag ( G4bool  val)
inline

Definition at line 268 of file G4Element.hh.

269 {
270  fNaturalAbundance = val;
271 }
G4bool fNaturalAbundance
Definition: G4Element.hh:253
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<< [1/3]

std::ostream& operator<< ( std::ostream &  flux,
const G4Element element 
)
friend

Definition at line 499 of file G4Element.cc.

500 {
501  std::ios::fmtflags mode = flux.flags();
502  flux.setf(std::ios::fixed,std::ios::floatfield);
503  G4long prec = flux.precision(3);
504 
505  flux
506  << " Element: " << element->fName << " (" << element->fSymbol << ")"
507  << " Z = " << std::setw(4) << std::setprecision(1) << element->fZeff
508  << " N = " << std::setw(5) << std::setprecision(1) << G4lrint(element->fNeff)
509  << " A = " << std::setw(6) << std::setprecision(3)
510  << (element->fAeff)/(g/mole) << " g/mole";
511 
512  for (G4int i=0; i<element->fNumberOfIsotopes; i++)
513  flux
514  << "\n ---> " << (*(element->theIsotopeVector))[i]
515  << " abundance: " << std::setw(6) << std::setprecision(3)
516  << (element->fRelativeAbundanceVector[i])/perCent << " %";
517 
518  flux.precision(prec);
519  flux.setf(mode,std::ios::floatfield);
520  return flux;
521 }
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
long G4long
Definition: G4Types.hh:80
int G4int
Definition: G4Types.hh:78
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
static const double prec
Definition: RanecuEngine.cc:58
static const double perCent
Definition: G4SIunits.hh:329
G4String fSymbol
Definition: G4Element.hh:235
G4int fNumberOfIsotopes
Definition: G4Element.hh:245
G4double fNeff
Definition: G4Element.hh:237
int G4lrint(double ad)
Definition: templates.hh:163
G4String fName
Definition: G4Element.hh:234
static const double mole
Definition: G4SIunits.hh:283
G4double fZeff
Definition: G4Element.hh:236
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247
G4double fAeff
Definition: G4Element.hh:238

◆ operator<< [2/3]

std::ostream& operator<< ( std::ostream &  flux,
const G4Element element 
)
friend

Definition at line 525 of file G4Element.cc.

526 {
527  flux << &element;
528  return flux;
529 }

◆ operator<< [3/3]

std::ostream& operator<< ( std::ostream &  flux,
G4ElementTable  ElementTable 
)
friend

Definition at line 533 of file G4Element.cc.

534 {
535  //Dump info for all known elements
536  flux << "\n***** Table : Nb of elements = " << ElementTable.size()
537  << " *****\n" << G4endl;
538 
539  for (size_t i=0; i<ElementTable.size(); i++) flux << ElementTable[i]
540  << G4endl << G4endl;
541 
542  return flux;
543 }
#define G4endl
Definition: G4ios.hh:61

Member Data Documentation

◆ fAeff

G4double G4Element::fAeff
private

Definition at line 238 of file G4Element.hh.

◆ fAtomicShells

G4double* G4Element::fAtomicShells
private

Definition at line 241 of file G4Element.hh.

◆ fCoulomb

G4double G4Element::fCoulomb
private

Definition at line 258 of file G4Element.hh.

◆ fIndexInTable

size_t G4Element::fIndexInTable
private

Definition at line 252 of file G4Element.hh.

◆ fIonisation

G4IonisParamElm* G4Element::fIonisation
private

Definition at line 260 of file G4Element.hh.

◆ fName

G4String G4Element::fName
private

Definition at line 234 of file G4Element.hh.

◆ fNaturalAbundance

G4bool G4Element::fNaturalAbundance
private

Definition at line 253 of file G4Element.hh.

◆ fNbOfAtomicShells

G4int G4Element::fNbOfAtomicShells
private

Definition at line 240 of file G4Element.hh.

◆ fNbOfShellElectrons

G4int* G4Element::fNbOfShellElectrons
private

Definition at line 242 of file G4Element.hh.

◆ fNeff

G4double G4Element::fNeff
private

Definition at line 237 of file G4Element.hh.

◆ fNumberOfIsotopes

G4int G4Element::fNumberOfIsotopes
private

Definition at line 245 of file G4Element.hh.

◆ fRadTsai

G4double G4Element::fRadTsai
private

Definition at line 259 of file G4Element.hh.

◆ fRelativeAbundanceVector

G4double* G4Element::fRelativeAbundanceVector
private

Definition at line 247 of file G4Element.hh.

◆ fSymbol

G4String G4Element::fSymbol
private

Definition at line 235 of file G4Element.hh.

◆ fZeff

G4double G4Element::fZeff
private

Definition at line 236 of file G4Element.hh.

◆ theElementTable

G4ElementTable G4Element::theElementTable
staticprivate

Definition at line 251 of file G4Element.hh.

◆ theIsotopeVector

G4IsotopeVector* G4Element::theIsotopeVector
private

Definition at line 246 of file G4Element.hh.


The documentation for this class was generated from the following files: