Changeset 890 for trunk/source/particles/management/src/G4IonTable.cc
- Timestamp:
- Nov 25, 2008, 5:27:50 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/particles/management/src/G4IonTable.cc
r850 r890 25 25 // 26 26 // 27 // $Id: G4IonTable.cc,v 1.5 1 2008/06/08 12:55:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4IonTable.cc,v 1.53 2008/10/15 02:41:37 kurasige Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 615 615 { 616 616 // returns pointer to pre-defined ions 617 static G4bool isInitialized = false; 618 static G4ParticleDefinition* p_proton=0; 619 static G4ParticleDefinition* p_neutron=0; 620 static G4ParticleDefinition* p_deuteron=0; 621 static G4ParticleDefinition* p_triton=0; 622 static G4ParticleDefinition* p_alpha=0; 623 static G4ParticleDefinition* p_He3=0; 624 625 if (!isInitialized) { 626 p_proton = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton 627 p_neutron = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron 628 p_deuteron = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron 629 p_triton = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // tritoon 630 p_alpha = G4ParticleTable::GetParticleTable()->FindParticle("alpha"); // alpha 631 p_He3 = G4ParticleTable::GetParticleTable()->FindParticle("He3"); // He3 632 isInitialized = true; 633 } 617 634 618 635 G4ParticleDefinition* ion=0; 619 636 if ( (Z<=2) ) { 620 637 if ( (Z==1)&&(A==1) ) { 621 ion = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton 622 638 ion = p_proton; 623 639 } else if ( (Z==0)&&(A==1) ) { 624 ion = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron640 ion = p_neutron; 625 641 } else if ( (Z==1)&&(A==2) ) { 626 ion = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron642 ion = p_deuteron; 627 643 } else if ( (Z==1)&&(A==3) ) { 628 ion = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // tritoon644 ion = p_triton; 629 645 } else if ( (Z==2)&&(A==4) ) { 630 ion = G4ParticleTable::GetParticleTable()->FindParticle("alpha"); // alpha 631 646 ion = p_alpha; 632 647 } else if ( (Z==2)&&(A==3) ) { 633 ion = G4ParticleTable::GetParticleTable()->FindParticle("He3"); // He3648 ion = p_He3; 634 649 } 635 650 }
Note: See TracChangeset
for help on using the changeset viewer.