Ignore:
Timestamp:
Nov 25, 2008, 5:27:50 PM (16 years ago)
Author:
garnier
Message:

update to pre-tag revision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/particles/management/src/G4IonTable.cc

    r850 r890  
    2525//
    2626//
    27 // $Id: G4IonTable.cc,v 1.51 2008/06/08 12:55:45 kurasige 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: $
    2929//
    3030//
     
    615615{
    616616  // 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  }
    617634
    618635  G4ParticleDefinition* ion=0;
    619636  if ( (Z<=2) ) {
    620637    if ( (Z==1)&&(A==1) ) {
    621       ion = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton
    622 
     638      ion = p_proton;
    623639    } else if ( (Z==0)&&(A==1) ) {
    624       ion = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron
     640      ion = p_neutron;
    625641    } else if ( (Z==1)&&(A==2) ) {
    626       ion = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron
     642      ion = p_deuteron;
    627643    } else if ( (Z==1)&&(A==3) ) {
    628       ion = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // tritoon
     644      ion = p_triton;
    629645    } else if ( (Z==2)&&(A==4) ) {
    630       ion = G4ParticleTable::GetParticleTable()->FindParticle("alpha"); // alpha
    631 
     646      ion = p_alpha;
    632647    } else if ( (Z==2)&&(A==3) ) {
    633       ion = G4ParticleTable::GetParticleTable()->FindParticle("He3"); // He3
     648      ion = p_He3;
    634649    }
    635650  }
Note: See TracChangeset for help on using the changeset viewer.