Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4IonTable Class Reference

#include <G4IonTable.hh>

Collaboration diagram for G4IonTable:

Public Types

enum  { numberOfElements = 118 }
 
typedef std::multimap< G4int,
const G4ParticleDefinition * > 
G4IonList
 
typedef std::multimap< G4int,
const G4ParticleDefinition * >
::iterator 
G4IonListIterator
 

Public Member Functions

 G4IonTable ()
 
void SlaveG4IonTable ()
 
void WorkerG4IonTable ()
 
virtual ~G4IonTable ()
 
void DestroyWorkerG4IonTable ()
 
G4int GetNumberOfElements () const
 
void RegisterIsotopeTable (G4VIsotopeTable *table)
 
G4VIsotopeTableGetIsotopeTable (size_t idx=0) const
 
void CreateAllIon ()
 
void CreateAllIsomer ()
 
void PrepareNuclideTable ()
 
void PreloadNuclide ()
 
G4ParticleDefinitionGetIon (G4int Z, G4int A, G4int lvl=0)
 
G4ParticleDefinitionGetIon (G4int Z, G4int A, G4int L, G4int lvl)
 
G4ParticleDefinitionGetIon (G4int Z, G4int A, G4double E, G4int J=0)
 
G4ParticleDefinitionGetIon (G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb, G4int J=0)
 
G4ParticleDefinitionGetIon (G4int Z, G4int A, G4double E, char flbChar, G4int J=0)
 
G4ParticleDefinitionGetIon (G4int Z, G4int A, G4int L, G4double E, G4int J=0)
 
G4ParticleDefinitionGetIon (G4int Z, G4int A, G4int L, G4double E, G4Ions::G4FloatLevelBase flb, G4int J=0)
 
G4ParticleDefinitionGetIon (G4int Z, G4int A, G4int L, G4double E, char flbChar, G4int J=0)
 
G4ParticleDefinitionGetIon (G4int encoding)
 
G4ParticleDefinitionFindIon (G4int Z, G4int A, G4int lvl=0)
 
G4ParticleDefinitionFindIon (G4int Z, G4int A, G4int L, G4int lvl)
 
G4ParticleDefinitionFindIon (G4int Z, G4int A, G4double E, G4int J=0)
 
G4ParticleDefinitionFindIon (G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb, G4int J=0)
 
G4ParticleDefinitionFindIon (G4int Z, G4int A, G4double E, char flbChar, G4int J=0)
 
G4ParticleDefinitionFindIon (G4int Z, G4int A, G4int L, G4double E, G4int J=0)
 
G4ParticleDefinitionFindIon (G4int Z, G4int A, G4int L, G4double E, G4Ions::G4FloatLevelBase flb, G4int J=0)
 
G4ParticleDefinitionFindIon (G4int Z, G4int A, G4int L, G4double E, char flbChar, G4int J=0)
 
const G4StringGetIonName (G4int Z, G4int A, G4int lvl=0) const
 
const G4StringGetIonName (G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float) const
 
const G4StringGetIonName (G4int Z, G4int A, G4int L, G4double E, G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float) const
 
const G4StringGetIonName (G4int Z, G4int A, G4int L, G4int lvl) const
 
G4double GetIonMass (G4int Z, G4int A, G4int L=0, G4int lvl=0) const
 
G4double GetNucleusMass (G4int Z, G4int A, G4int L=0, G4int lvl=0) const
 
G4double GetIsomerMass (G4int Z, G4int A, G4int lvl=0) const
 
G4double GetLifeTime (const G4ParticleDefinition *) const
 
G4double GetLifeTime (G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float) const
 
G4double GetLifeTime (G4int Z, G4int A, G4double E, char flbChar) const
 
G4int Entries () const
 
G4ParticleDefinitionGetParticle (G4int index) const
 
G4bool Contains (const G4ParticleDefinition *particle) const
 
void Insert (const G4ParticleDefinition *particle)
 
void Remove (const G4ParticleDefinition *particle)
 
void clear ()
 
G4int size () const
 
void DumpTable (const G4String &particle_name="ALL") const
 
void InitializeLightIons ()
 
G4ParticleDefinitionGetMuonicAtom (G4Ions const *)
 
G4ParticleDefinitionGetMuonicAtom (G4int Z, G4int A)
 

Static Public Member Functions

static G4IonTableGetIonTable ()
 
static G4bool IsIon (const G4ParticleDefinition *)
 
static G4bool IsAntiIon (const G4ParticleDefinition *)
 
static G4int GetNucleusEncoding (G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
 
static G4int GetNucleusEncoding (G4int Z, G4int A, G4int L, G4double E=0.0, G4int lvl=0)
 
static G4bool GetNucleusByEncoding (G4int encoding, G4int &Z, G4int &A, G4double &E, G4int &lvl)
 
static G4bool GetNucleusByEncoding (G4int encoding, G4int &Z, G4int &A, G4int &L, G4double &E, G4int &lvl)
 

Static Public Attributes

static G4ThreadLocal G4IonListfIonList = 0
 
static G4ThreadLocal
std::vector< G4VIsotopeTable * > * 
fIsotopeTableList = 0
 
static G4IonListfIonListShadow = 0
 
static std::vector
< G4VIsotopeTable * > * 
fIsotopeTableListShadow = 0
 
static const G4String elementName [numberOfElements]
 

Protected Member Functions

 G4IonTable (const G4IonTable &right)
 
G4IonTableoperator= (const G4IonTable &)
 
G4ParticleDefinitionFindIonInMaster (G4int Z, G4int A, G4int lvl=0)
 
G4ParticleDefinitionFindIonInMaster (G4int Z, G4int A, G4int L, G4int lvl)
 
G4ParticleDefinitionFindIonInMaster (G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb, G4int J=0)
 
G4ParticleDefinitionFindIonInMaster (G4int Z, G4int A, G4int L, G4double E, G4Ions::G4FloatLevelBase flb, G4int J=0)
 
G4ParticleDefinitionCreateIon (G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb)
 
G4ParticleDefinitionCreateIon (G4int Z, G4int A, G4int L, G4double E, G4Ions::G4FloatLevelBase flb)
 
G4ParticleDefinitionCreateIon (G4int Z, G4int A, G4int lvl=0)
 
G4ParticleDefinitionCreateIon (G4int Z, G4int A, G4int L, G4int lvl)
 
void InsertWorker (const G4ParticleDefinition *particle)
 
G4IsotopePropertyFindIsotope (G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb) const
 
G4IsotopePropertyFindIsotope (G4int Z, G4int A, G4int lvl) const
 
G4ParticleDefinitionGetLightIon (G4int Z, G4int A) const
 
G4ParticleDefinitionGetLightAntiIon (G4int Z, G4int A) const
 
G4bool IsLightIon (const G4ParticleDefinition *) const
 
G4bool IsLightAntiIon (const G4ParticleDefinition *) const
 
void AddProcessManager (G4ParticleDefinition *)
 
G4int GetVerboseLevel () const
 

Detailed Description

Definition at line 65 of file G4IonTable.hh.

Member Typedef Documentation

typedef std::multimap<G4int, const G4ParticleDefinition*> G4IonTable::G4IonList

Definition at line 74 of file G4IonTable.hh.

typedef std::multimap<G4int, const G4ParticleDefinition*>::iterator G4IonTable::G4IonListIterator

Definition at line 75 of file G4IonTable.hh.

Member Enumeration Documentation

anonymous enum
Enumerator
numberOfElements 

Definition at line 327 of file G4IonTable.hh.

Constructor & Destructor Documentation

G4IonTable::G4IonTable ( )

Definition at line 121 of file G4IonTable.cc.

122  : pNuclideTable(0),
123  isIsomerCreated(false),
124  n_error(0)
125 {
126  fIonList = new G4IonList();
127 
128  // Set up the shadow pointer used by worker threads.
129  //
130  if (fIonListShadow == 0)
131  {
133  }
134 
135  fIsotopeTableList = new std::vector<G4VIsotopeTable*>;
136 
137  // Set up the shadow pointer used by worker threads.
138  //
139  if (fIsotopeTableListShadow == 0)
140  {
142  }
143 
145  RegisterIsotopeTable(pNuclideTable);
146 }
void RegisterIsotopeTable(G4VIsotopeTable *table)
Definition: G4IonTable.cc:1543
static std::vector< G4VIsotopeTable * > * fIsotopeTableListShadow
Definition: G4IonTable.hh:319
void PrepareNuclideTable()
Definition: G4IonTable.cc:1618
static G4ThreadLocal std::vector< G4VIsotopeTable * > * fIsotopeTableList
Definition: G4IonTable.hh:317
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
std::multimap< G4int, const G4ParticleDefinition * > G4IonList
Definition: G4IonTable.hh:74
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316

Here is the call graph for this function:

G4IonTable::G4IonTable ( const G4IonTable right)
protected
G4IonTable::~G4IonTable ( )
virtual

Definition at line 190 of file G4IonTable.cc.

191 {
192  // delete IsotopeTable if exists
193  if (fIsotopeTableList != 0)
194  {
195  for (size_t i = 0; i< fIsotopeTableList->size(); ++i)
196  {
197  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[i];
198  //delete fIsotopeTable;
199  if( fIsotopeTable != G4NuclideTable::GetNuclideTable() ) delete fIsotopeTable;
200  }
201  fIsotopeTableList->clear();
202  delete fIsotopeTableList;
203  }
205 
206 
207  if (fIonList ==0) return;
208  // remove all contents in the Ion List
209  // No need to delete here because all particles are dynamic objects
210  fIonList->clear();
211 
212  delete fIonList;
213  fIonList =0;
214 }
static G4ThreadLocal std::vector< G4VIsotopeTable * > * fIsotopeTableList
Definition: G4IonTable.hh:317
static G4NuclideTable * GetNuclideTable()
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316

Here is the call graph for this function:

Member Function Documentation

void G4IonTable::AddProcessManager ( G4ParticleDefinition ion)
protected

Definition at line 1504 of file G4IonTable.cc.

1505 {
1506  // check State and do not attach process managaer in event loop
1507 // G4StateManager* pStateManager = G4StateManager::GetStateManager();
1508 // G4ApplicationState currentState = pStateManager->GetCurrentState();
1509 // if (currentState == G4State_EventProc) return;
1510 // {
1511 // if (n_error<10)
1512 // {
1513 // G4cout << "Defining process manager for " << ion->GetParticleName() << G4endl;
1514 // G4Exception("G4IonTable::AddProcessManager()", "PART130", JustWarning,
1515 // "Defining process manager during an event loop is thread unsafe and will be dropped from the next release.");
1516 // n_error +=1;
1517 // }
1518 // return;
1519 // }
1520 
1521  // check whether GenericIon has processes
1522  G4ParticleDefinition* genericIon =
1524 
1525  G4ProcessManager* pman=0;
1526  if (genericIon!=0) pman = genericIon->GetProcessManager();
1527  if ((genericIon ==0) || (genericIon->GetParticleDefinitionID() < 0) || (pman==0)){
1528  G4cout << "G4IonTable::AddProcessManager() : can not create ion of "
1529  << ion->GetParticleName()
1530  << " because GenericIon is not available!!" << G4endl;
1531  G4Exception( "G4IonTable::AddProcessManager()","PART105", FatalException,
1532  "Can not create ions because GenericIon is not available");
1533  return;
1534  }
1535 
1538 }
G4int GetParticleDefinitionID() const
void SetParticleDefinitionID(G4int id=-1)
G4ParticleDefinition * GetGenericIon() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ParticleTable * GetParticleTable()
G4ProcessManager * GetProcessManager() const
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::clear ( void  )

Definition at line 1345 of file G4IonTable.cc.

1346 {
1347  if (G4ParticleTable::GetParticleTable()->GetReadiness()) {
1348  G4Exception("G4IonTable::clear()",
1349  "PART116", JustWarning,
1350  "No effects because readyToUse is true.");
1351  return;
1352  }
1353 
1354 #ifdef G4VERBOSE
1355  if (GetVerboseLevel()>2) {
1356  G4cout << "G4IonTable::Clear() : number of Ion regsitered = ";
1357  G4cout << fIonList->size() << G4endl;
1358  }
1359 #endif
1360  fIonList->clear();
1361 }
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ParticleTable * GetParticleTable()
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4IonTable::Contains ( const G4ParticleDefinition particle) const

Definition at line 1667 of file G4IonTable.cc.

1668 {
1669  if (!IsIon(particle)) return false;
1670 
1671  G4int Z = particle->GetAtomicNumber();
1672  G4int A = particle->GetAtomicMass();
1673  G4int LL = particle->GetQuarkContent(3); //strangeness
1674  G4int encoding=GetNucleusEncoding(Z, A, LL);
1675  G4bool found = false;
1676  if (encoding !=0 ) {
1677  G4IonList::iterator i = fIonListShadow->find(encoding);
1678  for( ;i != fIonListShadow->end() ; i++) {
1679  if (particle == i->second ) {
1680  found = true;
1681  break;
1682  }
1683  }
1684  }
1685  return found;
1686 }
static G4bool IsIon(const G4ParticleDefinition *)
Definition: G4IonTable.cc:1147
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
double A(double temperature)
bool G4bool
Definition: G4Types.hh:79
G4int GetQuarkContent(G4int flavor) const
G4int GetAtomicMass() const
static const G4int LL[nN]

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::CreateAllIon ( )

Definition at line 1606 of file G4IonTable.cc.

1607 {
1608  PreloadNuclide();
1609 }
void PreloadNuclide()
Definition: G4IonTable.cc:1624

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::CreateAllIsomer ( )

Definition at line 1612 of file G4IonTable.cc.

1613 {
1614  PreloadNuclide();
1615 }
void PreloadNuclide()
Definition: G4IonTable.cc:1624

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleDefinition * G4IonTable::CreateIon ( G4int  Z,
G4int  A,
G4double  E,
G4Ions::G4FloatLevelBase  flb 
)
protected

Definition at line 247 of file G4IonTable.cc.

249 {
251 
252  // check whether GenericIon has processes
253  G4ParticleDefinition* genericIon =
255  G4ProcessManager* pman=0;
256  if (genericIon!=0) pman = genericIon->GetProcessManager();
257  if ((genericIon ==0) || (genericIon->GetParticleDefinitionID() < 0) || (pman==0)){
258 #ifdef G4VERBOSE
259  if (GetVerboseLevel()>1) {
260  G4cout << "G4IonTable::CreateIon() : can not create ion of "
261  << " Z =" << Z << " A = " << A
262  << " because GenericIon is not ready !!" << G4endl;
263  }
264 #endif
265  G4Exception( "G4IonTable::CreateIon()","PART105",
266  JustWarning,
267  "Can not create ions because GenericIon is not ready");
268  return 0;
269  }
270 
271  G4double life = 0.0;
272  G4DecayTable* decayTable =0;
273  G4bool stable = true;
274  G4double mu = 0.0;
275  G4double Eex = 0.0;
276  G4int lvl =0;
277  G4int J=0;
278 
279  const G4IsotopeProperty* fProperty = FindIsotope(Z, A, E, flb);
280  if (fProperty !=0 ){
281  Eex = fProperty->GetEnergy();
282  lvl = fProperty->GetIsomerLevel();
283  J = fProperty->GetiSpin();
284  life = fProperty->GetLifeTime();
285  mu = fProperty->GetMagneticMoment();
286  decayTable = fProperty->GetDecayTable();
287  stable = (life <= 0.) || (decayTable ==0);
288  lvl = fProperty->GetIsomerLevel();
289  if (lvl <0) lvl=9;
290  } else {
291 #ifdef G4VERBOSE
292  if (GetVerboseLevel()>1) {
294  ed << "G4IonTable::CreateIon() : G4IsotopeProperty object was not found for"
295  << " Z = " << Z << " A = " << A << " E = " << E/keV << " (keV)";
297  { ed << " FloatingLevel +" << G4Ions::FloatLevelBaseChar(flb); }
298  ed << ".\n"
299  << " Physics quantities such as life are not set for this ion.";
300  G4Exception( "G4IonTable::CreateIon()","PART70105", JustWarning, ed);
301  }
302 #endif
303  // excitation energy
304  Eex = E;
305  // lvl is assigned to 9 temporally
306  if (Eex>0.0) lvl=9;
307  }
308 
309  //Eex = G4NuclideTable::Round(Eex);
310  if (Eex==0.0) lvl=0;
311  // ion name
312  G4String name ="";
314  if (lvl==0 && flb==G4Ions::G4FloatLevelBase::no_Float) name = GetIonName(Z, A, lvl);
315  else name = GetIonName(Z, A, Eex, flb);
316 
317  // PDG encoding
319 
320 //G4cout<<"G4IonTable::CreateIon "<<"Z:"<<Z<<" A:"<<A<<" E:"<<E<<" Eex:"<<Eex<<" lvl:"<<lvl<<" name:"<<name<<" code:"<<encoding<<G4endl;
321  // PDG mass
322  G4double mass = GetNucleusMass(Z, A)+ Eex;
323 
324  // PDG charge is set to one of nucleus
325  G4double charge = G4double(Z)*eplus;
326 
327  // create an ion
328  // spin, parity, isospin values are fixed
329 
330  // Request lock for particle table accesses. Some changes are inside
331  // this critical region.
332  //
333 
334  ion = new G4Ions( name, mass, 0.0*MeV, charge,
335  J, +1, 0,
336  0, 0, 0,
337  "nucleus", 0, A, encoding,
338  stable, life, decayTable, false,
339  "generic", 0,
340  Eex, lvl );
341 
342  // Release lock for particle table accesses.
343  //
344 
345  ion->SetPDGMagneticMoment(mu);
346  static_cast<G4Ions*>(ion)->SetFloatLevelBase(flb);
347 
348  //No Anti particle registered
349  ion->SetAntiPDGEncoding(0);
350 
351 #ifdef G4VERBOSE
352  if (GetVerboseLevel()>1) {
353  G4cout << "G4IonTable::CreateIon() : create ion of " << name
354  << " " << Z << ", " << A
355  << " encoding=" << encoding;
356  if (E>0.0) {
357  G4cout << " IsomerLVL=" << lvl
358  << " excited energy=" << Eex/keV << "[keV]";
359  }
360  G4cout << G4endl;
361  }
362 #endif
363 
364  // Add process manager to the ion
365  AddProcessManager(ion);
366 
367 #ifdef G4MULTITHREADED
368  // Fill decay channels if this method is invoked from worker
370  {
371  if(!stable && decayTable)
372  {
373  G4int nCh = decayTable->entries();
374  for(G4int iCh=0;iCh<nCh;iCh++)
375  { decayTable->GetDecayChannel(iCh)->GetDaughter(0); }
376  }
377  }
378 #endif
379 
380  return ion;
381 }
G4int GetParticleDefinitionID() const
const XML_Char * name
Definition: expat.h:151
G4double GetMagneticMoment() const
static char FloatLevelBaseChar(G4Ions::G4FloatLevelBase flb)
Definition: G4Ions.hh:253
G4DecayTable * GetDecayTable() const
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void SetAntiPDGEncoding(G4int aEncoding)
const XML_Char const XML_Char * encoding
Definition: expat.h:187
G4int GetiSpin() const
G4ParticleDefinition * GetDaughter(G4int anIndex)
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
G4int GetIsomerLevel() const
G4VDecayChannel * GetDecayChannel(G4int index) const
G4ParticleDefinition * GetGenericIon() const
int G4int
Definition: G4Types.hh:78
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
Definition: G4IonTable.cc:1094
G4IsotopeProperty * FindIsotope(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb) const
Definition: G4IonTable.cc:1568
G4int entries() const
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
Definition: G4Ions.hh:51
G4double GetEnergy() const
bool G4bool
Definition: G4Types.hh:79
static constexpr double eplus
Definition: G4SIunits.hh:199
void AddProcessManager(G4ParticleDefinition *)
Definition: G4IonTable.cc:1504
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4bool IsWorkerThread()
Definition: G4Threading.cc:145
static G4ParticleTable * GetParticleTable()
G4ProcessManager * GetProcessManager() const
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
G4double GetNucleusMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
Definition: G4IonTable.cc:1270
double G4double
Definition: G4Types.hh:76
static constexpr double keV
Definition: G4SIunits.hh:216
G4double GetLifeTime() const
void SetPDGMagneticMoment(G4double mageticMoment)

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleDefinition * G4IonTable::CreateIon ( G4int  Z,
G4int  A,
G4int  L,
G4double  E,
G4Ions::G4FloatLevelBase  flb 
)
protected

Definition at line 385 of file G4IonTable.cc.

387 {
388  if (LL==0) return CreateIon(Z,A,E,flb);
389 
390  // create hyper nucleus
392 
393  // check whether GenericIon has processes
394  G4ParticleDefinition* genericIon =
396  G4ProcessManager* pman=0;
397  if (genericIon!=0) pman = genericIon->GetProcessManager();
398  if ((genericIon ==0) || (genericIon->GetParticleDefinitionID() < 0) || (pman==0)){
399 #ifdef G4VERBOSE
400  if (GetVerboseLevel()>1) {
401  G4cout << "G4IonTable::CreateIon() : can not create ion of "
402  << " Z =" << Z << " A = " << A
403  << " because GenericIon is not ready !!" << G4endl;
404  }
405 #endif
406  G4Exception( "G4IonTable::CreateIon()","PART105", JustWarning,
407  "Can not create ions because GenericIon is not ready");
408  return 0;
409  }
410 
411  G4int J=0;
412  G4double life = 0.0;
413  G4DecayTable* decayTable =0;
414  G4bool stable = true;
415 
416  // excitation energy
417  //G4double Eex = G4NuclideTable::Round(E);
418  G4double Eex = E;
419  G4double mass = GetNucleusMass(Z, A, LL)+ Eex;
420  G4int lvl = 0;
421  // lvl is assigned to 9 temporally
422  if (Eex>0.0) lvl=9;
423 
424  // PDG encoding
426 
427  // PDG charge is set to one of nucleus
428  G4double charge = G4double(Z)*eplus;
429 
430  // create an ion
431  // spin, parity, isospin values are fixed
432  //
433  // get ion name
434  G4String name = GetIonName(Z, A, LL, Eex, flb);
435 
436  ion = new G4Ions( name, mass, 0.0*MeV, charge,
437  J, +1, 0,
438  0, 0, 0,
439  "nucleus", 0, A, encoding,
440  stable, life, decayTable, false,
441  "generic", 0,
442  Eex, lvl );
443 
444  // Release lock for particle table accesses.
445  //
446 
447  G4double mu = 0.0; // magnetic moment
448  ion->SetPDGMagneticMoment(mu);
449  static_cast<G4Ions*>(ion)->SetFloatLevelBase(flb);
450 
451  //No Anti particle registered
452  ion->SetAntiPDGEncoding(0);
453 
454 #ifdef G4VERBOSE
455  if (GetVerboseLevel()>1) {
456  G4cout << "G4IonTable::CreateIon() : create hyper ion of " << name
457  << " " << Z << ", " << A << ", " << LL
458  << " encoding=" << encoding;
459  if (E>0.0) {
460  G4cout << " IsomerLVL=" << lvl
461  << " excited energy=" << Eex/keV << "[keV]";
462  }
463  G4cout << G4endl;
464  }
465 #endif
466 
467  // Add process manager to the ion
468  AddProcessManager(ion);
469 
470  return ion;
471 }
G4int GetParticleDefinitionID() const
const XML_Char * name
Definition: expat.h:151
void SetAntiPDGEncoding(G4int aEncoding)
const XML_Char const XML_Char * encoding
Definition: expat.h:187
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
G4ParticleDefinition * GetGenericIon() const
int G4int
Definition: G4Types.hh:78
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
Definition: G4IonTable.cc:1094
G4ParticleDefinition * CreateIon(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb)
Definition: G4IonTable.cc:247
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
static constexpr double eplus
Definition: G4SIunits.hh:199
void AddProcessManager(G4ParticleDefinition *)
Definition: G4IonTable.cc:1504
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ParticleTable * GetParticleTable()
G4ProcessManager * GetProcessManager() const
static const G4int LL[nN]
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
G4double GetNucleusMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
Definition: G4IonTable.cc:1270
double G4double
Definition: G4Types.hh:76
static constexpr double keV
Definition: G4SIunits.hh:216
void SetPDGMagneticMoment(G4double mageticMoment)

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::CreateIon ( G4int  Z,
G4int  A,
G4int  lvl = 0 
)
protected

Definition at line 474 of file G4IonTable.cc.

475 {
476  if(lvl == 0) return CreateIon(Z,A,0.0,G4Ions::G4FloatLevelBase::no_Float);
477  G4Exception( "G4IonTable::CreateIon()","PART105", JustWarning,
478  "Ion cannot be created by an isomer level. Use excitation energy.");
479  return 0;
480 }
G4ParticleDefinition * CreateIon(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb)
Definition: G4IonTable.cc:247
double A(double temperature)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::CreateIon ( G4int  Z,
G4int  A,
G4int  L,
G4int  lvl 
)
protected

Definition at line 484 of file G4IonTable.cc.

485 {
486  if (LL==0) return CreateIon(Z,A,lvl);
487  if(lvl == 0) return CreateIon(Z,A,0.0,G4Ions::G4FloatLevelBase::no_Float);
488 
489  if (lvl>0) {
491  ed << "Isomer level " << lvl << " is unknown for the isotope (Z="
492  << Z << ", A=" << A << ", L=" << LL << "). Null pointer is returned.";
493  G4Exception( "G4IonTable::GetIon()","PART106", JustWarning, ed);
494  return 0;
495  }
496 
497  return 0;
498 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4ParticleDefinition * CreateIon(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb)
Definition: G4IonTable.cc:247
double A(double temperature)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const G4int LL[nN]

Here is the call graph for this function:

void G4IonTable::DestroyWorkerG4IonTable ( )

Definition at line 217 of file G4IonTable.cc.

218 {
219  // delete IsotopeTable if exists
220  if (fIsotopeTableList != 0)
221  {
222  for (size_t i = 0; i< fIsotopeTableList->size(); ++i)
223  {
224  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[i];
225  //delete fIsotopeTable;
226  if( fIsotopeTable != G4NuclideTable::GetNuclideTable() ) delete fIsotopeTable;
227  }
228  fIsotopeTableList->clear();
229  delete fIsotopeTableList;
230  }
232 
233 
234  if (fIonList ==0) return;
235  // remove all contents in the Ion List
236  // No need to delete here because all particles are dynamic objects
237  fIonList->clear();
238 
239  delete fIonList;
240  fIonList =0;
241 }
static G4ThreadLocal std::vector< G4VIsotopeTable * > * fIsotopeTableList
Definition: G4IonTable.hh:317
static G4NuclideTable * GetNuclideTable()
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::DumpTable ( const G4String particle_name = "ALL") const

Definition at line 1466 of file G4IonTable.cc.

1467 {
1468  const G4ParticleDefinition* ion;
1469  G4IonList::iterator idx;
1470  for (idx = fIonList->begin(); idx!= fIonList->end(); ++idx) {
1471  ion = idx->second;
1472  if (( particle_name == "ALL" ) || (particle_name == "all")){
1473  ion->DumpTable();
1474  } else if ( particle_name == ion->GetParticleName() ) {
1475  ion->DumpTable();
1476  }
1477  }
1478 }
const G4String & GetParticleName() const
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316

Here is the call graph for this function:

G4int G4IonTable::Entries ( ) const

Definition at line 1689 of file G4IonTable.cc.

1690 {
1691  return fIonList->size();
1692 }
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316

Here is the caller graph for this function:

G4ParticleDefinition * G4IonTable::FindIon ( G4int  Z,
G4int  A,
G4int  lvl = 0 
)

Definition at line 849 of file G4IonTable.cc.

850 {
851  if ( (A<1) || (Z<=0) || (lvl<0) || (A>999) ) {
852 #ifdef G4VERBOSE
853  if (GetVerboseLevel()>0) {
854  G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
855  << " Z =" << Z << " A = " << A << " IsoLvl = " << lvl << G4endl;
856  }
857 #endif
858  G4Exception( "G4IonTable::FindIon()","PART107",
859  JustWarning, "illegal atomic number/mass");
860  return 0;
861  }
862  // Search ions with A, Z ,E
863  // !! J is omitted now !!
864  const G4ParticleDefinition* ion=0;
865  G4bool isFound = false;
866 
867  // check if light ion
868  ion = GetLightIon(Z,A);
869  if (ion!=0 && lvl==0) {
870  // light ion
871  isFound = true;
872  } else {
873  // -- loop over all particles in Ion table
875  G4IonList::iterator i = fIonList->find(encoding);
876  for( ;i != fIonList->end() ; i++) {
877  ion = i->second;
878  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
879  // excitation level
880  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
881  isFound = true;
882  break;
883  }
884  }
885  }
886 
887  if ( isFound ){
888  if(lvl==9)
889  {
890  G4Exception("G4IonTable::FindIon()","PART5107",JustWarning,
891  "Isomer level 9 may be ambiguous.");
892  }
893  return const_cast<G4ParticleDefinition*>(ion);
894  } else {
895  return 0;
896  }
897 }
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
G4int GetAtomicMass() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316
#define G4endl
Definition: G4ios.hh:61
G4ParticleDefinition * GetLightIon(G4int Z, G4int A) const
Definition: G4IonTable.cc:1217

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleDefinition * G4IonTable::FindIon ( G4int  Z,
G4int  A,
G4int  L,
G4int  lvl 
)

Definition at line 901 of file G4IonTable.cc.

902 {
903  if (LL==0) return FindIon(Z,A,lvl);
904 
905  if (A < 2 || Z < 0 || Z > A-LL || LL>A || A>999 ) {
906 #ifdef G4VERBOSE
907  if (GetVerboseLevel()>0) {
908  G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
909  << " Z =" << Z << " A = " << A << " L = " << LL
910  <<" IsomerLvl = " << lvl << G4endl;
911  }
912 #endif
913  G4Exception( "G4IonTable::FindIon()","PART107",
914  JustWarning, "illegal atomic number/mass");
915  return 0;
916  }
917  // Search ions with A, Z ,E, lvl
918  const G4ParticleDefinition* ion=0;
919  G4bool isFound = false;
920 
921  // -- loop over all particles in Ion table
923  G4IonList::iterator i = fIonList->find(encoding);
924  for( ;i != fIonList->end() ; i++) {
925  ion = i->second;
926  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
927  if ( ion->GetQuarkContent(3) != LL) break;
928  // excitation level
929  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
930  isFound = true;
931  break;
932  }
933  }
934 
935  if ( isFound ){
936  if(lvl==9)
937  {
938  G4Exception("G4IonTable::FindIon()","PART5107",JustWarning,
939  "Isomer level 9 may be ambiguous.");
940  }
941  return const_cast<G4ParticleDefinition*>(ion);
942  } else {
943  return 0;
944  }
945 }
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
G4int GetQuarkContent(G4int flavor) const
G4int GetAtomicMass() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
static const G4int LL[nN]
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::FindIon ( G4int  Z,
G4int  A,
G4double  E,
G4int  J = 0 
)

Definition at line 730 of file G4IonTable.cc.

double A(double temperature)
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::FindIon ( G4int  Z,
G4int  A,
G4double  E,
G4Ions::G4FloatLevelBase  flb,
G4int  J = 0 
)

Definition at line 739 of file G4IonTable.cc.

741 {
742  if ( (A<1) || (Z<=0) || (J<0) || (E<0.0) || (A>999) ) {
743 #ifdef G4VERBOSE
744  if (GetVerboseLevel()>0) {
745  G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
746  << " Z =" << Z << " A = " << A << " E = " << E/keV << G4endl;
747  }
748 #endif
749  G4Exception( "G4IonTable::FindIon()","PART107",
750  JustWarning, "illegal atomic number/mass");
751  return 0;
752  }
753  // Search ions with A, Z ,E
754  // !! J is omitted now !!
755  const G4ParticleDefinition* ion=0;
756  G4bool isFound = false;
757 
758  // check if light ion
759  ion = GetLightIon(Z,A);
760  if (ion!=0 && E==0.0) {
761  // light ion
762  isFound = true;
763  } else {
764  // -- loop over all particles in Ion table
766  G4IonList::iterator i = fIonList->find(encoding);
767  for( ;i != fIonList->end() ; i++) {
768  ion = i->second;
769  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
770  // excitation level
771  G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy();
772  if (std::fabs(E - anExcitaionEnergy) < pNuclideTable->GetLevelTolerance() ) {
773  if(((const G4Ions*)(ion))->GetFloatLevelBase()==flb)
774  {
775  isFound = true;
776  break;
777  }
778  }
779  }
780  }
781 
782  if ( isFound ){
783  return const_cast<G4ParticleDefinition*>(ion);
784  } else {
785  return 0;
786  }
787 }
G4double GetLevelTolerance()
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
G4int GetAtomicMass() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4ParticleDefinition * GetLightIon(G4int Z, G4int A) const
Definition: G4IonTable.cc:1217
static constexpr double keV
Definition: G4SIunits.hh:216

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::FindIon ( G4int  Z,
G4int  A,
G4double  E,
char  flbChar,
G4int  J = 0 
)

Definition at line 734 of file G4IonTable.cc.

736 { return FindIon(Z,A,E,G4Ions::FloatLevelBase(flbChar),J); }
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
Definition: G4Ions.hh:189
double A(double temperature)
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::FindIon ( G4int  Z,
G4int  A,
G4int  L,
G4double  E,
G4int  J = 0 
)

Definition at line 791 of file G4IonTable.cc.

double A(double temperature)
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
static const G4int LL[nN]

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::FindIon ( G4int  Z,
G4int  A,
G4int  L,
G4double  E,
G4Ions::G4FloatLevelBase  flb,
G4int  J = 0 
)

Definition at line 800 of file G4IonTable.cc.

802 {
803  if (LL==0) return FindIon(Z,A,E,flb,J);
804 
805  if (A < 2 || Z < 0 || Z > A-LL || LL>A || A>999 ) {
806 #ifdef G4VERBOSE
807  if (GetVerboseLevel()>0) {
808  G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
809  << " Z =" << Z << " A = " << A << " L = " << LL
810  <<" E = " << E/keV << G4endl;
811  }
812 #endif
813  G4Exception( "G4IonTable::FindIon()","PART107",
814  JustWarning, "illegal atomic number/mass");
815  return 0;
816  }
817  // Search ions with A, Z ,E
818  // !! J is omitted now !!
819  const G4ParticleDefinition* ion=0;
820  G4bool isFound = false;
821 
822  // -- loop over all particles in Ion table
823  G4int encoding=GetNucleusEncoding(Z, A, LL, 0.0, 0);
824  G4IonList::iterator i = fIonList->find(encoding);
825  for( ;i != fIonList->end() ; i++) {
826  ion = i->second;
827  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
828  if( ion->GetQuarkContent(3) != LL) break;
829  // excitation level
830  G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy();
831  if (std::fabs(E - anExcitaionEnergy) < pNuclideTable->GetLevelTolerance() ) {
832  if(((const G4Ions*)(ion))->GetFloatLevelBase()==flb)
833  {
834  isFound = true;
835  break;
836  }
837  }
838  }
839 
840  if ( isFound ){
841  return const_cast<G4ParticleDefinition*>(ion);
842  } else {
843  return 0;
844  }
845 }
G4double GetLevelTolerance()
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
G4int GetQuarkContent(G4int flavor) const
G4int GetAtomicMass() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
static const G4int LL[nN]
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static constexpr double keV
Definition: G4SIunits.hh:216

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::FindIon ( G4int  Z,
G4int  A,
G4int  L,
G4double  E,
char  flbChar,
G4int  J = 0 
)

Definition at line 795 of file G4IonTable.cc.

797 { return FindIon(Z,A,LL,E,G4Ions::FloatLevelBase(flbChar),J); }
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
Definition: G4Ions.hh:189
double A(double temperature)
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
static const G4int LL[nN]

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::FindIonInMaster ( G4int  Z,
G4int  A,
G4int  lvl = 0 
)
protected

Definition at line 1773 of file G4IonTable.cc.

1774 {
1775  // Search ions with A, Z ,E
1776  // !! J is omitted now !!
1777  const G4ParticleDefinition* ion=0;
1778  G4bool isFound = false;
1779 
1780  // -- loop over all particles in Ion table
1782  G4IonList::iterator i = fIonListShadow->find(encoding);
1783  for( ;i != fIonListShadow->end() ; i++) {
1784  ion = i->second;
1785  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1786  // excitation level
1787  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
1788  isFound = true;
1789  break;
1790  }
1791  }
1792 
1793  if ( isFound ){
1794  return const_cast<G4ParticleDefinition*>(ion);
1795  } else {
1796  return 0;
1797  }
1798 }
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
double A(double temperature)
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
G4int GetAtomicMass() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleDefinition * G4IonTable::FindIonInMaster ( G4int  Z,
G4int  A,
G4int  L,
G4int  lvl 
)
protected

Definition at line 1802 of file G4IonTable.cc.

1803 {
1804  if (LL==0) return FindIon(Z,A,lvl);
1805 
1806  // Search ions with A, Z ,E, lvl
1807  const G4ParticleDefinition* ion=0;
1808  G4bool isFound = false;
1809 
1810  // -- loop over all particles in Ion table
1812  G4IonList::iterator i = fIonListShadow->find(encoding);
1813  for( ;i != fIonListShadow->end() ; i++) {
1814  ion = i->second;
1815  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1816  if ( ion->GetQuarkContent(3) != LL) break;
1817  // excitation level
1818  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
1819  isFound = true;
1820  break;
1821  }
1822  }
1823 
1824  if ( isFound ){
1825  return const_cast<G4ParticleDefinition*>(ion);
1826  } else {
1827  return 0;
1828  }
1829 }
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
double A(double temperature)
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
G4int GetQuarkContent(G4int flavor) const
G4int GetAtomicMass() const
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
static const G4int LL[nN]

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::FindIonInMaster ( G4int  Z,
G4int  A,
G4double  E,
G4Ions::G4FloatLevelBase  flb,
G4int  J = 0 
)
protected

Definition at line 1702 of file G4IonTable.cc.

1704 {
1705  // Search ions with A, Z ,E
1706  // !! J is omitted now !!
1707  const G4ParticleDefinition* ion=0;
1708  G4bool isFound = false;
1709 
1710  // -- loop over all particles in Ion table
1712  G4IonList::iterator i = fIonListShadow->find(encoding);
1713  for( ;i != fIonListShadow->end() ; i++) {
1714  ion = i->second;
1715  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1716  // excitation level
1717  G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy();
1718  if (std::fabs(E - anExcitaionEnergy) < pNuclideTable->GetLevelTolerance() ) {
1719  if(((const G4Ions*)(ion))->GetFloatLevelBase()==flb)
1720  {
1721  isFound = true;
1722  break;
1723  }
1724  }
1725  }
1726 
1727  if ( isFound ){
1728  return const_cast<G4ParticleDefinition*>(ion);
1729  } else {
1730  return 0;
1731  }
1732 }
G4double GetLevelTolerance()
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
double A(double temperature)
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
G4int GetAtomicMass() const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::FindIonInMaster ( G4int  Z,
G4int  A,
G4int  L,
G4double  E,
G4Ions::G4FloatLevelBase  flb,
G4int  J = 0 
)
protected

Definition at line 1736 of file G4IonTable.cc.

1738 {
1739  if (LL==0) return FindIon(Z,A,E,flb,J);
1740 
1741  // Search ions with A, Z ,E
1742  // !! J is omitted now !!
1743  const G4ParticleDefinition* ion=0;
1744  G4bool isFound = false;
1745 
1746  // -- loop over all particles in Ion table
1747  G4int encoding=GetNucleusEncoding(Z, A, LL, 0.0, 0);
1748  G4IonList::iterator i = fIonListShadow->find(encoding);
1749  for( ;i != fIonListShadow->end() ; i++) {
1750  ion = i->second;
1751  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1752  if( ion->GetQuarkContent(3) != LL) break;
1753  // excitation level
1754  G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy();
1755  if (std::fabs(E - anExcitaionEnergy) < pNuclideTable->GetLevelTolerance() ) {
1756  if(((const G4Ions*)(ion))->GetFloatLevelBase()==flb)
1757  {
1758  isFound = true;
1759  break;
1760  }
1761  }
1762  }
1763 
1764  if ( isFound ){
1765  return const_cast<G4ParticleDefinition*>(ion);
1766  } else {
1767  return 0;
1768  }
1769 }
G4double GetLevelTolerance()
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
double A(double temperature)
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
G4int GetQuarkContent(G4int flavor) const
G4int GetAtomicMass() const
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
static const G4int LL[nN]
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4IsotopeProperty * G4IonTable::FindIsotope ( G4int  Z,
G4int  A,
G4double  E,
G4Ions::G4FloatLevelBase  flb 
) const
protected

Definition at line 1568 of file G4IonTable.cc.

1570 {
1571  if (fIsotopeTableList ==0) return 0;
1572  if (fIsotopeTableList->size()==0) return 0;
1573 
1574  G4IsotopeProperty* property =0;
1575 
1576  // iterate
1577  for (size_t i = 0; i<fIsotopeTableList->size(); ++i) {
1578  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[fIsotopeTableList->size()-i-1];
1579  property = fIsotopeTable->GetIsotope(Z,A,E,flb);
1580  if(property) break;
1581  }
1582 
1583  return property;
1584 }
static G4ThreadLocal std::vector< G4VIsotopeTable * > * fIsotopeTableList
Definition: G4IonTable.hh:317
virtual G4IsotopeProperty * GetIsotope(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float)=0
double A(double temperature)

Here is the call graph for this function:

Here is the caller graph for this function:

G4IsotopeProperty * G4IonTable::FindIsotope ( G4int  Z,
G4int  A,
G4int  lvl 
) const
protected

Definition at line 1587 of file G4IonTable.cc.

1588 {
1589  if (fIsotopeTableList ==0) return 0;
1590  if (fIsotopeTableList->size()==0) return 0;
1591 
1592  G4IsotopeProperty* property =0;
1593 
1594  // iterate
1595  for (size_t i = 0; i<fIsotopeTableList->size(); ++i) {
1596  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[fIsotopeTableList->size()-i-1];
1597  property = fIsotopeTable->GetIsotope(Z,A,lvl);
1598  if(property) break;
1599  }
1600 
1601  return property;
1602 }
static G4ThreadLocal std::vector< G4VIsotopeTable * > * fIsotopeTableList
Definition: G4IonTable.hh:317
virtual G4IsotopeProperty * GetIsotope(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float)=0
double A(double temperature)

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetIon ( G4int  Z,
G4int  A,
G4int  lvl = 0 
)

Definition at line 503 of file G4IonTable.cc.

504 {
505  if ( (A<1) || (Z<=0) || (lvl<0) || (A>999) ) {
506 #ifdef G4VERBOSE
507  if (GetVerboseLevel()>0) {
508  G4cout << "G4IonTable::GetIon() : illegal atomic number/mass"
509  << " Z =" << Z << " A = " << A << " Lvl = " << lvl << G4endl;
510  }
511 #endif
512  return 0;
513  }
514  if ( lvl == 0 ) return GetIon(Z,A,0.0);
515 
516  // Search ions with A, Z, lvl
518 
519  // create ion
520 #ifdef G4MULTITHREADED
521  if (ion ==0 ){
523  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
524  ion = FindIonInMaster(Z,A,lvl);
525  if(ion != 0) InsertWorker(ion);
526  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
527  }
528  }
529 #endif
530  if (ion ==0 ){
531  G4Exception( "G4IonTable::GetIon()","PART105", JustWarning,
532  "Ion cannot be created by an isomer level. Use excitation energy.");
533  // G4ExceptionDescription ed;
534  // ed << "Isomer level " << lvl << " is unknown for the isotope (Z="
535  // << Z << ", A=" << A << "). Null pointer is returned.";
536  // G4Exception( "G4IonTable::GetIon()","PART106", JustWarning, ed);
537  }
538  return ion;
539 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
void InsertWorker(const G4ParticleDefinition *particle)
Definition: G4IonTable.cc:1378
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4bool IsWorkerThread()
Definition: G4Threading.cc:145
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
#define G4endl
Definition: G4ios.hh:61
G4ParticleDefinition * FindIonInMaster(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:1773

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleDefinition * G4IonTable::GetIon ( G4int  Z,
G4int  A,
G4int  L,
G4int  lvl 
)

Definition at line 543 of file G4IonTable.cc.

544 {
545  if (LL==0) return GetIon(Z,A,lvl);
546 
547  if (A < 2 || Z < 0 || Z > A-LL || LL>A || A>999 ) {
548 #ifdef G4VERBOSE
549  if (GetVerboseLevel()>0) {
550  G4cout << "G4IonTable::GetIon() : illegal atomic number/mass"
551  << " Z =" << Z << " A = " << A << " L = " << LL
552  <<" IsomerLvl = " << lvl << G4endl;
553  }
554 #endif
555  return 0;
556  } else if( A==2 ) {
557 #ifdef G4VERBOSE
558  if (GetVerboseLevel()>0) {
559  G4cout << "G4IonTable::GetIon() : No boud state for "
560  << " Z =" << Z << " A = " << A << " L = " << LL
561  <<" IsomerLvl = " << lvl << G4endl;
562  }
563 #endif
564  return 0;
565  }
566 
567  // Search ions with A, Z
569 
570  // create ion
571  if (ion == 0) {
572  if (lvl==0) {
573 #ifdef G4MULTITHREADED
575  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
576  ion = FindIonInMaster(Z,A,LL,lvl);
577  if(ion == 0) ion = CreateIon(Z, A, LL, lvl);
578  InsertWorker(ion);
579  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
580  } else {
581  ion = CreateIon(Z, A, LL, lvl);
582  }
583 #else
584  ion = CreateIon(Z, A, LL, lvl);
585 #endif
586  }
587  }
588 
589 // if(ion == 0)
590 // {
591 // G4ExceptionDescription ed;
592 // ed << "Isomer level " << lvl << " is unknown for the isotope (Z="
593 // << Z << ", A=" << A << ", L=" << LL << "). Null pointer is returned.";
594 // G4Exception( "G4IonTable::GetIon()","PART106", JustWarning, ed);
595 // }
596  return ion;
597 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
void InsertWorker(const G4ParticleDefinition *particle)
Definition: G4IonTable.cc:1378
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
G4ParticleDefinition * CreateIon(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb)
Definition: G4IonTable.cc:247
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
G4bool IsWorkerThread()
Definition: G4Threading.cc:145
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
static const G4int LL[nN]
#define G4endl
Definition: G4ios.hh:61
G4ParticleDefinition * FindIonInMaster(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:1773

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetIon ( G4int  Z,
G4int  A,
G4double  E,
G4int  J = 0 
)

Definition at line 600 of file G4IonTable.cc.

G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
double A(double temperature)

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetIon ( G4int  Z,
G4int  A,
G4double  E,
G4Ions::G4FloatLevelBase  flb,
G4int  J = 0 
)

Definition at line 609 of file G4IonTable.cc.

611 {
612  if ( (A<1) || (Z<=0) || (E<0.0) || (A>999) || (J<0) ) {
613 #ifdef G4VERBOSE
614  if (GetVerboseLevel()>0) {
615  G4cout << "G4IonTable::GetIon() : illegal atomic number/mass"
616  << " Z =" << Z << " A = " << A << " E = " << E/keV << G4endl;
617  }
618 #endif
619  return 0;
620  }
621 
622  // Search ions with A, Z
623  G4ParticleDefinition* ion = FindIon(Z,A,E,flb,J);
624 
625  // create ion
626 #ifdef G4MULTITHREADED
627  if(ion == 0)
628  {
630  {
631  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
632  ion = FindIonInMaster(Z,A,E,flb,J);
633  if(ion == 0) ion = CreateIon(Z,A,E,flb);
634  InsertWorker(ion);
635  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
636  }
637  else
638  { ion = CreateIon(Z,A,E,flb); }
639  }
640 #else
641  if (ion == 0) ion = CreateIon(Z,A,E,flb);
642 #endif
643 
644  return ion;
645 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
void InsertWorker(const G4ParticleDefinition *particle)
Definition: G4IonTable.cc:1378
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
G4ParticleDefinition * CreateIon(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb)
Definition: G4IonTable.cc:247
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
G4bool IsWorkerThread()
Definition: G4Threading.cc:145
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
#define G4endl
Definition: G4ios.hh:61
G4ParticleDefinition * FindIonInMaster(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:1773
static constexpr double keV
Definition: G4SIunits.hh:216

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetIon ( G4int  Z,
G4int  A,
G4double  E,
char  flbChar,
G4int  J = 0 
)

Definition at line 604 of file G4IonTable.cc.

606 { return GetIon(Z,A,E,G4Ions::FloatLevelBase(flbChar),J); }
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
Definition: G4Ions.hh:189
double A(double temperature)

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetIon ( G4int  Z,
G4int  A,
G4int  L,
G4double  E,
G4int  J = 0 
)

Definition at line 648 of file G4IonTable.cc.

G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
double A(double temperature)
static const G4int LL[nN]

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetIon ( G4int  Z,
G4int  A,
G4int  L,
G4double  E,
G4Ions::G4FloatLevelBase  flb,
G4int  J = 0 
)

Definition at line 657 of file G4IonTable.cc.

659 {
660  if (LL==0) return GetIon(Z,A,E,flb,J);
661 
662  if (A < 2 || Z < 0 || Z > A-LL || LL>A || A>999 ) {
663 #ifdef G4VERBOSE
664  if (GetVerboseLevel()>0) {
665  G4cout << "G4IonTable::GetIon() : illegal atomic number/mass"
666  << " Z =" << Z << " A = " << A << " L = " << LL
667  <<" E = " << E/keV << G4endl;
668  }
669 #endif
670  return 0;
671  } else if( A==2 ) {
672 #ifdef G4VERBOSE
673  if (GetVerboseLevel()>0) {
674  G4cout << "G4IonTable::GetIon() : No boud state for "
675  << " Z =" << Z << " A = " << A << " L = " << LL
676  << " E = " << E/keV << G4endl;
677  }
678 #endif
679  return 0;
680  }
681 
682  // Search ions with A, Z
683  G4ParticleDefinition* ion = FindIon(Z,A,LL,E,flb,J);
684 
685  // create ion
686 #ifdef G4MULTITHREADED
687  if(ion == 0)
688  {
690  {
691  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
692  ion = FindIonInMaster(Z,A,LL,E,flb,J);
693  if(ion == 0) ion = CreateIon(Z,A,LL,E,flb);
694  InsertWorker(ion);
695  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
696  }
697  else
698  { ion = CreateIon(Z,A,LL,E,flb); }
699  }
700 #else
701  if(ion == 0) ion = CreateIon(Z,A,LL,E,flb);
702 #endif
703 
704  return ion;
705 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
void InsertWorker(const G4ParticleDefinition *particle)
Definition: G4IonTable.cc:1378
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
G4ParticleDefinition * CreateIon(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb)
Definition: G4IonTable.cc:247
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
G4bool IsWorkerThread()
Definition: G4Threading.cc:145
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:849
static const G4int LL[nN]
#define G4endl
Definition: G4ios.hh:61
G4ParticleDefinition * FindIonInMaster(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:1773
static constexpr double keV
Definition: G4SIunits.hh:216

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetIon ( G4int  Z,
G4int  A,
G4int  L,
G4double  E,
char  flbChar,
G4int  J = 0 
)

Definition at line 652 of file G4IonTable.cc.

654 { return GetIon(Z,A,LL,E,G4Ions::FloatLevelBase(flbChar),J); }
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
Definition: G4Ions.hh:189
double A(double temperature)
static const G4int LL[nN]

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetIon ( G4int  encoding)

Definition at line 708 of file G4IonTable.cc.

709 {
710  G4int Z, A, LL, IsoLvl;
711  G4double E;
712  if (!GetNucleusByEncoding(encoding,Z,A,LL,E,IsoLvl) ){
713 #ifdef G4VERBOSE
714  if (GetVerboseLevel()>0) {
715  G4cout << "G4IonTable::GetIon() : illegal encoding"
716  << " CODE:" << encoding << G4endl;
717  }
718 #endif
719  G4Exception( "G4IonTable::GetIon()","PART106",
720  JustWarning, "illegal encoding for an ion");
721  return 0;
722  }
723  //
724  return GetIon( Z, A, LL, IsoLvl);
725 }
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
int G4int
Definition: G4Types.hh:78
static G4bool GetNucleusByEncoding(G4int encoding, G4int &Z, G4int &A, G4double &E, G4int &lvl)
Definition: G4IonTable.cc:990
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const G4int LL[nN]
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4double G4IonTable::GetIonMass ( G4int  Z,
G4int  A,
G4int  L = 0,
G4int  lvl = 0 
) const

Definition at line 1335 of file G4IonTable.cc.

1336 {
1337  return GetNucleusMass(Z,A,LL,lvl);
1338 }
double A(double temperature)
static const G4int LL[nN]
G4double GetNucleusMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
Definition: G4IonTable.cc:1270

Here is the call graph for this function:

Here is the caller graph for this function:

const G4String & G4IonTable::GetIonName ( G4int  Z,
G4int  A,
G4int  lvl = 0 
) const

Definition at line 1094 of file G4IonTable.cc.

1095 {
1096  static G4ThreadLocal G4String *pname = 0;
1097  if (!pname) { pname = new G4String(""); G4AutoDelete::Register(pname); }
1098  G4String &name = *pname;
1099 
1100  static G4ThreadLocal std::ostringstream* os = 0;
1101  if ( ! os ) {
1102  os = new std::ostringstream();
1104  os->setf(std::ios::fixed);
1105  }
1106 
1107  if ( (0< Z) && (Z <=numberOfElements) ) {
1108  name = elementName[Z-1];
1109  } else if (Z > numberOfElements) {
1110  os->str("");
1111  os->operator<<(Z);
1112  name = "E" + os->str() + "-";
1113  } else {
1114  name = "?";
1115  return name;
1116  }
1117  // Atomic Mass
1118  os->str("");
1119  os->operator<<(A);
1120 
1121  if ( lvl>0 ){
1122  std::ostringstream& oo = *os;
1123  // isomer level for Excited nucelus
1124  oo<<'['<<lvl << ']';
1125  }
1126  name += os->str();
1127 
1128  return name;
1129 }
const XML_Char * name
Definition: expat.h:151
#define G4ThreadLocal
Definition: tls.hh:89
void Register(T *inst)
Definition: G4AutoDelete.hh:65
double A(double temperature)
string pname
Definition: eplot.py:33
static const G4String elementName[numberOfElements]
Definition: G4IonTable.hh:328

Here is the call graph for this function:

Here is the caller graph for this function:

const G4String & G4IonTable::GetIonName ( G4int  Z,
G4int  A,
G4double  E,
G4Ions::G4FloatLevelBase  flb = G4Ions::G4FloatLevelBase::no_Float 
) const

Definition at line 1045 of file G4IonTable.cc.

1047 {
1048  static G4ThreadLocal G4String *pname = 0;
1049  if (!pname) { pname = new G4String(""); G4AutoDelete::Register(pname); }
1050  G4String &name = *pname;
1051 
1052  static G4ThreadLocal std::ostringstream* os = 0;
1053  if ( ! os ) {
1054  os = new std::ostringstream();
1056  os->setf(std::ios::fixed);
1057  os->precision(3);
1058  }
1059 
1060  name = GetIonName(Z, A);
1061 
1062  //excited energy
1063  if ( E>0 || flb!=G4Ions::G4FloatLevelBase::no_Float){
1064  os->str("");
1065  std::ostringstream& oo = *os;
1066  // Excited nucleus
1067  oo<<'['<<E/keV;
1069  { oo<<G4Ions::FloatLevelBaseChar(flb); }
1070  oo<< ']';
1071  name += os->str();
1072  }
1073 
1074  return name;
1075 }
const XML_Char * name
Definition: expat.h:151
static char FloatLevelBaseChar(G4Ions::G4FloatLevelBase flb)
Definition: G4Ions.hh:253
#define G4ThreadLocal
Definition: tls.hh:89
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
Definition: G4IonTable.cc:1094
void Register(T *inst)
Definition: G4AutoDelete.hh:65
double A(double temperature)
string pname
Definition: eplot.py:33
static constexpr double keV
Definition: G4SIunits.hh:216

Here is the call graph for this function:

const G4String & G4IonTable::GetIonName ( G4int  Z,
G4int  A,
G4int  L,
G4double  E,
G4Ions::G4FloatLevelBase  flb = G4Ions::G4FloatLevelBase::no_Float 
) const

Definition at line 1078 of file G4IonTable.cc.

1080 {
1081  if (LL==0) return GetIonName(Z, A, E, flb);
1082  static G4ThreadLocal G4String *pname = 0;
1083  if (!pname) { pname = new G4String(""); G4AutoDelete::Register(pname); }
1084  G4String &name = *pname;
1085  name = "";
1086  for (int i =0; i<LL; i++){
1087  name +="L";
1088  }
1089  name += GetIonName(Z, A, E, flb);
1090  return name;
1091 }
const XML_Char * name
Definition: expat.h:151
#define G4ThreadLocal
Definition: tls.hh:89
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
Definition: G4IonTable.cc:1094
void Register(T *inst)
Definition: G4AutoDelete.hh:65
double A(double temperature)
string pname
Definition: eplot.py:33
static const G4int LL[nN]

Here is the call graph for this function:

const G4String & G4IonTable::GetIonName ( G4int  Z,
G4int  A,
G4int  L,
G4int  lvl 
) const

Definition at line 1132 of file G4IonTable.cc.

1133 {
1134  if (LL==0) return GetIonName(Z, A, lvl);
1135  static G4ThreadLocal G4String *pname = 0;
1136  if (!pname) { pname = new G4String(""); G4AutoDelete::Register(pname); }
1137  G4String &name = *pname;
1138  for (int i =0; i<LL; i++){
1139  name +="L";
1140  }
1141  name += GetIonName(Z, A, lvl);
1142  return name;
1143 }
const XML_Char * name
Definition: expat.h:151
#define G4ThreadLocal
Definition: tls.hh:89
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
Definition: G4IonTable.cc:1094
void Register(T *inst)
Definition: G4AutoDelete.hh:65
double A(double temperature)
string pname
Definition: eplot.py:33
static const G4int LL[nN]

Here is the call graph for this function:

static G4IonTable* G4IonTable::GetIonTable ( )
inlinestatic

Definition at line 78 of file G4IonTable.hh.

G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4IonTable::GetIsomerMass ( G4int  Z,
G4int  A,
G4int  lvl = 0 
) const

Definition at line 1329 of file G4IonTable.cc.

1330 {
1331  return GetNucleusMass(Z,A,0,lvl);
1332 }
double A(double temperature)
G4double GetNucleusMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
Definition: G4IonTable.cc:1270

Here is the call graph for this function:

G4VIsotopeTable * G4IonTable::GetIsotopeTable ( size_t  idx = 0) const

Definition at line 1557 of file G4IonTable.cc.

1558 {
1559  G4VIsotopeTable* fIsotopeTable=0;
1560  if ( index < fIsotopeTableList->size() ) {
1561  fIsotopeTable = (*fIsotopeTableList)[index];
1562  }
1563  return fIsotopeTable;
1564 }
G4int size() const
Definition: G4IonTable.cc:1695

Here is the call graph for this function:

G4double G4IonTable::GetLifeTime ( const G4ParticleDefinition particle) const

Definition at line 1833 of file G4IonTable.cc.

1834 {
1835  //if(!(particle->IsGeneralIon())) return particle->GetPDGLifeTime();
1836 
1837  //const G4Ions* ion = static_cast<const G4Ions*>(particle);
1838  //G4int Z = ion->GetAtomicNumber();
1839  //G4int A = ion->GetAtomicMass();
1840  //G4double E = ion->GetExcitationEnergy();
1841 
1842  if((particle->IsGeneralIon()) && !pNuclideTable)
1843  {
1844  G4Exception("G4IonTable::GetLifeTime()","ParticleIon1001",FatalException,
1845  "Method is invoked before G4IonTable is initialized.");
1846  //return 0.;
1847  } //else {
1848  //G4IsotopeProperty* isoP = pNuclideTable->GetIsotope(Z,A,E);
1849  //if(!isoP) return -1001.0;
1850  //return isoP->GetLifeTime();
1851  //}
1852  return particle->GetPDGLifeTime();
1853 }
G4bool IsGeneralIon() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4double GetPDGLifeTime() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4IonTable::GetLifeTime ( G4int  Z,
G4int  A,
G4double  E,
G4Ions::G4FloatLevelBase  flb = G4Ions::G4FloatLevelBase::no_Float 
) const

Definition at line 1860 of file G4IonTable.cc.

1862 {
1863  G4double life = -1001.0;
1864  const G4IsotopeProperty* fProperty = FindIsotope(Z, A, E, flb);
1865  if( fProperty !=0 ) life = fProperty->GetLifeTime();
1866  return life;
1867 }
G4IsotopeProperty * FindIsotope(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb) const
Definition: G4IonTable.cc:1568
double A(double temperature)
double G4double
Definition: G4Types.hh:76
G4double GetLifeTime() const

Here is the call graph for this function:

G4double G4IonTable::GetLifeTime ( G4int  Z,
G4int  A,
G4double  E,
char  flbChar 
) const

Definition at line 1856 of file G4IonTable.cc.

1857 { return GetLifeTime(Z,A,E,G4Ions::FloatLevelBase(flbChar)); }
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
Definition: G4Ions.hh:189
double A(double temperature)
G4double GetLifeTime(const G4ParticleDefinition *) const
Definition: G4IonTable.cc:1833

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetLightAntiIon ( G4int  Z,
G4int  A 
) const
protected

Definition at line 1242 of file G4IonTable.cc.

1243 {
1244  // returns pointer to pre-defined ions
1245  const G4ParticleDefinition* ion=0;
1246  if ( (Z<=2) ) {
1247 #ifndef G4MULTITHREADED
1248  //In sequential use lazy-initialization
1250 #endif
1251  if ( (Z==1)&&(A==1) ) {
1253  } else if ( (Z==1)&&(A==2) ) {
1255  } else if ( (Z==1)&&(A==3) ) {
1257  } else if ( (Z==2)&&(A==4) ) {
1258  ion = antilightions::p_alpha;
1259  } else if ( (Z==2)&&(A==3) ) {
1260  ion = antilightions::p_He3;
1261  }
1262  }
1263  return const_cast<G4ParticleDefinition*>(ion);
1264 }
static const G4ParticleDefinition * p_proton
Definition: G4IonTable.cc:101
double A(double temperature)
static const G4ParticleDefinition * p_triton
Definition: G4IonTable.cc:103
static const G4ParticleDefinition * p_alpha
Definition: G4IonTable.cc:104
static const G4ParticleDefinition * p_He3
Definition: G4IonTable.cc:105
static const G4ParticleDefinition * p_deuteron
Definition: G4IonTable.cc:102

Here is the call graph for this function:

G4ParticleDefinition * G4IonTable::GetLightIon ( G4int  Z,
G4int  A 
) const
protected

Definition at line 1217 of file G4IonTable.cc.

1218 {
1219  // returns pointer to pre-defined ions
1220  const G4ParticleDefinition* ion=0;
1221  if ( (Z<=2) ) {
1222 #ifndef G4MULTITHREADED
1223  //In sequential use lazy-initialization
1224  lightions::Init();
1225 #endif
1226  if ( (Z==1)&&(A==1) ) {
1227  ion = lightions::p_proton;
1228  } else if ( (Z==1)&&(A==2) ) {
1229  ion = lightions::p_deuteron;
1230  } else if ( (Z==1)&&(A==3) ) {
1231  ion = lightions::p_triton;
1232  } else if ( (Z==2)&&(A==4) ) {
1233  ion = lightions::p_alpha;
1234  } else if ( (Z==2)&&(A==3) ) {
1235  ion = lightions::p_He3;
1236  }
1237  }
1238  return const_cast<G4ParticleDefinition*>(ion);
1239 }
static const G4ParticleDefinition * p_triton
Definition: G4IonTable.cc:87
void Init()
Definition: G4IonTable.cc:90
static const G4ParticleDefinition * p_alpha
Definition: G4IonTable.cc:88
double A(double temperature)
static const G4ParticleDefinition * p_He3
Definition: G4IonTable.cc:89
static const G4ParticleDefinition * p_deuteron
Definition: G4IonTable.cc:86
static const G4ParticleDefinition * p_proton
Definition: G4IonTable.cc:85

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleDefinition * G4IonTable::GetMuonicAtom ( G4Ions const *  base)

Definition at line 1871 of file G4IonTable.cc.

1872 {
1873  if (base==0 || !IsIon(base))
1874  G4Exception("G4IonTable::GetMuonicAtom()", "PART987654321",FatalException,"Constructor argument is not a G4Ions");
1875 
1876  // We're assuming here that we get a base that is actually
1877  // constructed and unexcited ... strip excitations, Lambdas, and
1878  // isomers from the encoding
1879 
1880  auto const Z = base->GetAtomicNumber();
1881  auto const A = base->GetAtomicMass();
1882  auto const baseenc = GetNucleusEncoding(Z,A);
1883  auto const encoding = baseenc+1000000000;
1884 
1885  // We have to do all the MT manipulations manually, because the
1886  // convenience functions assume a G4Ions with canonical PDG codes;
1887  // they recalculate the encoding from particle properties rather
1888  // than using the carried member function values. Thus, they will
1889  // do operations on the base ion, rather than the passed in
1890  // G4MuonicAtom
1891 
1892  auto i = fIonList->find(encoding);
1893  if(i!=fIonList->end()){
1894  return const_cast<G4ParticleDefinition*>(i->second);
1895  }
1896  // not in threadlocal list; check global list ...
1897 #ifdef G4MULTITHREADED
1899  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
1900  i = fIonListShadow->find(encoding);
1901  auto end = fIonListShadow->end();
1902  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
1903  if(i!=end){
1904  // we found it, stuff it into the threadlocal list
1905  fIonList->insert(*i);
1906  // and then return it ...
1907  return const_cast<G4ParticleDefinition*>(i->second);
1908  }
1909  }
1910 #endif
1911 
1912  // not found in either list; create and potentially insert
1913  auto const name = "Mu"+GetIonName(Z,A);
1914 
1915  G4MuonicAtom* muatom =
1917 
1918  // Not sure this is doing the right thing...
1919  AddProcessManager(muatom);
1920 
1921  // Now, we have to push the muatom into the appropriate IonTables
1922  // first, recheck global list, in case another thread came along
1923  // before us and created this same muatom
1924 #ifdef G4MULTITHREADED
1926  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
1927  // first, we need to make sure it hasn't been inserted by some
1928  // other thread
1929  auto j = fIonListShadow->find(encoding);
1930  if( j!= fIonListShadow->end() ){
1931  // oops ... someone else built a copy when we weren't looking;
1932  // cleanup our instantiation, and take a handle to the one in
1933  // the global list
1934  delete muatom;
1935  muatom = const_cast<G4MuonicAtom*>(static_cast<G4MuonicAtom const*>(j->second));
1936  } else {
1937  // otherwise, push onto the global list first
1938  fIonListShadow->insert(std::make_pair(encoding, muatom));
1939  }
1940  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
1941  }
1942 #endif
1943  // in either case, push onto the the threadlocal list
1944  fIonList->insert(std::make_pair(encoding,muatom));
1945 
1946  return muatom;
1947 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
const XML_Char * name
Definition: expat.h:151
static G4MuonicAtom * ConstructMuonicAtom(G4String name, G4int encoding, G4Ions const *baseion)
static G4bool IsIon(const G4ParticleDefinition *)
Definition: G4IonTable.cc:1147
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
const G4ThreeVector const G4double const
const XML_Char int const XML_Char int const XML_Char * base
Definition: expat.h:331
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
Definition: G4IonTable.cc:1094
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
double A(double temperature)
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
void AddProcessManager(G4ParticleDefinition *)
Definition: G4IonTable.cc:1504
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4bool IsWorkerThread()
Definition: G4Threading.cc:145
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleDefinition * G4IonTable::GetMuonicAtom ( G4int  Z,
G4int  A 
)

Definition at line 1950 of file G4IonTable.cc.

1951 {
1952  // Need the cast because we need a G4Ions* to pass into the
1953  // function, but GetIon returns a G4ParticleDefinition*
1954  auto base = static_cast<G4Ions const*>(GetIon(Z,A, 0.0));
1955  return GetMuonicAtom(base);
1956 }
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
const G4ThreeVector const G4double const
const XML_Char int const XML_Char int const XML_Char * base
Definition: expat.h:331
double A(double temperature)
Definition: G4Ions.hh:51
G4ParticleDefinition * GetMuonicAtom(G4Ions const *)
Definition: G4IonTable.cc:1871

Here is the call graph for this function:

G4bool G4IonTable::GetNucleusByEncoding ( G4int  encoding,
G4int Z,
G4int A,
G4double E,
G4int lvl 
)
static

Definition at line 990 of file G4IonTable.cc.

993 {
994  if (encoding <= 0) return false; // anti particle
995 
996  if (encoding == 2212) { // proton
997  Z = 1; A = 1;
998  E = 0.0; lvl =0;
999  return true;
1000  }
1001 
1002  encoding -= 1000000000;
1003  Z = encoding/10000;
1004  encoding -= 10000*Z;
1005  A = encoding/10;
1006  lvl = encoding % 10;
1007  return true;
1008 }
double A(double temperature)

Here is the caller graph for this function:

G4bool G4IonTable::GetNucleusByEncoding ( G4int  encoding,
G4int Z,
G4int A,
G4int L,
G4double E,
G4int lvl 
)
static

!!not supported for excitation states !!!

Definition at line 1011 of file G4IonTable.cc.

1015 {
1016  if (encoding <= 0) return false; // anti particle
1017 
1018  if (encoding == 3122) { // Lambda
1019  Z = 1; A = 1; LL = 1;
1020  E = 0.0; lvl =0;
1021  return true;
1022  }
1023 
1024  if (encoding % 10 != 0) {
1026  return false;
1027  }
1028  if (encoding < 1000000000) {
1029  // anti particle
1030  return false;
1031  }
1032 
1033  encoding -= 1000000000;
1034  LL = encoding/10000000;
1035  encoding -= 10000000*LL;
1036  Z = encoding/10000;
1037  encoding -= 10000*Z;
1038  A = encoding/10;
1039  lvl = encoding % 10;
1040  return true;
1041 }
double A(double temperature)
static const G4int LL[nN]
G4int G4IonTable::GetNucleusEncoding ( G4int  Z,
G4int  A,
G4double  E = 0.0,
G4int  lvl = 0 
)
static

Definition at line 949 of file G4IonTable.cc.

950 {
951  // PDG code for Ions
952  // Nuclear codes are given as 10-digit numbers +-100ZZZAAAI.
953  //For a nucleus consisting of np protons and nn neutrons
954  // A = np + nn and Z = np.
955  // I gives the isomer level, with I = 0 corresponding
956  // to the ground state and I >0 to excitations
957 
958  if ( Z==1 && A==1 && E==0.0 ) return 2212; // proton
959 
960  G4int encoding = 1000000000;
961  encoding += Z * 10000;
962  encoding += A *10;
963  if (lvl>0&&lvl<10) encoding +=lvl; //isomer level
964  else if (E>0.0) encoding += 9; //isomer level
965 
966  return encoding;
967 }
const XML_Char const XML_Char * encoding
Definition: expat.h:187
int G4int
Definition: G4Types.hh:78
double A(double temperature)

Here is the caller graph for this function:

G4int G4IonTable::GetNucleusEncoding ( G4int  Z,
G4int  A,
G4int  L,
G4double  E = 0.0,
G4int  lvl = 0 
)
static

Definition at line 970 of file G4IonTable.cc.

972 {
973  // get PDG code for Hyper-Nucleus Ions
974  // Nuclear codes are given as 10-digit numbers +-10LZZZAAAI.
975  //For a nucleus consisting of np protons and nn neutrons
976  // A = np + nn +nlambda and Z = np.
977  // LL = nlambda
978  // I gives the isomer level, with I = 0 corresponding
979  // to the ground state and I >0 to excitations
980 
981  G4int encoding = GetNucleusEncoding(Z, A, E, lvl);
982  if (LL==0) return encoding;
983  encoding += LL* 10000000;
984  if ( Z==1 && A==1 && E==0.0 ) encoding = 3122; // Lambda
985 
986  return encoding;
987 }
const XML_Char const XML_Char * encoding
Definition: expat.h:187
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
int G4int
Definition: G4Types.hh:78
double A(double temperature)
static const G4int LL[nN]

Here is the call graph for this function:

G4double G4IonTable::GetNucleusMass ( G4int  Z,
G4int  A,
G4int  L = 0,
G4int  lvl = 0 
) const

Definition at line 1270 of file G4IonTable.cc.

1271 {
1272  if ( (A<1) || (Z<0) || (LL<0) || (lvl<0) || (lvl>9) ){
1273 #ifdef G4VERBOSE
1274  if (GetVerboseLevel()>0) {
1275  G4cout << "G4IonTable::GetNucleusMass() : illegal atomic number/mass "
1276  << " Z =" << Z << " A = " << A
1277  << " L = " << LL << " lvl = " << lvl << G4endl;
1278  }
1279 #endif
1280  G4Exception( "G4IonTable::GetNucleusMass()","PART107",
1281  EventMustBeAborted, "illegal atomic number/mass");
1282  return -1.0;
1283  }
1284 
1285  G4double mass;
1286  if (LL == 0) {
1287  // calculate nucleus mass
1289 
1290  if (ion!=0) {
1291  mass = ion->GetPDGMass();
1292  } else {
1293  // use G4NucleiProperties::GetNuclearMass
1295  }
1296 
1297  // Isomer
1298  if ( lvl>0 ) {
1299  // -- loop over all particles in Ion table
1301  G4IonList::iterator i = fIonList->find(encoding);
1302  G4bool isFound =false;
1303  for( ;i != fIonList->end() ; i++) {
1304  ion = i->second;
1305  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1306  // excitation level
1307  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
1308  isFound = true;
1309  break;
1310  }
1311  }
1312  if (isFound) {
1313  // return existing isomer mass
1314  mass = ion->GetPDGMass();
1315  } else {
1316  // Find isomer from IsotopeTable
1317  const G4IsotopeProperty* fProperty = FindIsotope(Z, A, lvl);
1318  if (fProperty !=0 ) mass += fProperty->GetEnergy();
1319  }
1320  }
1321 
1322  } else {
1324  }
1325  return mass;
1326 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
G4IsotopeProperty * FindIsotope(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb) const
Definition: G4IonTable.cc:1568
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
Definition: G4Ions.hh:51
G4double GetEnergy() const
bool G4bool
Definition: G4Types.hh:79
G4int GetAtomicMass() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4double GetPDGMass() const
static const G4int LL[nN]
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4ParticleDefinition * GetLightIon(G4int Z, G4int A) const
Definition: G4IonTable.cc:1217
static G4double GetNuclearMass(G4int A, G4int Z, G4int L)

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G4IonTable::GetNumberOfElements ( ) const
inline

Definition at line 346 of file G4IonTable.hh.

347 {
348  return numberOfElements;
349 }
G4ParticleDefinition * G4IonTable::GetParticle ( G4int  index) const

Definition at line 1643 of file G4IonTable.cc.

1644 {
1645  if ( (index >=0) && (index < Entries()) ) {
1646  G4IonList::iterator idx = fIonList->begin();
1647  G4int counter = 0;
1648  while( idx != fIonList->end() ){// Loop checking, 09.08.2015, K.Kurashige
1649  if ( counter == index ) {
1650  return const_cast<G4ParticleDefinition*>(idx->second);
1651  }
1652  counter++;
1653  idx++;
1654  }
1655  }
1656 #ifdef G4VERBOSE
1657  if (GetVerboseLevel()>1){
1658  G4cout << " G4IonTable::GetParticle"
1659  << " invalid index (=" << index << ")"
1660  << " entries = " << Entries() << G4endl;
1661  }
1662 #endif
1663  return 0;
1664 }
G4int Entries() const
Definition: G4IonTable.cc:1689
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G4IonTable::GetVerboseLevel ( ) const
protected

Definition at line 1498 of file G4IonTable.cc.

1499 {
1501 }
static G4ParticleTable * GetParticleTable()
G4int GetVerboseLevel() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::InitializeLightIons ( )

Definition at line 182 of file G4IonTable.cc.

183 {
184  lightions::Init();
186 }
void Init()
Definition: G4IonTable.cc:90

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::Insert ( const G4ParticleDefinition particle)

Definition at line 1363 of file G4IonTable.cc.

1364 {
1365  if (!IsIon(particle)) return;
1366  if (Contains(particle)) return;
1367 
1368  G4int Z = particle->GetAtomicNumber();
1369  G4int A = particle->GetAtomicMass();
1370  G4int LL = particle->GetQuarkContent(3); //strangeness
1371  G4int encoding=GetNucleusEncoding(Z, A, LL); // encoding of the groud state
1372 
1373  // regsiter the ion with its encoding of the groud state
1374  fIonListShadow->insert( std::pair<const G4int, const G4ParticleDefinition*>(encoding, particle) );
1375 
1376 }
static G4bool IsIon(const G4ParticleDefinition *)
Definition: G4IonTable.cc:1147
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
double A(double temperature)
G4int GetQuarkContent(G4int flavor) const
G4int GetAtomicMass() const
G4bool Contains(const G4ParticleDefinition *particle) const
Definition: G4IonTable.cc:1667
static const G4int LL[nN]

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::InsertWorker ( const G4ParticleDefinition particle)
protected

Definition at line 1378 of file G4IonTable.cc.

1379 {
1380  if(!particle) return;
1381 
1382  G4int Z = particle->GetAtomicNumber();
1383  G4int A = particle->GetAtomicMass();
1384  G4int LL = particle->GetQuarkContent(3); //strangeness
1385  G4int encoding=GetNucleusEncoding(Z, A, LL);
1386  G4bool found = false;
1387  if (encoding !=0 ) {
1388  G4IonList::iterator i = fIonList->find(encoding);
1389  for( ;i != fIonList->end() ; i++) {
1390  if (particle == i->second ) {
1391  found = true;
1392  break;
1393  }
1394  }
1395  }
1396  if(found) return;
1397 
1398  // regsiter the ion with its encoding of the groud state
1399  fIonList->insert( std::pair<const G4int, const G4ParticleDefinition*>(encoding, particle) );
1400 
1401 }
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
int G4int
Definition: G4Types.hh:78
G4int GetAtomicNumber() const
double A(double temperature)
bool G4bool
Definition: G4Types.hh:79
G4int GetQuarkContent(G4int flavor) const
G4int GetAtomicMass() const
static const G4int LL[nN]
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4IonTable::IsAntiIon ( const G4ParticleDefinition particle)
static

Definition at line 1172 of file G4IonTable.cc.

1173 {
1174  // return true if the particle is ion
1175 
1176  static const G4String anti_nucleus("anti_nucleus");
1177  static const G4String anti_proton("anti_proton");
1178 
1179  // anti_neutron is not ion
1180  if ((particle->GetAtomicMass()>0) &&
1181  (particle->GetAtomicNumber()>0) ){
1182  if (particle->GetBaryonNumber()<0) return true;
1183  else return false;
1184  }
1185 
1186  // particles derived from G4Ions
1187  if (particle->GetParticleType() == anti_nucleus) return true;
1188 
1189  // anti_proton (Anti_Hydrogen nucleus)
1190  if (particle->GetParticleName() == anti_proton) return true;
1191 
1192  return false;
1193 }
const G4String & GetParticleName() const
G4int GetAtomicNumber() const
const G4String & GetParticleType() const
G4int GetAtomicMass() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4IonTable::IsIon ( const G4ParticleDefinition particle)
static

Definition at line 1147 of file G4IonTable.cc.

1148 {
1149  // return true if the particle is ion
1150 
1151  static const G4String nucleus("nucleus");
1152  static const G4String proton("proton");
1153 
1154  // neutron is not ion
1155  if ((particle->GetAtomicMass()>0) &&
1156  (particle->GetAtomicNumber()>0) ){
1157  if (particle->GetBaryonNumber()>0) return true;
1158  else return false;
1159  }
1160 
1161 
1162  // particles derived from G4Ions
1163  if (particle->GetParticleType() == nucleus) return true;
1164 
1165  // proton (Hydrogen nucleus)
1166  if (particle->GetParticleName() == proton) return true;
1167 
1168  return false;
1169 }
const G4String & GetParticleName() const
G4int GetAtomicNumber() const
const G4String & GetParticleType() const
G4int GetAtomicMass() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4IonTable::IsLightAntiIon ( const G4ParticleDefinition particle) const
protected

Definition at line 1207 of file G4IonTable.cc.

1208 {
1209  static const std::string names[] = { "anti_proton", "anti_alpha", "anti_deuteron",
1210  "anti_triton", "anti_He3"};
1211 
1212  // return true if the particle is pre-defined ion
1213  return std::find(names, names+5, particle->GetParticleName())!=names+5;
1214 }
const G4String & GetParticleName() const

Here is the call graph for this function:

G4bool G4IonTable::IsLightIon ( const G4ParticleDefinition particle) const
protected

Definition at line 1198 of file G4IonTable.cc.

1199 {
1200  static const std::string names[] = { "proton", "alpha", "deuteron",
1201  "triton", "He3"};
1202 
1203  // return true if the particle is pre-defined ion
1204  return std::find(names, names+5, particle->GetParticleName())!=names+5;
1205 }
const G4String & GetParticleName() const

Here is the call graph for this function:

G4IonTable& G4IonTable::operator= ( const G4IonTable )
inlineprotected

Definition at line 93 of file G4IonTable.hh.

93 {return *this;}
void G4IonTable::PreloadNuclide ( )

Definition at line 1624 of file G4IonTable.cc.

1625 {
1626  if ( isIsomerCreated || !G4Threading::IsMultithreadedApplication() ) return;
1627 
1628  pNuclideTable->GenerateNuclide();
1629 
1630  for ( size_t i = 0 ; i != pNuclideTable->entries() ; i++ ) {
1631  const G4IsotopeProperty* fProperty = pNuclideTable->GetIsotopeByIndex( i );
1632  G4int Z = fProperty->GetAtomicNumber();
1633  G4int A = fProperty->GetAtomicMass();
1634  G4double Eex = fProperty->GetEnergy();
1635  GetIon(Z,A,Eex);
1636  }
1637 
1638  isIsomerCreated = true;
1639 }
G4int GetAtomicNumber() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
G4IsotopeProperty * GetIsotopeByIndex(size_t idx) const
int G4int
Definition: G4Types.hh:78
double A(double temperature)
G4double GetEnergy() const
G4bool IsMultithreadedApplication()
Definition: G4Threading.cc:152
double G4double
Definition: G4Types.hh:76
size_t entries() const
G4int GetAtomicMass() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::PrepareNuclideTable ( )

Definition at line 1618 of file G4IonTable.cc.

1619 {
1620  if(pNuclideTable==0) pNuclideTable = G4NuclideTable::GetNuclideTable();
1621 }
static G4NuclideTable * GetNuclideTable()

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::RegisterIsotopeTable ( G4VIsotopeTable table)

Definition at line 1543 of file G4IonTable.cc.

1544 {
1545  //check duplication
1546  G4String name = table->GetName();
1547  for (size_t i = 0; i< fIsotopeTableList->size(); ++i) {
1548  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[i];
1549  if (name == fIsotopeTable->GetName()) return;
1550  }
1551 
1552  // register
1553  fIsotopeTableList->push_back(table);
1554 }
const XML_Char * name
Definition: expat.h:151
const G4String & GetName() const
static G4ThreadLocal std::vector< G4VIsotopeTable * > * fIsotopeTableList
Definition: G4IonTable.hh:317

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IonTable::Remove ( const G4ParticleDefinition particle)

Definition at line 1404 of file G4IonTable.cc.

1405 {
1406  if(!particle) return;
1407 #ifdef G4MULTITHREADED
1410  ed << "Request of removing " << particle->GetParticleName()
1411  << " is ignored as it is invoked from a worker thread.";
1412  G4Exception("G4IonTable::Remove()","PART10117",JustWarning,ed);
1413  return;
1414  }
1415 #endif
1416  if (G4ParticleTable::GetParticleTable()->GetReadiness()) {
1418  G4ApplicationState currentState = pStateManager->GetCurrentState();
1419  if (currentState != G4State_PreInit) {
1420  G4String msg = "Request of removing ";
1421  msg += particle->GetParticleName();
1422  msg += " has No effects other than Pre_Init";
1423  G4Exception("G4IonTable::Remove()",
1424  "PART117", JustWarning, msg);
1425  return;
1426  } else {
1427 #ifdef G4VERBOSE
1428  if (GetVerboseLevel()>0){
1429  G4cout << particle->GetParticleName()
1430  << " will be removed from the IonTable " << G4endl;
1431  }
1432 #endif
1433  }
1434  }
1435 
1436  if (IsIon(particle)) {
1437  G4int Z = particle->GetAtomicNumber();
1438  G4int A = particle->GetAtomicMass();
1439  G4int LL = particle->GetQuarkContent(3); //strangeness
1440  G4int encoding=GetNucleusEncoding(Z, A, LL);
1441  if (encoding !=0 ) {
1442  G4IonList::iterator i = fIonListShadow->find(encoding);
1443  for( ;i != fIonListShadow->end() ; i++) {
1444  if (particle == i->second) {
1445  fIonListShadow->erase(i);
1446  break;
1447  }
1448  }
1449  }
1450  } else {
1451 #ifdef G4VERBOSE
1452  if (GetVerboseLevel()>1) {
1453  G4cout << "G4IonTable::Remove :" << particle->GetParticleName()
1454  << " is not ions" << G4endl;
1455  }
1456 #endif
1457  }
1458 
1459 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
static G4bool IsIon(const G4ParticleDefinition *)
Definition: G4IonTable.cc:1147
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:949
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1498
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4int GetAtomicNumber() const
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
G4int GetQuarkContent(G4int flavor) const
G4ApplicationState GetCurrentState() const
G4int GetAtomicMass() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4bool IsWorkerThread()
Definition: G4Threading.cc:145
static G4ParticleTable * GetParticleTable()
static const G4int LL[nN]
#define G4endl
Definition: G4ios.hh:61
G4ApplicationState

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G4IonTable::size ( ) const

Definition at line 1695 of file G4IonTable.cc.

1696 {
1697  return fIonList->size();
1698 }
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316

Here is the caller graph for this function:

void G4IonTable::SlaveG4IonTable ( )

Definition at line 151 of file G4IonTable.cc.

152 {
153 G4Exception("G4IonTable::SlaveG4ParticleTable()","G4MT0000",FatalException,"Obsolete");
154 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

void G4IonTable::WorkerG4IonTable ( )

Definition at line 156 of file G4IonTable.cc.

157 {
158  if( fIonList == 0 )
159  { fIonList = new G4IonList(); }
160  else
161  { fIonList->clear(); }
162 
164  for (it = fIonListShadow->begin() ; it != fIonListShadow->end(); it++ ) {
167  fIonList->insert(*it);
168  }
169 
170  // Do not copy Isotoper Table to Worker thread
171  if( fIsotopeTableList == 0 ) {
172  fIsotopeTableList = new std::vector<G4VIsotopeTable*>;
173  for (size_t i = 0; i < fIsotopeTableListShadow->size(); i++){
174  fIsotopeTableList->push_back((*fIsotopeTableListShadow)[i]);
175  }
176  }
177 
180 }
static std::vector< G4VIsotopeTable * > * fIsotopeTableListShadow
Definition: G4IonTable.hh:319
static G4ThreadLocal std::vector< G4VIsotopeTable * > * fIsotopeTableList
Definition: G4IonTable.hh:317
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
std::multimap< G4int, const G4ParticleDefinition * > G4IonList
Definition: G4IonTable.hh:74
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316
std::multimap< G4int, const G4ParticleDefinition * >::iterator G4IonListIterator
Definition: G4IonTable.hh:75

Here is the caller graph for this function:

Member Data Documentation

const G4String G4IonTable::elementName
static
Initial value:
= {
"H", "He",
"Li", "Be", "B", "C", "N", "O", "F", "Ne",
"Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar",
"K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr",
"Rb", "Sr", "Y", "Zr", "Nb", "Mo","Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe",
"Cs", "Ba",
"La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu",
"Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl", "Pb", "Bi", "Po", "At", "Rn",
"Fr", "Ra",
"Ac", "Th", "Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm", "Md", "No", "Lr",
"Rf", "Db", "Sg", "Bh", "Hs", "Mt", "Ds", "Rg",
"Cp", "Uut", "Fl","Uup","Lv","Uus","Uuo"
}

Definition at line 328 of file G4IonTable.hh.

G4ThreadLocal G4IonTable::G4IonList * G4IonTable::fIonList = 0
static

Definition at line 316 of file G4IonTable.hh.

G4IonTable::G4IonList * G4IonTable::fIonListShadow = 0
static

Definition at line 318 of file G4IonTable.hh.

G4ThreadLocal std::vector< G4VIsotopeTable * > * G4IonTable::fIsotopeTableList = 0
static

Definition at line 317 of file G4IonTable.hh.

std::vector< G4VIsotopeTable * > * G4IonTable::fIsotopeTableListShadow = 0
static

Definition at line 319 of file G4IonTable.hh.


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