Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4IonTable.cc
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4IonTable.cc 106143 2017-09-14 06:34:42Z gcosmo $
28 //
29 //
30 // --------------------------------------------------------------
31 // GEANT 4 class implementation file
32 //
33 // History: first implementation, based on object model of
34 // 27 June 1998 H.Kurashige
35 // ---------------------------------------------------------------
36 // modified GetIon 02 Aug., 98 H.Kurashige
37 // added Remove() 06 Nov.,98 H.Kurashige
38 // use G4NucleiPropoerties to get nuceli Mass 17 Nov.,98 H.Kurashige
39 // use G4GenericIon for process List
40 // modify fomula of Ion mass 09 Dec., 98 H.Kurashige
41 // -----
42 // Modified GetIon methods 17 Aug. 99 H.Kurashige
43 // New design using G4VIsotopeTable 5 Oct. 99 H.Kurashige
44 // Modified Element Name for Z>103 06 Apr. 01 H.Kurashige
45 // Remove test of cuts in SetCuts 16 Jan 03 V.Ivanchenko
46 // Added initial support for Muonic Atoms 1 Jul 16 K.Lynch
47 // Extended support for Muonic Atoms September 17 K.L.Genser
48 
49 #include <iostream>
50 #include <iomanip>
51 #include <sstream>
52 
53 #include "G4ios.hh"
54 #include "G4Threading.hh"
55 
56 #include "G4IonTable.hh"
57 #include "G4PhysicalConstants.hh"
58 #include "G4SystemOfUnits.hh"
59 #include "G4ParticleTable.hh"
60 #include "G4StateManager.hh"
61 #include "G4Ions.hh"
62 #include "G4UImanager.hh"
63 #include "G4NucleiProperties.hh"
65 
66 #include "G4IsotopeProperty.hh"
67 #include "G4VIsotopeTable.hh"
68 #include "G4NuclideTable.hh"
69 
70 #include "G4MuonicAtom.hh"
71 #include "G4MuonicAtomHelper.hh"
72 
73 // It is very important for multithreaded Geant4 to keep only one copy of the
74 // particle table pointer and the ion table pointer. However, we try to let
75 // each worker thread hold its own copy of the particle dictionary and the
76 // ion list. This implementation is equivalent to make the ion table thread
77 // private. The two shadow ponters are used by each worker thread to copy the
78 // content from the master thread.
79 //
81 G4ThreadLocal std::vector<G4VIsotopeTable*> *G4IonTable::fIsotopeTableList = 0;
83 std::vector<G4VIsotopeTable*> *G4IonTable::fIsotopeTableListShadow = 0;
84 
85 namespace lightions {
86  static const G4ParticleDefinition* p_proton=0;
88  static const G4ParticleDefinition* p_triton=0;
89  static const G4ParticleDefinition* p_alpha=0;
90  static const G4ParticleDefinition* p_He3=0;
91  void Init() {
92  if ( p_proton ) return;
93  p_proton = G4ParticleTable::GetParticleTable()-> FindParticle("proton"); // proton
94  p_deuteron = G4ParticleTable::GetParticleTable()-> FindParticle("deuteron"); // deuteron
95  p_triton = G4ParticleTable::GetParticleTable()-> FindParticle("triton"); // tritoon
96  p_alpha = G4ParticleTable::GetParticleTable()-> FindParticle("alpha"); // alpha
97  p_He3 = G4ParticleTable::GetParticleTable()-> FindParticle("He3"); // He3
98  }
99 }
100 
101 namespace antilightions {
105  static const G4ParticleDefinition* p_alpha=0;
106  static const G4ParticleDefinition* p_He3=0;
107  void Init() {
108  if ( p_proton ) return;
109  p_proton = G4ParticleTable::GetParticleTable()-> FindParticle("anti_proton"); // proton
110  p_deuteron = G4ParticleTable::GetParticleTable()-> FindParticle("anti_deuteron"); // deuteron
111  p_triton = G4ParticleTable::GetParticleTable()-> FindParticle("anti_triton"); // tritoon
112  p_alpha = G4ParticleTable::GetParticleTable()-> FindParticle("anti_alpha"); // alpha
113  p_He3 = G4ParticleTable::GetParticleTable()-> FindParticle("anti_He3"); // He3
114  }
115 }
116 
117 #ifdef G4MULTITHREADED
118 G4Mutex G4IonTable::ionTableMutex = G4MUTEX_INITIALIZER;
119 #endif
120 
123  : pNuclideTable(0),
124  isIsomerCreated(false),
125  n_error(0)
126 {
127  fIonList = new G4IonList();
128 
129  // Set up the shadow pointer used by worker threads.
130  //
131  if (fIonListShadow == 0)
132  {
134  }
135 
136  fIsotopeTableList = new std::vector<G4VIsotopeTable*>;
137 
138  // Set up the shadow pointer used by worker threads.
139  //
140  if (fIsotopeTableListShadow == 0)
141  {
143  }
144 
147 }
148 
149 // This method is used by each worker thread to copy the content
150 // from the master thread.
151 //
153 {
154 G4Exception("G4IonTable::SlaveG4ParticleTable()","G4MT0000",FatalException,"Obsolete");
155 }
156 
158 {
159  if( fIonList == 0 )
160  { fIonList = new G4IonList(); }
161  else
162  { fIonList->clear(); }
163 
165  for (it = fIonListShadow->begin() ; it != fIonListShadow->end(); it++ ) {
168  fIonList->insert(*it);
169  }
170 
171  // Do not copy Isotoper Table to Worker thread
172  if( fIsotopeTableList == 0 ) {
173  fIsotopeTableList = new std::vector<G4VIsotopeTable*>;
174  for (size_t i = 0; i < fIsotopeTableListShadow->size(); i++){
175  fIsotopeTableList->push_back((*fIsotopeTableListShadow)[i]);
176  }
177  }
178 
181 }
182 
184 {
185  lightions::Init();
187 }
188 
189 
192 {
193  // delete IsotopeTable if exists
194  if (fIsotopeTableList != 0)
195  {
196  for (size_t i = 0; i< fIsotopeTableList->size(); ++i)
197  {
198  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[i];
199  //delete fIsotopeTable;
200  if( fIsotopeTable != G4NuclideTable::GetNuclideTable() ) delete fIsotopeTable;
201  }
202  fIsotopeTableList->clear();
203  delete fIsotopeTableList;
204  }
206 
207 
208  if (fIonList ==0) return;
209  // remove all contents in the Ion List
210  // No need to delete here because all particles are dynamic objects
211  fIonList->clear();
212 
213  delete fIonList;
214  fIonList =0;
215 }
216 
219 {
220  // delete IsotopeTable if exists
221  if (fIsotopeTableList != 0)
222  {
223  for (size_t i = 0; i< fIsotopeTableList->size(); ++i)
224  {
225  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[i];
226  //delete fIsotopeTable;
227  if( fIsotopeTable != G4NuclideTable::GetNuclideTable() ) delete fIsotopeTable;
228  }
229  fIsotopeTableList->clear();
230  delete fIsotopeTableList;
231  }
233 
234 
235  if (fIonList ==0) return;
236  // remove all contents in the Ion List
237  // No need to delete here because all particles are dynamic objects
238  fIonList->clear();
239 
240  delete fIonList;
241  fIonList =0;
242 }
243 
244 
246 // -- CreateIon method ------
250 {
252 
253  // check whether GenericIon has processes
254  G4ParticleDefinition* genericIon =
256  G4ProcessManager* pman=0;
257  if (genericIon!=0) pman = genericIon->GetProcessManager();
258  if ((genericIon ==0) || (genericIon->GetParticleDefinitionID() < 0) || (pman==0)){
259 #ifdef G4VERBOSE
260  if (GetVerboseLevel()>1) {
261  G4cout << "G4IonTable::CreateIon() : can not create ion of "
262  << " Z =" << Z << " A = " << A
263  << " because GenericIon is not ready !!" << G4endl;
264  }
265 #endif
266  G4Exception( "G4IonTable::CreateIon()","PART105",
267  JustWarning,
268  "Can not create ions because GenericIon is not ready");
269  return 0;
270  }
271 
272  G4double life = 0.0;
273  G4DecayTable* decayTable =0;
274  G4bool stable = true;
275  G4double mu = 0.0;
276  G4double Eex = 0.0;
277  G4int lvl =0;
278  G4int J=0;
279 
280  const G4IsotopeProperty* fProperty = FindIsotope(Z, A, E, flb);
281  if (fProperty !=0 ){
282  Eex = fProperty->GetEnergy();
283  lvl = fProperty->GetIsomerLevel();
284  J = fProperty->GetiSpin();
285  life = fProperty->GetLifeTime();
286  mu = fProperty->GetMagneticMoment();
287  decayTable = fProperty->GetDecayTable();
288  stable = (life <= 0.) || (decayTable ==0);
289  lvl = fProperty->GetIsomerLevel();
290  if (lvl <0) lvl=9;
291  } else {
292 #ifdef G4VERBOSE
293  if (GetVerboseLevel()>1) {
295  ed << "G4IonTable::CreateIon() : G4IsotopeProperty object was not found for"
296  << " Z = " << Z << " A = " << A << " E = " << E/keV << " (keV)";
298  { ed << " FloatingLevel +" << G4Ions::FloatLevelBaseChar(flb); }
299  ed << ".\n"
300  << " Physics quantities such as life are not set for this ion.";
301  G4Exception( "G4IonTable::CreateIon()","PART70105", JustWarning, ed);
302  }
303 #endif
304  // excitation energy
305  Eex = E;
306  // lvl is assigned to 9 temporally
307  if (Eex>0.0) lvl=9;
308  }
309 
310  //Eex = G4NuclideTable::Round(Eex);
311  if (Eex==0.0) lvl=0;
312  // ion name
313  G4String name ="";
315  if (lvl==0 && flb==G4Ions::G4FloatLevelBase::no_Float) name = GetIonName(Z, A, lvl);
316  else name = GetIonName(Z, A, Eex, flb);
317 
318  // PDG encoding
319  G4int encoding = GetNucleusEncoding(Z,A,E,lvl);
320 
321 //G4cout<<"G4IonTable::CreateIon "<<"Z:"<<Z<<" A:"<<A<<" E:"<<E<<" Eex:"<<Eex<<" lvl:"<<lvl<<" name:"<<name<<" code:"<<encoding<<G4endl;
322  // PDG mass
323  G4double mass = GetNucleusMass(Z, A)+ Eex;
324 
325  // PDG charge is set to one of nucleus
326  G4double charge = G4double(Z)*eplus;
327 
328  // create an ion
329  // spin, parity, isospin values are fixed
330 
331  // Request lock for particle table accesses. Some changes are inside
332  // this critical region.
333  //
334 
335  ion = new G4Ions( name, mass, 0.0*MeV, charge,
336  J, +1, 0,
337  0, 0, 0,
338  "nucleus", 0, A, encoding,
339  stable, life, decayTable, false,
340  "generic", 0,
341  Eex, lvl );
342 
343  // Release lock for particle table accesses.
344  //
345 
346  ion->SetPDGMagneticMoment(mu);
347  static_cast<G4Ions*>(ion)->SetFloatLevelBase(flb);
348 
349  //No Anti particle registered
350  ion->SetAntiPDGEncoding(0);
351 
352 #ifdef G4VERBOSE
353  if (GetVerboseLevel()>1) {
354  G4cout << "G4IonTable::CreateIon() : create ion of " << name
355  << " " << Z << ", " << A
356  << " encoding=" << encoding;
357  if (E>0.0) {
358  G4cout << " IsomerLVL=" << lvl
359  << " excited energy=" << Eex/keV << "[keV]";
360  }
361  G4cout << G4endl;
362  }
363 #endif
364 
365  // Add process manager to the ion
366  AddProcessManager(ion);
367 
368 #ifdef G4MULTITHREADED
369  // Fill decay channels if this method is invoked from worker
371  {
372  if(!stable && decayTable)
373  {
374  G4int nCh = decayTable->entries();
375  for(G4int iCh=0;iCh<nCh;iCh++)
376  { decayTable->GetDecayChannel(iCh)->GetDaughter(0); }
377  }
378  }
379 #endif
380 
381  return ion;
382 }
383 
384 
388 {
389  if (LL==0) return CreateIon(Z,A,E,flb);
390 
391  // create hyper nucleus
393 
394  // check whether GenericIon has processes
395  G4ParticleDefinition* genericIon =
397  G4ProcessManager* pman=0;
398  if (genericIon!=0) pman = genericIon->GetProcessManager();
399  if ((genericIon ==0) || (genericIon->GetParticleDefinitionID() < 0) || (pman==0)){
400 #ifdef G4VERBOSE
401  if (GetVerboseLevel()>1) {
402  G4cout << "G4IonTable::CreateIon() : can not create ion of "
403  << " Z =" << Z << " A = " << A
404  << " because GenericIon is not ready !!" << G4endl;
405  }
406 #endif
407  G4Exception( "G4IonTable::CreateIon()","PART105", JustWarning,
408  "Can not create ions because GenericIon is not ready");
409  return 0;
410  }
411 
412  G4int J=0;
413  G4double life = 0.0;
414  G4DecayTable* decayTable =0;
415  G4bool stable = true;
416 
417  // excitation energy
418  //G4double Eex = G4NuclideTable::Round(E);
419  G4double Eex = E;
420  G4double mass = GetNucleusMass(Z, A, LL)+ Eex;
421  G4int lvl = 0;
422  // lvl is assigned to 9 temporally
423  if (Eex>0.0) lvl=9;
424 
425  // PDG encoding
426  G4int encoding = GetNucleusEncoding(Z,A,LL,E,lvl);
427 
428  // PDG charge is set to one of nucleus
429  G4double charge = G4double(Z)*eplus;
430 
431  // create an ion
432  // spin, parity, isospin values are fixed
433  //
434  // get ion name
435  G4String name = GetIonName(Z, A, LL, Eex, flb);
436 
437  ion = new G4Ions( name, mass, 0.0*MeV, charge,
438  J, +1, 0,
439  0, 0, 0,
440  "nucleus", 0, A, encoding,
441  stable, life, decayTable, false,
442  "generic", 0,
443  Eex, lvl );
444 
445  // Release lock for particle table accesses.
446  //
447 
448  G4double mu = 0.0; // magnetic moment
449  ion->SetPDGMagneticMoment(mu);
450  static_cast<G4Ions*>(ion)->SetFloatLevelBase(flb);
451 
452  //No Anti particle registered
453  ion->SetAntiPDGEncoding(0);
454 
455 #ifdef G4VERBOSE
456  if (GetVerboseLevel()>1) {
457  G4cout << "G4IonTable::CreateIon() : create hyper ion of " << name
458  << " " << Z << ", " << A << ", " << LL
459  << " encoding=" << encoding;
460  if (E>0.0) {
461  G4cout << " IsomerLVL=" << lvl
462  << " excited energy=" << Eex/keV << "[keV]";
463  }
464  G4cout << G4endl;
465  }
466 #endif
467 
468  // Add process manager to the ion
469  AddProcessManager(ion);
470 
471  return ion;
472 }
473 
476 {
477  if(lvl == 0) return CreateIon(Z,A,0.0,G4Ions::G4FloatLevelBase::no_Float);
478  G4Exception( "G4IonTable::CreateIon()","PART105", JustWarning,
479  "Ion cannot be created by an isomer level. Use excitation energy.");
480  return 0;
481 }
482 
483 
486 {
487  if (LL==0) return CreateIon(Z,A,lvl);
488  if(lvl == 0) return CreateIon(Z,A,0.0,G4Ions::G4FloatLevelBase::no_Float);
489 
490  if (lvl>0) {
492  ed << "Isomer level " << lvl << " is unknown for the isotope (Z="
493  << Z << ", A=" << A << ", L=" << LL << "). Null pointer is returned.";
494  G4Exception( "G4IonTable::GetIon()","PART106", JustWarning, ed);
495  return 0;
496  }
497 
498  return 0;
499 }
500 
502 // -- GetIon methods ------
505 {
506  if ( (A<1) || (Z<=0) || (lvl<0) || (A>999) ) {
507 #ifdef G4VERBOSE
508  if (GetVerboseLevel()>0) {
509  G4cout << "G4IonTable::GetIon() : illegal atomic number/mass"
510  << " Z =" << Z << " A = " << A << " Lvl = " << lvl << G4endl;
511  }
512 #endif
513  return 0;
514  }
515  if ( lvl == 0 ) return GetIon(Z,A,0.0);
516 
517  // Search ions with A, Z, lvl
518  G4ParticleDefinition* ion = FindIon(Z,A,lvl);
519 
520  // create ion
521 #ifdef G4MULTITHREADED
522  if (ion ==0 ){
524  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
525  ion = FindIonInMaster(Z,A,lvl);
526  if(ion != 0) InsertWorker(ion);
527  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
528  }
529  }
530 #endif
531  if (ion ==0 ){
532  G4Exception( "G4IonTable::GetIon()","PART105", JustWarning,
533  "Ion cannot be created by an isomer level. Use excitation energy.");
534  // G4ExceptionDescription ed;
535  // ed << "Isomer level " << lvl << " is unknown for the isotope (Z="
536  // << Z << ", A=" << A << "). Null pointer is returned.";
537  // G4Exception( "G4IonTable::GetIon()","PART106", JustWarning, ed);
538  }
539  return ion;
540 }
541 
542 
545 {
546  if (LL==0) return GetIon(Z,A,lvl);
547 
548  if (A < 2 || Z < 0 || Z > A-LL || LL>A || A>999 ) {
549 #ifdef G4VERBOSE
550  if (GetVerboseLevel()>0) {
551  G4cout << "G4IonTable::GetIon() : illegal atomic number/mass"
552  << " Z =" << Z << " A = " << A << " L = " << LL
553  <<" IsomerLvl = " << lvl << G4endl;
554  }
555 #endif
556  return 0;
557  } else if( A==2 ) {
558 #ifdef G4VERBOSE
559  if (GetVerboseLevel()>0) {
560  G4cout << "G4IonTable::GetIon() : No boud state for "
561  << " Z =" << Z << " A = " << A << " L = " << LL
562  <<" IsomerLvl = " << lvl << G4endl;
563  }
564 #endif
565  return 0;
566  }
567 
568  // Search ions with A, Z
569  G4ParticleDefinition* ion = FindIon(Z,A,LL,lvl);
570 
571  // create ion
572  if (ion == 0) {
573  if (lvl==0) {
574 #ifdef G4MULTITHREADED
576  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
577  ion = FindIonInMaster(Z,A,LL,lvl);
578  if(ion == 0) ion = CreateIon(Z, A, LL, lvl);
579  InsertWorker(ion);
580  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
581  } else {
582  ion = CreateIon(Z, A, LL, lvl);
583  }
584 #else
585  ion = CreateIon(Z, A, LL, lvl);
586 #endif
587  }
588  }
589 
590 // if(ion == 0)
591 // {
592 // G4ExceptionDescription ed;
593 // ed << "Isomer level " << lvl << " is unknown for the isotope (Z="
594 // << Z << ", A=" << A << ", L=" << LL << "). Null pointer is returned.";
595 // G4Exception( "G4IonTable::GetIon()","PART106", JustWarning, ed);
596 // }
597  return ion;
598 }
599 
602 { return GetIon(Z,A,E,G4Ions::G4FloatLevelBase::no_Float,J); }
603 
606  char flbChar, G4int J)
607 { return GetIon(Z,A,E,G4Ions::FloatLevelBase(flbChar),J); }
608 
612 {
613  if ( (A<1) || (Z<=0) || (E<0.0) || (A>999) || (J<0) ) {
614 #ifdef G4VERBOSE
615  if (GetVerboseLevel()>0) {
616  G4cout << "G4IonTable::GetIon() : illegal atomic number/mass"
617  << " Z =" << Z << " A = " << A << " E = " << E/keV << G4endl;
618  }
619 #endif
620  return 0;
621  }
622 
623  // Search ions with A, Z
624  G4ParticleDefinition* ion = FindIon(Z,A,E,flb,J);
625 
626  // create ion
627 #ifdef G4MULTITHREADED
628  if(ion == 0)
629  {
631  {
632  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
633  ion = FindIonInMaster(Z,A,E,flb,J);
634  if(ion == 0) ion = CreateIon(Z,A,E,flb);
635  InsertWorker(ion);
636  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
637  }
638  else
639  { ion = CreateIon(Z,A,E,flb); }
640  }
641 #else
642  if (ion == 0) ion = CreateIon(Z,A,E,flb);
643 #endif
644 
645  return ion;
646 }
647 
650 { return GetIon(Z,A,LL,E,G4Ions::G4FloatLevelBase::no_Float,J); }
651 
654  char flbChar, G4int J)
655 { return GetIon(Z,A,LL,E,G4Ions::FloatLevelBase(flbChar),J); }
656 
660 {
661  if (LL==0) return GetIon(Z,A,E,flb,J);
662 
663  if (A < 2 || Z < 0 || Z > A-LL || LL>A || A>999 ) {
664 #ifdef G4VERBOSE
665  if (GetVerboseLevel()>0) {
666  G4cout << "G4IonTable::GetIon() : illegal atomic number/mass"
667  << " Z =" << Z << " A = " << A << " L = " << LL
668  <<" E = " << E/keV << G4endl;
669  }
670 #endif
671  return 0;
672  } else if( A==2 ) {
673 #ifdef G4VERBOSE
674  if (GetVerboseLevel()>0) {
675  G4cout << "G4IonTable::GetIon() : No boud state for "
676  << " Z =" << Z << " A = " << A << " L = " << LL
677  << " E = " << E/keV << G4endl;
678  }
679 #endif
680  return 0;
681  }
682 
683  // Search ions with A, Z
684  G4ParticleDefinition* ion = FindIon(Z,A,LL,E,flb,J);
685 
686  // create ion
687 #ifdef G4MULTITHREADED
688  if(ion == 0)
689  {
691  {
692  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
693  ion = FindIonInMaster(Z,A,LL,E,flb,J);
694  if(ion == 0) ion = CreateIon(Z,A,LL,E,flb);
695  InsertWorker(ion);
696  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
697  }
698  else
699  { ion = CreateIon(Z,A,LL,E,flb); }
700  }
701 #else
702  if(ion == 0) ion = CreateIon(Z,A,LL,E,flb);
703 #endif
704 
705  return ion;
706 }
707 
710 {
711  G4int Z, A, LL, IsoLvl;
712  G4double E;
713  if (!GetNucleusByEncoding(encoding,Z,A,LL,E,IsoLvl) ){
714 #ifdef G4VERBOSE
715  if (GetVerboseLevel()>0) {
716  G4cout << "G4IonTable::GetIon() : illegal encoding"
717  << " CODE:" << encoding << G4endl;
718  }
719 #endif
720  G4Exception( "G4IonTable::GetIon()","PART106",
721  JustWarning, "illegal encoding for an ion");
722  return 0;
723  }
724  //
725  return GetIon( Z, A, LL, IsoLvl);
726 }
727 
729 // -- FindIon methods ------
732 { return FindIon(Z,A,E,G4Ions::G4FloatLevelBase::no_Float,J); }
733 
736  char flbChar, G4int J)
737 { return FindIon(Z,A,E,G4Ions::FloatLevelBase(flbChar),J); }
738 
742 {
743  if ( (A<1) || (Z<=0) || (J<0) || (E<0.0) || (A>999) ) {
744 #ifdef G4VERBOSE
745  if (GetVerboseLevel()>0) {
746  G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
747  << " Z =" << Z << " A = " << A << " E = " << E/keV << G4endl;
748  }
749 #endif
750  G4Exception( "G4IonTable::FindIon()","PART107",
751  JustWarning, "illegal atomic number/mass");
752  return 0;
753  }
754  // Search ions with A, Z ,E
755  // !! J is omitted now !!
756  const G4ParticleDefinition* ion=0;
757  G4bool isFound = false;
758 
759  // check if light ion
760  ion = GetLightIon(Z,A);
761  if (ion!=0 && E==0.0) {
762  // light ion
763  isFound = true;
764  } else {
765  // -- loop over all particles in Ion table
767  G4IonList::iterator i = fIonList->find(encoding);
768  for( ;i != fIonList->end() ; i++) {
769  ion = i->second;
770  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
771  // excitation level
772  G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy();
773  if (std::fabs(E - anExcitaionEnergy) < pNuclideTable->GetLevelTolerance() ) {
774  if(((const G4Ions*)(ion))->GetFloatLevelBase()==flb)
775  {
776  isFound = true;
777  break;
778  }
779  }
780  }
781  }
782 
783  if ( isFound ){
784  return const_cast<G4ParticleDefinition*>(ion);
785  } else {
786  return 0;
787  }
788 }
789 
790 
793 { return FindIon(Z,A,LL,E,G4Ions::G4FloatLevelBase::no_Float,J); }
794 
797  char flbChar, G4int J)
798 { return FindIon(Z,A,LL,E,G4Ions::FloatLevelBase(flbChar),J); }
799 
803 {
804  if (LL==0) return FindIon(Z,A,E,flb,J);
805 
806  if (A < 2 || Z < 0 || Z > A-LL || LL>A || A>999 ) {
807 #ifdef G4VERBOSE
808  if (GetVerboseLevel()>0) {
809  G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
810  << " Z =" << Z << " A = " << A << " L = " << LL
811  <<" E = " << E/keV << G4endl;
812  }
813 #endif
814  G4Exception( "G4IonTable::FindIon()","PART107",
815  JustWarning, "illegal atomic number/mass");
816  return 0;
817  }
818  // Search ions with A, Z ,E
819  // !! J is omitted now !!
820  const G4ParticleDefinition* ion=0;
821  G4bool isFound = false;
822 
823  // -- loop over all particles in Ion table
824  G4int encoding=GetNucleusEncoding(Z, A, LL, 0.0, 0);
825  G4IonList::iterator i = fIonList->find(encoding);
826  for( ;i != fIonList->end() ; i++) {
827  ion = i->second;
828  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
829  if( ion->GetQuarkContent(3) != LL) break;
830  // excitation level
831  G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy();
832  if (std::fabs(E - anExcitaionEnergy) < pNuclideTable->GetLevelTolerance() ) {
833  if(((const G4Ions*)(ion))->GetFloatLevelBase()==flb)
834  {
835  isFound = true;
836  break;
837  }
838  }
839  }
840 
841  if ( isFound ){
842  return const_cast<G4ParticleDefinition*>(ion);
843  } else {
844  return 0;
845  }
846 }
847 
848 
851 {
852  if ( (A<1) || (Z<=0) || (lvl<0) || (A>999) ) {
853 #ifdef G4VERBOSE
854  if (GetVerboseLevel()>0) {
855  G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
856  << " Z =" << Z << " A = " << A << " IsoLvl = " << lvl << G4endl;
857  }
858 #endif
859  G4Exception( "G4IonTable::FindIon()","PART107",
860  JustWarning, "illegal atomic number/mass");
861  return 0;
862  }
863  // Search ions with A, Z ,E
864  // !! J is omitted now !!
865  const G4ParticleDefinition* ion=0;
866  G4bool isFound = false;
867 
868  // check if light ion
869  ion = GetLightIon(Z,A);
870  if (ion!=0 && lvl==0) {
871  // light ion
872  isFound = true;
873  } else {
874  // -- loop over all particles in Ion table
876  G4IonList::iterator i = fIonList->find(encoding);
877  for( ;i != fIonList->end() ; i++) {
878  ion = i->second;
879  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
880  // excitation level
881  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
882  isFound = true;
883  break;
884  }
885  }
886  }
887 
888  if ( isFound ){
889  if(lvl==9)
890  {
891  G4Exception("G4IonTable::FindIon()","PART5107",JustWarning,
892  "Isomer level 9 may be ambiguous.");
893  }
894  return const_cast<G4ParticleDefinition*>(ion);
895  } else {
896  return 0;
897  }
898 }
899 
900 
903 {
904  if (LL==0) return FindIon(Z,A,lvl);
905 
906  if (A < 2 || Z < 0 || Z > A-LL || LL>A || A>999 ) {
907 #ifdef G4VERBOSE
908  if (GetVerboseLevel()>0) {
909  G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
910  << " Z =" << Z << " A = " << A << " L = " << LL
911  <<" IsomerLvl = " << lvl << G4endl;
912  }
913 #endif
914  G4Exception( "G4IonTable::FindIon()","PART107",
915  JustWarning, "illegal atomic number/mass");
916  return 0;
917  }
918  // Search ions with A, Z ,E, lvl
919  const G4ParticleDefinition* ion=0;
920  G4bool isFound = false;
921 
922  // -- loop over all particles in Ion table
924  G4IonList::iterator i = fIonList->find(encoding);
925  for( ;i != fIonList->end() ; i++) {
926  ion = i->second;
927  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
928  if ( ion->GetQuarkContent(3) != LL) break;
929  // excitation level
930  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
931  isFound = true;
932  break;
933  }
934  }
935 
936  if ( isFound ){
937  if(lvl==9)
938  {
939  G4Exception("G4IonTable::FindIon()","PART5107",JustWarning,
940  "Isomer level 9 may be ambiguous.");
941  }
942  return const_cast<G4ParticleDefinition*>(ion);
943  } else {
944  return 0;
945  }
946 }
947 
948 
951 {
952  // PDG code for Ions
953  // Nuclear codes are given as 10-digit numbers +-100ZZZAAAI.
954  //For a nucleus consisting of np protons and nn neutrons
955  // A = np + nn and Z = np.
956  // I gives the isomer level, with I = 0 corresponding
957  // to the ground state and I >0 to excitations
958 
959  if ( Z==1 && A==1 && E==0.0 ) return 2212; // proton
960 
961  G4int encoding = 1000000000;
962  encoding += Z * 10000;
963  encoding += A *10;
964  if (lvl>0&&lvl<10) encoding +=lvl; //isomer level
965  else if (E>0.0) encoding += 9; //isomer level
966 
967  return encoding;
968 }
969 
972  G4double E, G4int lvl)
973 {
974  // get PDG code for Hyper-Nucleus Ions
975  // Nuclear codes are given as 10-digit numbers +-10LZZZAAAI.
976  //For a nucleus consisting of np protons and nn neutrons
977  // A = np + nn +nlambda and Z = np.
978  // LL = nlambda
979  // I gives the isomer level, with I = 0 corresponding
980  // to the ground state and I >0 to excitations
981 
982  G4int encoding = GetNucleusEncoding(Z, A, E, lvl);
983  if (LL==0) return encoding;
984  encoding += LL* 10000000;
985  if ( Z==1 && A==1 && E==0.0 ) encoding = 3122; // Lambda
986 
987  return encoding;
988 }
989 
992  G4int &Z, G4int &A,
993  G4double &E, G4int &lvl)
994 {
995  if (encoding <= 0) return false; // anti particle
996 
997  if (encoding == 2212) { // proton
998  Z = 1; A = 1;
999  E = 0.0; lvl =0;
1000  return true;
1001  }
1002 
1003  encoding -= 1000000000;
1004  Z = encoding/10000;
1005  encoding -= 10000*Z;
1006  A = encoding/10;
1007  lvl = encoding % 10;
1008  return true;
1009 }
1010 
1013  G4int &Z, G4int &A,
1014  G4int &LL,
1015  G4double &E, G4int &lvl)
1016 {
1017  if (encoding <= 0) return false; // anti particle
1018 
1019  if (encoding == 3122) { // Lambda
1020  Z = 1; A = 1; LL = 1;
1021  E = 0.0; lvl =0;
1022  return true;
1023  }
1024 
1025  if (encoding % 10 != 0) {
1027  return false;
1028  }
1029  if (encoding < 1000000000) {
1030  // anti particle
1031  return false;
1032  }
1033 
1034  encoding -= 1000000000;
1035  LL = encoding/10000000;
1036  encoding -= 10000000*LL;
1037  Z = encoding/10000;
1038  encoding -= 10000*Z;
1039  A = encoding/10;
1040  lvl = encoding % 10;
1041  return true;
1042 }
1043 
1044 #include "G4AutoDelete.hh"
1047  G4Ions::G4FloatLevelBase flb) const
1048 {
1049  static G4ThreadLocal G4String *pname = 0;
1050  if (!pname) { pname = new G4String(""); G4AutoDelete::Register(pname); }
1051  G4String &name = *pname;
1052 
1053  static G4ThreadLocal std::ostringstream* os = 0;
1054  if ( ! os ) {
1055  os = new std::ostringstream();
1057  os->setf(std::ios::fixed);
1058  os->precision(3);
1059  }
1060 
1061  name = GetIonName(Z, A);
1062 
1063  //excited energy
1064  if ( E>0 || flb!=G4Ions::G4FloatLevelBase::no_Float){
1065  os->str("");
1066  std::ostringstream& oo = *os;
1067  // Excited nucleus
1068  oo<<'['<<E/keV;
1070  { oo<<G4Ions::FloatLevelBaseChar(flb); }
1071  oo<< ']';
1072  name += os->str();
1073  }
1074 
1075  return name;
1076 }
1077 
1080  G4Ions::G4FloatLevelBase flb) const
1081 {
1082  if (LL==0) return GetIonName(Z, A, E, flb);
1083  static G4ThreadLocal G4String *pname = 0;
1084  if (!pname) { pname = new G4String(""); G4AutoDelete::Register(pname); }
1085  G4String &name = *pname;
1086  name = "";
1087  for (int i =0; i<LL; i++){
1088  name +="L";
1089  }
1090  name += GetIonName(Z, A, E, flb);
1091  return name;
1092 }
1093 
1096 {
1097  static G4ThreadLocal G4String *pname = 0;
1098  if (!pname) { pname = new G4String(""); G4AutoDelete::Register(pname); }
1099  G4String &name = *pname;
1100 
1101  static G4ThreadLocal std::ostringstream* os = 0;
1102  if ( ! os ) {
1103  os = new std::ostringstream();
1105  os->setf(std::ios::fixed);
1106  }
1107 
1108  if ( (0< Z) && (Z <=numberOfElements) ) {
1109  name = elementName[Z-1];
1110  } else if (Z > numberOfElements) {
1111  os->str("");
1112  os->operator<<(Z);
1113  name = "E" + os->str() + "-";
1114  } else {
1115  name = "?";
1116  return name;
1117  }
1118  // Atomic Mass
1119  os->str("");
1120  os->operator<<(A);
1121 
1122  if ( lvl>0 ){
1123  std::ostringstream& oo = *os;
1124  // isomer level for Excited nucelus
1125  oo<<'['<<lvl << ']';
1126  }
1127  name += os->str();
1128 
1129  return name;
1130 }
1131 
1134 {
1135  if (LL==0) return GetIonName(Z, A, lvl);
1136  static G4ThreadLocal G4String *pname = 0;
1137  if (!pname) { pname = new G4String(""); G4AutoDelete::Register(pname); }
1138  G4String &name = *pname;
1139  for (int i =0; i<LL; i++){
1140  name +="L";
1141  }
1142  name += GetIonName(Z, A, lvl);
1143  return name;
1144 }
1145 
1146 
1149 {
1150  // return true if the particle is ion
1151 
1152  static const G4String nucleus("nucleus");
1153  static const G4String proton("proton");
1154 
1155  // neutron is not ion
1156  if ((particle->GetAtomicMass()>0) &&
1157  (particle->GetAtomicNumber()>0) ){
1158  if (particle->GetBaryonNumber()>0) return true;
1159  else return false;
1160  }
1161 
1162 
1163  // particles derived from G4Ions
1164  if (particle->GetParticleType() == nucleus) return true;
1165 
1166  // proton (Hydrogen nucleus)
1167  if (particle->GetParticleName() == proton) return true;
1168 
1169  return false;
1170 }
1171 
1174 {
1175  // return true if the particle is ion
1176 
1177  static const G4String anti_nucleus("anti_nucleus");
1178  static const G4String anti_proton("anti_proton");
1179 
1180  // anti_neutron is not ion
1181  if ((particle->GetAtomicMass()>0) &&
1182  (particle->GetAtomicNumber()>0) ){
1183  if (particle->GetBaryonNumber()<0) return true;
1184  else return false;
1185  }
1186 
1187  // particles derived from G4Ions
1188  if (particle->GetParticleType() == anti_nucleus) return true;
1189 
1190  // anti_proton (Anti_Hydrogen nucleus)
1191  if (particle->GetParticleName() == anti_proton) return true;
1192 
1193  return false;
1194 }
1195 
1197 #include <algorithm>
1198 
1200 {
1201  static const std::string names[] = { "proton", "alpha", "deuteron",
1202  "triton", "He3"};
1203 
1204  // return true if the particle is pre-defined ion
1205  return std::find(names, names+5, particle->GetParticleName())!=names+5;
1206 }
1207 
1209 {
1210  static const std::string names[] = { "anti_proton", "anti_alpha", "anti_deuteron",
1211  "anti_triton", "anti_He3"};
1212 
1213  // return true if the particle is pre-defined ion
1214  return std::find(names, names+5, particle->GetParticleName())!=names+5;
1215 }
1216 
1219 {
1220  // returns pointer to pre-defined ions
1221  const G4ParticleDefinition* ion=0;
1222  if ( (Z<=2) ) {
1223 #ifndef G4MULTITHREADED
1224  //In sequential use lazy-initialization
1225  lightions::Init();
1226 #endif
1227  if ( (Z==1)&&(A==1) ) {
1228  ion = lightions::p_proton;
1229  } else if ( (Z==1)&&(A==2) ) {
1230  ion = lightions::p_deuteron;
1231  } else if ( (Z==1)&&(A==3) ) {
1232  ion = lightions::p_triton;
1233  } else if ( (Z==2)&&(A==4) ) {
1234  ion = lightions::p_alpha;
1235  } else if ( (Z==2)&&(A==3) ) {
1236  ion = lightions::p_He3;
1237  }
1238  }
1239  return const_cast<G4ParticleDefinition*>(ion);
1240 }
1241 
1244 {
1245  // returns pointer to pre-defined ions
1246  const G4ParticleDefinition* ion=0;
1247  if ( (Z<=2) ) {
1248 #ifndef G4MULTITHREADED
1249  //In sequential use lazy-initialization
1251 #endif
1252  if ( (Z==1)&&(A==1) ) {
1254  } else if ( (Z==1)&&(A==2) ) {
1256  } else if ( (Z==1)&&(A==3) ) {
1258  } else if ( (Z==2)&&(A==4) ) {
1259  ion = antilightions::p_alpha;
1260  } else if ( (Z==2)&&(A==3) ) {
1261  ion = antilightions::p_He3;
1262  }
1263  }
1264  return const_cast<G4ParticleDefinition*>(ion);
1265 }
1266 
1267 
1269 // -- GetNucleusMass/GetIonMass ---
1272 {
1273  if ( (A<1) || (Z<0) || (LL<0) || (lvl<0) || (lvl>9) ){
1274 #ifdef G4VERBOSE
1275  if (GetVerboseLevel()>0) {
1276  G4cout << "G4IonTable::GetNucleusMass() : illegal atomic number/mass "
1277  << " Z =" << Z << " A = " << A
1278  << " L = " << LL << " lvl = " << lvl << G4endl;
1279  }
1280 #endif
1281  G4Exception( "G4IonTable::GetNucleusMass()","PART107",
1282  EventMustBeAborted, "illegal atomic number/mass");
1283  return -1.0;
1284  }
1285 
1286  G4double mass;
1287  if (LL == 0) {
1288  // calculate nucleus mass
1289  const G4ParticleDefinition* ion=GetLightIon(Z, A);
1290 
1291  if (ion!=0) {
1292  mass = ion->GetPDGMass();
1293  } else {
1294  // use G4NucleiProperties::GetNuclearMass
1296  }
1297 
1298  // Isomer
1299  if ( lvl>0 ) {
1300  // -- loop over all particles in Ion table
1302  G4IonList::iterator i = fIonList->find(encoding);
1303  G4bool isFound =false;
1304  for( ;i != fIonList->end() ; i++) {
1305  ion = i->second;
1306  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1307  // excitation level
1308  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
1309  isFound = true;
1310  break;
1311  }
1312  }
1313  if (isFound) {
1314  // return existing isomer mass
1315  mass = ion->GetPDGMass();
1316  } else {
1317  // Find isomer from IsotopeTable
1318  const G4IsotopeProperty* fProperty = FindIsotope(Z, A, lvl);
1319  if (fProperty !=0 ) mass += fProperty->GetEnergy();
1320  }
1321  }
1322 
1323  } else {
1324  mass = G4HyperNucleiProperties::GetNuclearMass(A, Z, LL);
1325  }
1326  return mass;
1327 }
1328 
1331 {
1332  return GetNucleusMass(Z,A,0,lvl);
1333 }
1334 
1337 {
1338  return GetNucleusMass(Z,A,LL,lvl);
1339 }
1340 
1341 
1343 // -- Methods for handling conatiner ---
1345 
1347 {
1348  if (G4ParticleTable::GetParticleTable()->GetReadiness()) {
1349  G4Exception("G4IonTable::clear()",
1350  "PART116", JustWarning,
1351  "No effects because readyToUse is true.");
1352  return;
1353  }
1354 
1355 #ifdef G4VERBOSE
1356  if (GetVerboseLevel()>2) {
1357  G4cout << "G4IonTable::Clear() : number of Ion regsitered = ";
1358  G4cout << fIonList->size() << G4endl;
1359  }
1360 #endif
1361  fIonList->clear();
1362 }
1363 
1365 {
1366  if (!IsIon(particle)) return;
1367  if (Contains(particle)) return;
1368 
1369  G4int Z = particle->GetAtomicNumber();
1370  G4int A = particle->GetAtomicMass();
1371  G4int LL = particle->GetQuarkContent(3); //strangeness
1372  G4int encoding=GetNucleusEncoding(Z, A, LL); // encoding of the groud state
1373 
1374  // regsiter the ion with its encoding of the groud state
1375  fIonListShadow->insert( std::pair<const G4int, const G4ParticleDefinition*>(encoding, particle) );
1376 
1377 }
1378 
1380 {
1381  if(!particle) return;
1382 
1383  G4int Z = particle->GetAtomicNumber();
1384  G4int A = particle->GetAtomicMass();
1385  G4int LL = particle->GetQuarkContent(3); //strangeness
1386  G4int encoding=GetNucleusEncoding(Z, A, LL);
1387  G4bool found = false;
1388  if (encoding !=0 ) {
1389  G4IonList::iterator i = fIonList->find(encoding);
1390  for( ;i != fIonList->end() ; i++) {
1391  if (particle == i->second ) {
1392  found = true;
1393  break;
1394  }
1395  }
1396  }
1397  if(found) return;
1398 
1399  // regsiter the ion with its encoding of the groud state
1400  fIonList->insert( std::pair<const G4int, const G4ParticleDefinition*>(encoding, particle) );
1401 
1402 }
1403 
1406 {
1407  if(!particle) return;
1408 #ifdef G4MULTITHREADED
1411  ed << "Request of removing " << particle->GetParticleName()
1412  << " is ignored as it is invoked from a worker thread.";
1413  G4Exception("G4IonTable::Remove()","PART10117",JustWarning,ed);
1414  return;
1415  }
1416 #endif
1417  if (G4ParticleTable::GetParticleTable()->GetReadiness()) {
1419  G4ApplicationState currentState = pStateManager->GetCurrentState();
1420  if (currentState != G4State_PreInit) {
1421  G4String msg = "Request of removing ";
1422  msg += particle->GetParticleName();
1423  msg += " has No effects other than Pre_Init";
1424  G4Exception("G4IonTable::Remove()",
1425  "PART117", JustWarning, msg);
1426  return;
1427  } else {
1428 #ifdef G4VERBOSE
1429  if (GetVerboseLevel()>0){
1430  G4cout << particle->GetParticleName()
1431  << " will be removed from the IonTable " << G4endl;
1432  }
1433 #endif
1434  }
1435  }
1436 
1437  if (IsIon(particle)) {
1438  G4int Z = particle->GetAtomicNumber();
1439  G4int A = particle->GetAtomicMass();
1440  G4int LL = particle->GetQuarkContent(3); //strangeness
1441  G4int encoding=GetNucleusEncoding(Z, A, LL);
1442  if (encoding !=0 ) {
1443  G4IonList::iterator i = fIonListShadow->find(encoding);
1444  for( ;i != fIonListShadow->end() ; i++) {
1445  if (particle == i->second) {
1446  fIonListShadow->erase(i);
1447  break;
1448  }
1449  }
1450  }
1451  } else {
1452 #ifdef G4VERBOSE
1453  if (GetVerboseLevel()>1) {
1454  G4cout << "G4IonTable::Remove :" << particle->GetParticleName()
1455  << " is not ions" << G4endl;
1456  }
1457 #endif
1458  }
1459 
1460 }
1461 
1462 
1463 
1465 // -- Dump Information
1467 void G4IonTable::DumpTable(const G4String &particle_name) const
1468 {
1469  const G4ParticleDefinition* ion;
1470  G4IonList::iterator idx;
1471  for (idx = fIonList->begin(); idx!= fIonList->end(); ++idx) {
1472  ion = idx->second;
1473  if (( particle_name == "ALL" ) || (particle_name == "all")){
1474  ion->DumpTable();
1475  } else if ( particle_name == ion->GetParticleName() ) {
1476  ion->DumpTable();
1477  }
1478  }
1479 }
1480 
1483  "H", "He",
1484  "Li", "Be", "B", "C", "N", "O", "F", "Ne",
1485  "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar",
1486  "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr",
1487  "Rb", "Sr", "Y", "Zr", "Nb", "Mo","Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe",
1488  "Cs", "Ba",
1489  "La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu",
1490  "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl", "Pb", "Bi", "Po", "At", "Rn",
1491  "Fr", "Ra",
1492  "Ac", "Th", "Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm", "Md", "No", "Lr",
1493  "Rf", "Db", "Sg", "Bh", "Hs", "Mt", "Ds", "Rg",
1494  "Cp", "Uut", "Fl","Uup","Lv","Uus","Uuo"
1495 };
1496 
1497 
1500 {
1502 }
1503 
1506 {
1507  // check State and do not attach process managaer in event loop
1508 // G4StateManager* pStateManager = G4StateManager::GetStateManager();
1509 // G4ApplicationState currentState = pStateManager->GetCurrentState();
1510 // if (currentState == G4State_EventProc) return;
1511 // {
1512 // if (n_error<10)
1513 // {
1514 // G4cout << "Defining process manager for " << ion->GetParticleName() << G4endl;
1515 // G4Exception("G4IonTable::AddProcessManager()", "PART130", JustWarning,
1516 // "Defining process manager during an event loop is thread unsafe and will be dropped from the next release.");
1517 // n_error +=1;
1518 // }
1519 // return;
1520 // }
1521 
1522  if(ion->IsGeneralIon()) {
1523 
1524  // check whether GenericIon has processes
1525  G4ParticleDefinition* genericIon =
1527 
1528  G4ProcessManager* pman=0;
1529  if (genericIon!=0) pman = genericIon->GetProcessManager();
1530  if ((genericIon ==0) || (genericIon->GetParticleDefinitionID() < 0) || (pman==0)){
1531  G4cout << "G4IonTable::AddProcessManager() : can not create ion of "
1532  << ion->GetParticleName()
1533  << " because GenericIon is not available!!" << G4endl;
1534  G4Exception( "G4IonTable::AddProcessManager()","PART105", FatalException,
1535  "Can not create ions because GenericIon is not available");
1536  return;
1537  }
1538 
1541  }
1542  else {
1543 
1544  // is this a MuonicAtom ?
1545 
1546  G4MuonicAtom* muatom = dynamic_cast<G4MuonicAtom*> (ion);
1547 
1548  if ( muatom != nullptr ) {
1549 #ifdef G4VERBOSE
1550  if (GetVerboseLevel()>1) {
1551  G4cout << "G4IonTable::AddProcessManager() : MuonicAtom dynamic_cast succeeded for "
1552  << ion->GetParticleName() << G4endl;
1553  }
1554 #endif
1555  // check whether GenericMuonicAtom has processes
1556  G4ParticleDefinition* genericMA =
1558 
1559  G4ProcessManager* pman = nullptr;
1560  if (genericMA != nullptr) pman = genericMA->GetProcessManager();
1561  if ((genericMA == nullptr) || (genericMA->GetParticleDefinitionID() < 0) || (pman==nullptr)){
1562  G4cout << "G4IonTable::AddProcessManager() : can not create MuonicAtom "
1563  << ion->GetParticleName()
1564  << " because GenericMuonicAtom is not available!!" << G4endl;
1565  G4Exception( "G4IonTable::AddProcessManager()","PART106", FatalException,
1566  "Can not create MuonicAtoms because GenericMuonicAtom is not available");
1567  return;
1568  }
1569 
1572 
1573  }
1574  else {
1575  G4cout << "G4IonTable::AddProcessManager() : can not create "
1576  << ion->GetParticleName()
1577  << " because of unsupported particle type !!" << G4endl;
1578  G4Exception( "G4IonTable::AddProcessManager()","PART107", FatalException,
1579  "Can not create particle");
1580  return;
1581  }
1582  }
1583  return;
1584 }
1585 
1586 #include <vector>
1587 
1590 {
1591  //check duplication
1592  G4String name = table->GetName();
1593  for (size_t i = 0; i< fIsotopeTableList->size(); ++i) {
1594  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[i];
1595  if (name == fIsotopeTable->GetName()) return;
1596  }
1597 
1598  // register
1599  fIsotopeTableList->push_back(table);
1600 }
1601 
1604 {
1605  G4VIsotopeTable* fIsotopeTable=0;
1606  if ( index < fIsotopeTableList->size() ) {
1607  fIsotopeTable = (*fIsotopeTableList)[index];
1608  }
1609  return fIsotopeTable;
1610 }
1611 
1612 
1615  G4Ions::G4FloatLevelBase flb) const
1616 {
1617  if (fIsotopeTableList ==0) return 0;
1618  if (fIsotopeTableList->size()==0) return 0;
1619 
1620  G4IsotopeProperty* property =0;
1621 
1622  // iterate
1623  for (size_t i = 0; i<fIsotopeTableList->size(); ++i) {
1624  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[fIsotopeTableList->size()-i-1];
1625  property = fIsotopeTable->GetIsotope(Z,A,E,flb);
1626  if(property) break;
1627  }
1628 
1629  return property;
1630 }
1631 
1634 {
1635  if (fIsotopeTableList ==0) return 0;
1636  if (fIsotopeTableList->size()==0) return 0;
1637 
1638  G4IsotopeProperty* property =0;
1639 
1640  // iterate
1641  for (size_t i = 0; i<fIsotopeTableList->size(); ++i) {
1642  G4VIsotopeTable* fIsotopeTable= (*fIsotopeTableList)[fIsotopeTableList->size()-i-1];
1643  property = fIsotopeTable->GetIsotope(Z,A,lvl);
1644  if(property) break;
1645  }
1646 
1647  return property;
1648 }
1649 
1650 
1653 {
1654  PreloadNuclide();
1655 }
1656 
1659 {
1660  PreloadNuclide();
1661 }
1662 
1665 {
1667 }
1668 
1671 {
1673 
1675 
1676  for ( size_t i = 0 ; i != pNuclideTable->entries() ; i++ ) {
1677  const G4IsotopeProperty* fProperty = pNuclideTable->GetIsotopeByIndex( i );
1678  G4int Z = fProperty->GetAtomicNumber();
1679  G4int A = fProperty->GetAtomicMass();
1680  G4double Eex = fProperty->GetEnergy();
1681  GetIon(Z,A,Eex);
1682  }
1683 
1684  isIsomerCreated = true;
1685 }
1686 
1687 
1690 {
1691  if ( (index >=0) && (index < Entries()) ) {
1692  G4IonList::iterator idx = fIonList->begin();
1693  G4int counter = 0;
1694  while( idx != fIonList->end() ){// Loop checking, 09.08.2015, K.Kurashige
1695  if ( counter == index ) {
1696  return const_cast<G4ParticleDefinition*>(idx->second);
1697  }
1698  counter++;
1699  idx++;
1700  }
1701  }
1702 #ifdef G4VERBOSE
1703  if (GetVerboseLevel()>1){
1704  G4cout << " G4IonTable::GetParticle"
1705  << " invalid index (=" << index << ")"
1706  << " entries = " << Entries() << G4endl;
1707  }
1708 #endif
1709  return 0;
1710 }
1711 
1714 {
1715  if (!IsIon(particle)) return false;
1716 
1717  G4int Z = particle->GetAtomicNumber();
1718  G4int A = particle->GetAtomicMass();
1719  G4int LL = particle->GetQuarkContent(3); //strangeness
1720  G4int encoding=GetNucleusEncoding(Z, A, LL);
1721  G4bool found = false;
1722  if (encoding !=0 ) {
1723  G4IonList::iterator i = fIonListShadow->find(encoding);
1724  for( ;i != fIonListShadow->end() ; i++) {
1725  if (particle == i->second ) {
1726  found = true;
1727  break;
1728  }
1729  }
1730  }
1731  return found;
1732 }
1733 
1736 {
1737  return fIonList->size();
1738 }
1739 
1742 {
1743  return fIonList->size();
1744 }
1745 
1746 
1749  G4Ions::G4FloatLevelBase flb, G4int /*J*/)
1750 {
1751  // Search ions with A, Z ,E
1752  // !! J is omitted now !!
1753  const G4ParticleDefinition* ion=0;
1754  G4bool isFound = false;
1755 
1756  // -- loop over all particles in Ion table
1758  G4IonList::iterator i = fIonListShadow->find(encoding);
1759  for( ;i != fIonListShadow->end() ; i++) {
1760  ion = i->second;
1761  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1762  // excitation level
1763  G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy();
1764  if (std::fabs(E - anExcitaionEnergy) < pNuclideTable->GetLevelTolerance() ) {
1765  if(((const G4Ions*)(ion))->GetFloatLevelBase()==flb)
1766  {
1767  isFound = true;
1768  break;
1769  }
1770  }
1771  }
1772 
1773  if ( isFound ){
1774  return const_cast<G4ParticleDefinition*>(ion);
1775  } else {
1776  return 0;
1777  }
1778 }
1779 
1780 
1784 {
1785  if (LL==0) return FindIon(Z,A,E,flb,J);
1786 
1787  // Search ions with A, Z ,E
1788  // !! J is omitted now !!
1789  const G4ParticleDefinition* ion=0;
1790  G4bool isFound = false;
1791 
1792  // -- loop over all particles in Ion table
1793  G4int encoding=GetNucleusEncoding(Z, A, LL, 0.0, 0);
1794  G4IonList::iterator i = fIonListShadow->find(encoding);
1795  for( ;i != fIonListShadow->end() ; i++) {
1796  ion = i->second;
1797  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1798  if( ion->GetQuarkContent(3) != LL) break;
1799  // excitation level
1800  G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy();
1801  if (std::fabs(E - anExcitaionEnergy) < pNuclideTable->GetLevelTolerance() ) {
1802  if(((const G4Ions*)(ion))->GetFloatLevelBase()==flb)
1803  {
1804  isFound = true;
1805  break;
1806  }
1807  }
1808  }
1809 
1810  if ( isFound ){
1811  return const_cast<G4ParticleDefinition*>(ion);
1812  } else {
1813  return 0;
1814  }
1815 }
1816 
1817 
1820 {
1821  // Search ions with A, Z ,E
1822  // !! J is omitted now !!
1823  const G4ParticleDefinition* ion=0;
1824  G4bool isFound = false;
1825 
1826  // -- loop over all particles in Ion table
1828  G4IonList::iterator i = fIonListShadow->find(encoding);
1829  for( ;i != fIonListShadow->end() ; i++) {
1830  ion = i->second;
1831  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1832  // excitation level
1833  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
1834  isFound = true;
1835  break;
1836  }
1837  }
1838 
1839  if ( isFound ){
1840  return const_cast<G4ParticleDefinition*>(ion);
1841  } else {
1842  return 0;
1843  }
1844 }
1845 
1846 
1849 {
1850  if (LL==0) return FindIon(Z,A,lvl);
1851 
1852  // Search ions with A, Z ,E, lvl
1853  const G4ParticleDefinition* ion=0;
1854  G4bool isFound = false;
1855 
1856  // -- loop over all particles in Ion table
1857  G4int encoding=GetNucleusEncoding(Z, A, LL);
1858  G4IonList::iterator i = fIonListShadow->find(encoding);
1859  for( ;i != fIonListShadow->end() ; i++) {
1860  ion = i->second;
1861  if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break;
1862  if ( ion->GetQuarkContent(3) != LL) break;
1863  // excitation level
1864  if ( ((const G4Ions*)(ion))->GetIsomerLevel() == lvl) {
1865  isFound = true;
1866  break;
1867  }
1868  }
1869 
1870  if ( isFound ){
1871  return const_cast<G4ParticleDefinition*>(ion);
1872  } else {
1873  return 0;
1874  }
1875 }
1876 
1877 
1880 {
1881  //if(!(particle->IsGeneralIon())) return particle->GetPDGLifeTime();
1882 
1883  //const G4Ions* ion = static_cast<const G4Ions*>(particle);
1884  //G4int Z = ion->GetAtomicNumber();
1885  //G4int A = ion->GetAtomicMass();
1886  //G4double E = ion->GetExcitationEnergy();
1887 
1888  if((particle->IsGeneralIon()) && !pNuclideTable)
1889  {
1890  G4Exception("G4IonTable::GetLifeTime()","ParticleIon1001",FatalException,
1891  "Method is invoked before G4IonTable is initialized.");
1892  //return 0.;
1893  } //else {
1894  //G4IsotopeProperty* isoP = pNuclideTable->GetIsotope(Z,A,E);
1895  //if(!isoP) return -1001.0;
1896  //return isoP->GetLifeTime();
1897  //}
1898  return particle->GetPDGLifeTime();
1899 }
1900 
1903 { return GetLifeTime(Z,A,E,G4Ions::FloatLevelBase(flbChar)); }
1904 
1907  G4Ions::G4FloatLevelBase flb) const
1908 {
1909  G4double life = -1001.0;
1910  const G4IsotopeProperty* fProperty = FindIsotope(Z, A, E, flb);
1911  if( fProperty !=0 ) life = fProperty->GetLifeTime();
1912  return life;
1913 }
1914 
1915 
1918 {
1919  if (base==0 || !IsIon(base)){
1920  G4Exception("G4IonTable::GetMuonicAtom()", "PART987654321",FatalException,"Constructor argument is not a G4Ions");
1921  return 0;
1922  }
1923  // We're assuming here that we get a base that is actually
1924  // constructed and unexcited ... strip excitations, Lambdas, and
1925  // isomers from the encoding
1926 
1927  auto const Z = base->GetAtomicNumber();
1928  auto const A = base->GetAtomicMass();
1929  auto const baseenc = GetNucleusEncoding(Z,A);
1930  auto const encoding = baseenc+1000000000;
1931 
1932  // We have to do all the MT manipulations manually, because the
1933  // convenience functions assume a G4Ions with canonical PDG codes;
1934  // they recalculate the encoding from particle properties rather
1935  // than using the carried member function values. Thus, they will
1936  // do operations on the base ion, rather than the passed in
1937  // G4MuonicAtom
1938 
1939  auto i = fIonList->find(encoding);
1940  if(i!=fIonList->end()){
1941  return const_cast<G4ParticleDefinition*>(i->second);
1942  }
1943  // not in threadlocal list; check global list ...
1944 #ifdef G4MULTITHREADED
1946  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
1947  i = fIonListShadow->find(encoding);
1948  auto end = fIonListShadow->end();
1949  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
1950  if(i!=end){
1951  // we found it, stuff it into the threadlocal list
1952  fIonList->insert(*i);
1953  // and then return it ...
1954  return const_cast<G4ParticleDefinition*>(i->second);
1955  }
1956  }
1957 #endif
1958 
1959  // not found in either list; create and potentially insert
1960  auto const name = "Mu"+GetIonName(Z,A);
1961 
1962  G4MuonicAtom* muatom =
1964 
1965  // Not sure this is doing the right thing...
1966  AddProcessManager(muatom);
1967 
1968  // Now, we have to push the muatom into the appropriate IonTables
1969  // first, recheck global list, in case another thread came along
1970  // before us and created this same muatom
1971 #ifdef G4MULTITHREADED
1973  G4MUTEXLOCK(&G4IonTable::ionTableMutex);
1974  // first, we need to make sure it hasn't been inserted by some
1975  // other thread
1976  auto j = fIonListShadow->find(encoding);
1977  if( j!= fIonListShadow->end() ){
1978  // oops ... someone else built a copy when we weren't looking;
1979  // cleanup our instantiation, and take a handle to the one in
1980  // the global list
1981  delete muatom;
1982  muatom = const_cast<G4MuonicAtom*>(static_cast<G4MuonicAtom const*>(j->second));
1983  } else {
1984  // otherwise, push onto the global list first
1985  fIonListShadow->insert(std::make_pair(encoding, muatom));
1986  }
1987  G4MUTEXUNLOCK(&G4IonTable::ionTableMutex);
1988  }
1989 #endif
1990  // in either case, push onto the the threadlocal list
1991  fIonList->insert(std::make_pair(encoding,muatom));
1992 
1993  return muatom;
1994 }
1995 
1998 {
1999  // Need the cast because we need a G4Ions* to pass into the
2000  // function, but GetIon returns a G4ParticleDefinition*
2001  auto base = static_cast<G4Ions const*>(GetIon(Z,A, 0.0));
2002  return GetMuonicAtom(base);
2003 }
2004 
2005 
2006 
2007 
static char FloatLevelBaseChar(G4Ions::G4FloatLevelBase flb)
Definition: G4Ions.hh:253
G4bool Contains(const G4ParticleDefinition *particle) const
Definition: G4IonTable.cc:1713
G4ParticleDefinition * GetGenericMuonicAtom() const
static G4bool IsIon(const G4ParticleDefinition *)
Definition: G4IonTable.cc:1148
G4ParticleDefinition * GetParticle(G4int index) const
Definition: G4IonTable.cc:1689
G4ParticleDefinition * CreateIon(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb)
Definition: G4IonTable.cc:248
const XML_Char * name
Definition: expat.h:151
static const G4ParticleDefinition * p_triton
Definition: G4IonTable.cc:88
G4double GetNucleusMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
Definition: G4IonTable.cc:1271
static G4bool GetNucleusByEncoding(G4int encoding, G4int &Z, G4int &A, G4double &E, G4int &lvl)
Definition: G4IonTable.cc:991
void Init()
Definition: G4IonTable.cc:91
G4int GetAtomicNumber() const
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:45
G4bool IsGeneralIon() const
static G4ParticleTable * GetParticleTable()
static constexpr double MeV
Definition: G4SIunits.hh:214
G4double GetPDGLifeTime() const
G4ParticleDefinition * GetLightIon(G4int Z, G4int A) const
Definition: G4IonTable.cc:1218
static const G4int LL[nN]
static constexpr double keV
Definition: G4SIunits.hh:216
G4int GetVerboseLevel() const
Definition: G4IonTable.cc:1499
const XML_Char const XML_Char * encoding
Definition: expat.h:187
#define G4endl
Definition: G4ios.hh:61
static const G4ParticleDefinition * p_alpha
Definition: G4IonTable.cc:89
static G4MuonicAtom * ConstructMuonicAtom(G4String name, G4int encoding, G4Ions const *baseion)
void SetParticleDefinitionID(G4int id=-1)
G4bool isIsomerCreated
Definition: G4IonTable.hh:312
const G4String & GetParticleName() const
G4ParticleDefinition * FindIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:850
const G4String & GetParticleType() const
G4int Entries() const
Definition: G4IonTable.cc:1735
void RegisterIsotopeTable(G4VIsotopeTable *table)
Definition: G4IonTable.cc:1589
G4double GetLifeTime() const
static const G4ParticleDefinition * p_proton
Definition: G4IonTable.cc:102
static G4ThreadLocal G4IonList * fIonList
Definition: G4IonTable.hh:316
virtual ~G4IonTable()
Definition: G4IonTable.cc:191
G4bool IsLightIon(const G4ParticleDefinition *) const
Definition: G4IonTable.cc:1199
#define G4ThreadLocal
Definition: tls.hh:69
G4double GetPDGMass() const
const XML_Char int const XML_Char int const XML_Char * base
Definition: expat.h:331
void Register(T *inst)
Definition: G4AutoDelete.hh:65
G4double GetIsomerMass(G4int Z, G4int A, G4int lvl=0) const
Definition: G4IonTable.cc:1330
G4FloatLevelBase
Definition: G4Ions.hh:95
G4double GetIonMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
Definition: G4IonTable.cc:1336
static G4NuclideTable * GetNuclideTable()
G4IsotopeProperty * FindIsotope(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb) const
Definition: G4IonTable.cc:1614
void AddProcessManager(G4ParticleDefinition *)
Definition: G4IonTable.cc:1505
virtual G4IsotopeProperty * GetIsotope(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float)=0
Float_t Z
size_t entries() const
Definition: G4Ions.hh:51
G4int GetParticleDefinitionID() const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:88
G4int GetiSpin() const
G4int GetIsomerLevel() const
G4bool IsWorkerThread()
Definition: G4Threading.cc:129
G4int GetAtomicMass() const
G4IsotopeProperty * GetIsotopeByIndex(size_t idx) const
static const G4ParticleDefinition * p_He3
Definition: G4IonTable.cc:90
static G4bool IsAntiIon(const G4ParticleDefinition *)
Definition: G4IonTable.cc:1173
G4int GetVerboseLevel() const
G4VDecayChannel * GetDecayChannel(G4int index) const
void DestroyWorkerG4IonTable()
Definition: G4IonTable.cc:218
G4int GetQuarkContent(G4int flavor) const
std::multimap< G4int, const G4ParticleDefinition * > G4IonList
Definition: G4IonTable.hh:74
G4double GetMagneticMoment() const
double A(double temperature)
G4ParticleDefinition * GetGenericIon() const
static G4double GetNuclearMass(const G4double A, const G4double Z)
void SlaveG4IonTable()
Definition: G4IonTable.cc:152
G4ParticleDefinition * GetDaughter(G4int anIndex)
const G4ThreeVector const G4double const
static const G4ParticleDefinition * p_triton
Definition: G4IonTable.cc:104
void clear()
Definition: G4IonTable.cc:1346
void SetAntiPDGEncoding(G4int aEncoding)
#define G4MUTEXUNLOCK(mutex)
Definition: G4Threading.hh:234
std::multimap< G4int, const G4ParticleDefinition * >::iterator G4IonListIterator
Definition: G4IonTable.hh:75
static G4double GetNuclearMass(G4int A, G4int Z, G4int L)
void InitializeLightIons()
Definition: G4IonTable.cc:183
G4ParticleDefinition * GetLightAntiIon(G4int Z, G4int A) const
Definition: G4IonTable.cc:1243
static constexpr double eplus
Definition: G4SIunits.hh:199
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.hh:65
G4int GetAtomicNumber() const
G4bool IsMultithreadedApplication()
Definition: G4Threading.cc:136
int G4int
Definition: G4Types.hh:78
static const G4ParticleDefinition * p_deuteron
Definition: G4IonTable.cc:87
static const G4ParticleDefinition * p_alpha
Definition: G4IonTable.cc:105
void WorkerG4IonTable()
Definition: G4IonTable.cc:157
G4ApplicationState GetCurrentState() const
G4DecayTable * GetDecayTable() const
G4ProcessManager * GetProcessManager() const
void Remove(const G4ParticleDefinition *particle)
Definition: G4IonTable.cc:1405
static std::vector< G4VIsotopeTable * > * fIsotopeTableListShadow
Definition: G4IonTable.hh:319
static const G4ParticleDefinition * p_He3
Definition: G4IonTable.cc:106
G4int GetAtomicMass() const
#define G4MUTEXLOCK(mutex)
Definition: G4Threading.hh:233
G4ParticleDefinition * GetMuonicAtom(G4Ions const *)
Definition: G4IonTable.cc:1917
G4GLOB_DLL std::ostream G4cout
void PreloadNuclide()
Definition: G4IonTable.cc:1670
G4ApplicationState
G4double GetLevelTolerance()
static const G4String elementName[numberOfElements]
Definition: G4IonTable.hh:328
G4double GetEnergy() const
const G4String & GetIonName(G4int Z, G4int A, G4int lvl=0) const
Definition: G4IonTable.cc:1095
static const G4ParticleDefinition * p_proton
Definition: G4IonTable.cc:86
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:504
G4ParticleDefinition * FindIonInMaster(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:1819
void SetPDGMagneticMoment(G4double mageticMoment)
void CreateAllIon()
Definition: G4IonTable.cc:1652
void DumpTable(const G4String &particle_name="ALL") const
Definition: G4IonTable.cc:1467
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
Definition: G4Ions.hh:189
G4bool IsLightAntiIon(const G4ParticleDefinition *) const
Definition: G4IonTable.cc:1208
G4double GetLifeTime(const G4ParticleDefinition *) const
Definition: G4IonTable.cc:1879
void PrepareNuclideTable()
Definition: G4IonTable.cc:1664
const G4String & GetName() const
void InsertWorker(const G4ParticleDefinition *particle)
Definition: G4IonTable.cc:1379
G4NuclideTable * pNuclideTable
Definition: G4IonTable.hh:311
void Insert(const G4ParticleDefinition *particle)
Definition: G4IonTable.cc:1364
static G4ThreadLocal std::vector< G4VIsotopeTable * > * fIsotopeTableList
Definition: G4IonTable.hh:317
G4int size() const
Definition: G4IonTable.cc:1741
static G4int GetNucleusEncoding(G4int Z, G4int A, G4double E=0.0, G4int lvl=0)
Definition: G4IonTable.cc:950
static const G4ParticleDefinition * p_deuteron
Definition: G4IonTable.cc:103
G4VIsotopeTable * GetIsotopeTable(size_t idx=0) const
Definition: G4IonTable.cc:1603
static G4StateManager * GetStateManager()
void CreateAllIsomer()
Definition: G4IonTable.cc:1658
static G4IonList * fIonListShadow
Definition: G4IonTable.hh:318
std::mutex G4Mutex
Definition: G4Threading.hh:84
G4int entries() const