Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/materials/src/G4DensityEffectData.cc

    r1228 r1315  
    2525//
    2626//
    27 // $Id: G4DensityEffectData.cc,v 1.9 2009/12/01 08:24:21 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4DensityEffectData.cc,v 1.12 2010/05/15 15:37:33 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929
    3030//---------------------------------------------------------------------------
     
    7474    {
    7575      indexZ[i] = -1;
     76      state[i]  = kStateSolid;
    7677    }
    7778
    78 //G4_H  index=0
     79//G4_lH2  index=0
     80  G4double M1[NDENSARRAY]={7.031,1.546,3.2632,0.4759,1.9215,0.13483,5.6249,0,0.021};
     81  AddMaterial(M1,"G4_lH2");
     82
     83//G4_H  index=1
    7984  G4double M0[NDENSARRAY]={0.263,1.412,9.5835,1.8639,3.2718,0.14092,5.7273,0.0,0.024};
    8085  AddMaterial(M0,"G4_H");
    81   indexZ[0]=0;
    82 
    83 //G4_lH2  index=1
    84   G4double M1[NDENSARRAY]={7.031,1.546,3.2632,0.4759,1.9215,0.13483,5.6249,0,0.021};
    85   AddMaterial(M1,"G4_lH2");
     86  indexZ[1]=1;
     87  state[1]=kStateGas;
    8688
    8789//G4_He  index=2
     
    8991  AddMaterial(M2,"G4_He");
    9092  indexZ[2]=2;
     93  state[2]=kStateGas;
    9194
    9295//G4_Li  index=3
     
    114117  AddMaterial(M7,"G4_N");
    115118  indexZ[7]=7;
     119  state[7]=kStateGas;
    116120
    117121//G4_O  index=8
     
    119123  AddMaterial(M8,"G4_O");
    120124  indexZ[8]=8;
     125  state[8]=kStateGas;
    121126
    122127//G4_F  index=9
     
    124129  AddMaterial(M9,"G4_F");
    125130  indexZ[9]=9;
     131  state[9]=kStateGas;
    126132
    127133//G4_Ne  index=10
     
    129135  AddMaterial(M10,"G4_Ne");
    130136  indexZ[10]=10;
     137  state[10]=kStateGas;
    131138
    132139//G4_Na  index=11
     
    164171  AddMaterial(M17,"G4_Cl");
    165172  indexZ[17]=17;
     173  state[17]=kStateGas;
    166174
    167175//G4_Ar  index=18
     
    169177  AddMaterial(M18,"G4_Ar");
    170178  indexZ[18]=18;
     179  state[18]=kStateGas;
    171180
    172181//G4_K  index=19
     
    243252  G4double M33[NDENSARRAY]={45.779,2.219,5.0510,0.1767,3.5702,0.06633,3.4176,0.00,0.030};
    244253  AddMaterial(M33,"G4_As");
    245    indexZ[33]=33;
     254  indexZ[33]=33;
    246255
    247256//G4_Se  index=34
     
    254263  AddMaterial(M35,"G4_Br");
    255264  indexZ[35]=35;
     265  state[35]=kStateGas;
    256266
    257267//G4_Kr  index=36
     
    259269  AddMaterial(M36,"G4_Kr");
    260270  indexZ[36]=36;
     271  state[36]=kStateGas;
    261272
    262273//G4_Ru  index=37
     
    349360  AddMaterial(M54,"G4_Xe");
    350361  indexZ[54]=54;
     362  state[54]=kStateGas;
    351363
    352364//G4_Cs  index=55
     
    444456  AddMaterial(M73,"G4_Ta");
    445457  indexZ[73]=73;
     458
    446459//G4_W  index=74
    447460  G4double M74[NDENSARRAY]={80.315,1.997,5.4059,0.2167,3.496,0.15509,2.8447,0.14,0.027};
     
    503516  AddMaterial(M85,"G4_Rn");
    504517  indexZ[86]=85;
     518  state[86]=kStateGas;
    505519
    506520//G4_Ra  index=86
     
    12841298}
    12851299
    1286 G4int G4DensityEffectData::GetIndex(G4int Z)
     1300G4int G4DensityEffectData::GetElementIndex(G4int Z, G4State st)
    12871301{
    12881302  G4int idx = -1;
    1289   if(Z >= 0 && Z < NDENSELEM) idx = indexZ[Z];
     1303  if(Z > 0 && Z < NDENSELEM) {
     1304    if(st == state[Z])             { idx = indexZ[Z]; }
     1305    else if(st == kStateUndefined) { idx = indexZ[Z]; }
     1306  }
    12901307  return idx;
    12911308}
Note: See TracChangeset for help on using the changeset viewer.