Print

Print


Commit in GeomConverter/src/org/lcsim/material on MAIN
Element.java-3131.1 removed
ElementData.java-2041.1 removed
ElementDataToGDML.java-1181.1 removed
-635
3 removed files
Remove some old materials classes.

GeomConverter/src/org/lcsim/material
Element.java removed after 1.1
diff -N Element.java
--- Element.java	9 Jun 2005 03:30:22 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,313 +0,0 @@
-package org.lcsim.material;
-import java.util.Map;
-import java.util.Set;
-import java.util.Iterator;
-public class Element extends Material
-{
-    
-    private Map _elements = ElementData.elements();
-    //
-    // Constructors, destructor
-    // If name is given, constructor calls setTo(name)
-    //
-    public Element(String name)                 // Element at STP
-    {
-        boolean ok = setTo(name);
-        if(!ok) throw new IllegalArgumentException(name + " is not an element!");
-    }
-    public Element(String name, double rho)         // Solid with given density
-    {
-        setTo(name, rho);
-    }
-    public Element( String name, double P, double T) // Gas with given pressure, temp
-    {
-        setTo(name, P, T);
-    }
-   /*
-   public Element(Element element)
-   {
-   }
-    */
-    //
-    // operators
-    //
-    
-    //
-    // Set material to named element at 1 atm and 25 degrees C.
-    // Uses defaults for atomic weight and density. Determines whether element
-    // is a gas based on boiling point data. Name may contain number of atoms
-    // if this is a molecule (e.g. H2, O2, N2).
-    //
-    public boolean setTo(String name)
-    {
-        //
-        // The setTo functions must set Z, A, rho, state, is_element, P, T and I.
-        // In this case, these are set by setElement(), and overridden where necessary
-        // below. In addition, they must call setMultipleScattering() and
-        // setSternheimerPeierls() to set the rest (here this is done in
-        // setElement()).
-        //
-        
-        //
-        // Set this element to values corresponding to 1 atm and
-        // 25 degrees Centigrade (with certain exceptions).
-        // This form of setTo lets the software decide if the
-        // element is a gas or a solid (liquid). The numbers in
-        // the element table are for NTP (25 degrees C, 1 atm).
-        //
-        _P = 1.0;
-        _T = 298.15;
-        
-        _state = MaterialState.UNKNOWN;
-        if (!setElement(name)) return false;
-        
-        return true ;
-    }
-    
-    
-    //
-    // Set material to named element with a given density.
-    // Force this element to be a solid (or liquid).
-    //
-    public  boolean setTo(String name, double density)
-    {
-        //
-        // Set this element to values corresponding to 1 atm and
-        // 25 degrees Centigrade (with certain exceptions).
-        // This form of setTo forces the state to be condensed, so
-        // the temperature and pressure are not that important.
-        //
-        _P          = 1.0;
-        _T          = 298.15;
-        _rho        = density;
-        
-        _state = MaterialState.CONDENSED;
-        if (!setElement(name)) return false;
-        
-        return true;
-    }
-    //
-    // Set material to named element at given pressure and temperature.
-    // Force this element to be a gas.
-    //
-    public boolean setTo(String name, double pressure, double temperature)
-    {
-        //
-        // This form of setTo forces the state to be a gas. The density
-        // rho is calculated based on the ideal gas law from the pressure
-        // and temperature.
-        //
-        _P          = pressure;
-        _T          = temperature;
-        
-        _state = MaterialState.GAS;
-        if (!setElement(name)) return false;
-        
-        return true;
-    }
-    
-    
-    public double getNAtoms()
-    {
-        return _nAtoms;
-    }
-/*
-   private void setRadLength(int IZ);
-   private void setIntLength(int IZ);
- 
-   private boolean setElement(const char *name);
- */
-    private double _nAtoms; // Number of atoms of this element (e.g. N2, O2, etc.)
-    
-    ////
-    //
-    // setElement() tries to find the first element in the given name,
-    // and sets this material to that element. Any other elements in the
-    // name are ignored. setCompound() in the CECompound class depends
-    // on this behavior and scans the rest of the name using setElement().
-    //
-    ////
-    
-    public boolean setElement(String name)
-    {
-        System.out.println("name="+name);
-        if (name == null) return false ;
-        //
-        // Match the element symbol
-        //
-        ElementData firstElement = null;
-        Set names = _elements.keySet();
-        Iterator it = names.iterator();
-        while( it.hasNext() )
-        {
-            String s = (String) it.next();
-            
-            if(name.equals(s))
-            {
-                
-                firstElement = (ElementData) _elements.get(s);
-                System.out.println(s+" "+firstElement.fullName());
-            }
-        }
-        
-/*
-        //
-        // Now match abbreviation. Abbreviations must be given as X or Xy, and
-        // capitalization is significant. Tin and TiN (titanium nitride) are different
-        // materials and so are Cu (copper) and CU (uranium carbide).
-        //
- 
-        if (firstElement == null)
-        {
-            Set elements = _elements.entrySet();
-            it = elements.iterator();
-            while( it.hasNext() )
-            {
-                String s = (String) it.next();
-                System.out.println(s);
-                if(name.equals(s))
-                {
-                    //firstElement = (ElementData) _elements.get(ed.fullName());
-                }
-            }
- 
-        }
- */
-        if (firstElement == null)
-        {
-            _Z = 0.;
-            return false;
-        }
-        
-        // cng todo
-        
-        //
-        // Found the element. Now determine if it has a trailing number of atoms (like H2, N2)
-        //
-        //   ElementData &e = Elements[idx];
-        
-        _nAtoms = 1.0;
-   /*
-   if (isdigit(*nameptr)) nAtoms = atof(nameptr);
-    
-   while (isdigit(*nameptr)) nameptr++;
-   setName(element_name, nameptr - element_name);
-    */
-        _name = firstElement.fullName();
-        _isElement = true;
-        
-        _Z               = (double) firstElement.Z();
-        _A               = firstElement.A();
-        _ZoverA          = _Z / _A;
-        _molecularWeight = _A * _nAtoms;
-        
-        if (((_state == MaterialState.UNKNOWN) && (firstElement.boilingPoint() <= _T)) ||
-                (_state == MaterialState.GAS)                              )
-        {
-            _state   = MaterialState.GAS;
-            _rho     = _P * (273.15 / _T) * _molecularWeight / 22413.996;
-        }
-        else if (_state == MaterialState.UNKNOWN)
-        {
-            _state   = MaterialState.CONDENSED;
-            _rho     = firstElement.rho();
-        } // Otherwise state is SOLID and no action needed (rho already set).
-        //
-        // Reference:
-        // 1. Sternheimer & Peierls, Phys. Rev. B 3, 3681 (1971):
-        //
-        // Equation 13: excitation potential
-        //
-        
-        if (firstElement.Z() > 12)
-        {
-            _I = _Z * (9.76 + 58.8 * Math.pow(_Z, -1.19));
-        }
-        else
-        {
-            //
-            // The following values are correct when used with the Ref 1
-            // procedure. Especially for the gasses with Z <= 10, these
-            // values are not accurate when used in the context of Ref 2.
-            //
-            if (firstElement.Z() == 1) _I = 18.7; // ********should be 19.0
-            else          _I = 13.0 * firstElement.Z();
-        }
-        //
-        // Set radiation length
-        //
-        setRadLength(firstElement.Z());
-        _radLength_m = 0.01 * _radLength / _rho;
-        //
-        // Set interaction length
-        //
-        setIntLength(firstElement.Z());
-        _intLength_m = 0.01 * _intLength / _rho;
-        //
-        // Set critical energy
-        //
-        _Ec     = 2.66 * Math.pow(_radLength * _ZoverA, 1.1);
-        _Ec_GeV = 0.001 * _Ec;
-        //
-        // Set Moliere radius
-        //
-        _rMoliere   = _radLength * 21.2052 / _Ec;
-        _rMoliere_m = 0.01 * _rMoliere / _rho;
-        
-        setMultipleScattering();
-        setSternheimerPeierls();
-        
-        return true;
-    }
-    //
-    ////
-    //
-    // The following is based on the formulas in the Particle Data Book.
-    //
-    ////
-    public void setRadLength(int IZ)
-    {
-        double alpha = 1.0 / 137.03599976;
-        double azsq = alpha * _Z;
-        azsq *= azsq;
-        double f = azsq * ( 1.0 / (1.0 + azsq) + 0.20206 - 0.0369 * azsq + 0.0083 * azsq * azsq
-                - 0.002 * azsq * azsq * azsq );
-        
-        double Lrad, LradP;
-        switch (IZ)
-        {
-            case 1: Lrad = 5.31; LradP = 6.144; break;
-            case 2: Lrad = 4.79; LradP = 5.621; break;
-            case 3: Lrad = 4.74; LradP = 5.805; break;
-            case 4: Lrad = 4.71; LradP = 5.924; break;
-            default:
-                Lrad  = Math.log(184.15 / Math.pow(_Z, 0.333333333));
-                LradP = Math.log(1194.0 / Math.pow(_Z, 0.666666667));
-                break;
-        }
-        _radLength = 716.408 * _A / ((_Z * _Z * (Lrad - f) + _Z * LradP));
-    }
-    
-    ////
-    //
-    // The following uses data from the Particle Data Book.
-    // For elements above Helium, we use the result of a simple fit.
-    //
-    ////
-    public void setIntLength(int IZ)
-    {
-        switch (IZ)
-        {
-            case 1:
-                if (_A < 1.5) _intLength = 50.8;     // Hydrogen
-                else         _intLength = 54.7;     // Deuterium
-                break;
-            case 2:
-                _intLength = 65.2;                  // Helium
-                break;
-            default:
-                _intLength = 40.8 * Math.pow(_A, 0.289);  // All others
-                break;
-        }
-    }
-}
\ No newline at end of file

GeomConverter/src/org/lcsim/material
ElementData.java removed after 1.1
diff -N ElementData.java
--- ElementData.java	9 Jun 2005 03:30:22 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,204 +0,0 @@
-package org.lcsim.material;
-import java.util.Map;
-import java.util.TreeMap;
-/**
- * Ported from lelaps.
- *
- */
-public class ElementData
-{
-    private String _name;                 // Element 1 or 2 letter name
-    private String _fullName;             // Element full name
-    private int         _Z;                    // Element Z
-    private double      _A;                    // Atomic weight in mol/cc
-    private double      _rho;                  // Density in g/cm^3 at 25 degrees C or at boiling point for liquids
-    private double      _meltingPoint;         // Melting point (K)
-    private double      _boilingPoint;         // Boiling point (K)
-    private double      _ionizationPotential;  // Ionization potential (eV)
-    private static Map    _elements = new TreeMap();
-    private static String[] ElementNotes = {
-        "Density measured at 15 degrees C",
-                "Density measured at 20 degrees C",
-                "Density measured at 26 degrees C",
-                "Melting point represents critical temperature",
-                "Boiling point represents sublimation temperature",
-                "Density is calculated",
-                "Density is estimated",
-                "Melting point is estimated",
-    };
-    // private constructor to disallow user creation
-    private ElementData( String name, String  fullName, int Z, double A, double rho, double mp, double bp, double ip)
-    {
-        _name = name;
-        _fullName =  fullName;
-        _Z = Z;
-        _A = A;
-        _rho = rho;
-        _meltingPoint = mp;
-        _boilingPoint = bp;
-        _ionizationPotential = ip;
-        _elements.put(name,this);
-    }
-    
-    public static Map elements()
-    {
-        return _elements;
-    }
-    
-    public String name()
-    {
-        return _name;
-    }
-    public String fullName()
-    {
-        return _fullName;
-    }
-    public int Z()
-    {
-        return _Z;
-    }
-    public double A()
-    {
-        return _A;
-    }
-    public double rho()
-    {
-        return _rho;
-    }
-    public double meltingPoint()
-    {
-        return _meltingPoint;
-    }
-    public double boilingPoint()
-    {
-        return _boilingPoint;
-    }
-    public double ionizationPotential()
-    {
-        return _ionizationPotential;
-    }
-    
-    public String toString()
-    {
-        StringBuffer sb = new StringBuffer("ElementData: \n");
-        sb.append(_fullName+" : "+_name+" Z= "+_Z+" A= "+_A+" rho= "+_rho+" MP= "+_meltingPoint+" BP= "+_boilingPoint+" IP= "+ _ionizationPotential+"\n");
-        return sb.toString();
-    }
-    
-    //
-    //                                                         name    fullName          Z    A           rho         melts at    boils at    ion. pot.
-    //
-    public final static ElementData vacuum = new ElementData( "vacuum", "vacuum"    ,   0, 0.0       , 0.0       , 0.0       , 0.0       , 0.0       );
-    public final static ElementData Hydrogen = new ElementData( "H" , "Hydrogen"      ,   1, 1.00794   , 0.0708    , 13.81     , 20.28     , 13.598 );
-    public final static ElementData Deuterium = new ElementData( "D" , "Deuterium"     ,   1, 2.0140    , 0.16      , 15.0      , 23.4      , -1       );
-    public final static ElementData Helium = new ElementData( "He", "Helium"        ,   2, 4.002602  , 0.124901  , 0.94999999, 4.22      , 24.587      );
-    public final static ElementData Lithium = new ElementData( "Li", "Lithium"       ,   3, 6.941     , 0.534     , 453.65    , 1615.15   , 5.392      );
-    public final static ElementData Beryllium = new ElementData( "Be", "Beryllium"     ,   4, 9.012182  , 1.85      , 1560.15   , 2744.15   , 9.323      );
-    public final static ElementData Boron = new ElementData( "B" , "Boron"         ,   5, 10.811    , 2.37      , 2348.15   , 4273.15   , 8.298       );
-    public final static ElementData Carbon = new ElementData( "C" , "Carbon"        ,   6, 12.0107   , 2.2670    , 4765.15   , 4115.15   , 11.260     );
-    public final static ElementData Nitrogen = new ElementData( "N" , "Nitrogen"      ,   7, 14.00674  , 0.807     , 63.15     , 77.36     , 14.534   );
-    public final static ElementData Oxygen = new ElementData( "O" , "Oxygen"        ,   8, 15.9994   , 1.141     , 54.36     , 90.2      , 13.618     );
-    public final static ElementData Fluorine = new ElementData( "F" , "Fluorine"      ,   9, 18.9984032, 1.50      , 53.53     , 85.03     , 17.423   );
-    public final static ElementData Neon = new ElementData( "Ne", "Neon"          ,  10, 20.1797   , 1.204     , 24.56     , 27.07     , 21.565     );
-    public final static ElementData Sodium = new ElementData( "Na", "Sodium"        ,  11, 22.989770 , 0.97      , 370.95    , 1156.15   , 5.139      );
-    public final static ElementData Magnesium = new ElementData( "Mg", "Magnesium"     ,  12, 24.3050   , 1.74      , 923.15    , 1363.15   , 7.646   );
-    public final static ElementData Aluminum = new ElementData( "Al", "Aluminum"      ,  13, 26.981538 , 2.70      , 933.47    , 2792.15   , 5.986    );
-    public final static ElementData Silicon = new ElementData( "Si", "Silicon"       ,  14, 28.0855   , 2.3296    , 1687.15   , 3538.15   , 8.152       );
-    public final static ElementData Phosphorus = new ElementData( "P" , "Phosphorus"    ,  15, 30.973761 , 1.82      , 317.3     , 553.65    , 10.487      );
-    public final static ElementData Sulfur = new ElementData( "S" , "Sulfur"        ,  16, 32.066    , 2.067     , 388.36    , 717.75    , 10.360      );
-    public final static ElementData Chlorine = new ElementData( "Cl", "Chlorine"      ,  17, 35.4527   , 1.56      , 171.65    , 239.11    , 12.968      );
-    public final static ElementData Argon = new ElementData( "Ar", "Argon"         ,  18, 39.948    , 1.396     , 83.8      , 87.3      , 15.760      );
-    public final static ElementData Potassium = new ElementData( "K" , "Potassium"     ,  19, 39.0983   , 0.89      , 336.53    , 1032.15   , 4.341       );
-    public final static ElementData Calcium = new ElementData( "Ca", "Calcium"       ,  20, 40.078    , 1.54      , 1115.15   , 1757.15   , 6.113       );
-    public final static ElementData Scandium = new ElementData( "Sc", "Scandium"      ,  21, 44.955910 , 2.99      , 1814.15   , 3109.15   , 6.561       );
-    public final static ElementData Titanium = new ElementData( "Ti", "Titanium"      ,  22, 47.867    , 4.5       , 1941.15   , 3560.15   , 6.828       );
-    public final static ElementData Vanadium = new ElementData( "V" , "Vanadium"      ,  23, 50.9415   , 6.0       , 2183.15   , 3680.15   , 6.746       );
-    public final static ElementData Chromium = new ElementData( "Cr", "Chromium"      ,  24, 51.9961   , 7.15      , 2180.15   , 2944.15   , 6.767       );
-    public final static ElementData Manganese = new ElementData( "Mn", "Manganese"     ,  25, 54.938049 , 7.3       , 1519.15   , 2334.15   , 7.434       );
-    public final static ElementData Iron = new ElementData( "Fe", "Iron"          ,  26, 55.845    , 7.875     , 1811.15   , 3134.15   , 7.902       );
-    public final static ElementData Cobalt = new ElementData( "Co", "Cobalt"        ,  27, 58.933200 , 8.86      , 1768.15   , 3200.15   , 7.881       );
-    public final static ElementData Nickel = new ElementData( "Ni", "Nickel"        ,  28, 58.6934   , 8.912     , 1728.15   , 3186.15   , 7.640       );
-    public final static ElementData Copper = new ElementData( "Cu", "Copper"        ,  29, 63.546    , 8.933     , 1357.77   , 2835.15   , 7.726       );
-    public final static ElementData Zinc = new ElementData( "Zn", "Zinc"          ,  30, 65.39     , 7.134     , 692.68    , 1180.15   , 9.394       );
-    public final static ElementData Gallium = new ElementData( "Ga", "Gallium"       ,  31, 69.723    , 5.91      , 302.91    , 2477.15   , 5.999       );
-    public final static ElementData Germanium = new ElementData( "Ge", "Germanium"     ,  32, 72.61     , 5.323     , 1211.4    , 3106.15   , 7.900       );
-    public final static ElementData Arsenic = new ElementData( "As", "Arsenic"       ,  33, 74.92160  , 5.776     , 1090.15   , 887.15    , 9.815       );
-    public final static ElementData Selenium = new ElementData( "Se", "Selenium"      ,  34, 78.96     , 4.809     , 494.15    , 958.15    , 9.752         );
-    public final static ElementData Bromine = new ElementData( "Br", "Bromine"       ,  35, 79.904    , 3.11      , 265.95    , 331.95    , 11.814      );
-    public final static ElementData Krypton = new ElementData( "Kr", "Krypton"       ,  36, 83.80     , 2.418     , 115.79    , 119.93    , 14.000      );
-    public final static ElementData Rubidium = new ElementData( "Rb", "Rubidium"      ,  37, 85.4678   , 1.53      , 312.46    , 961.15    , 4.177       );
-    public final static ElementData Strontium = new ElementData( "Sr", "Strontium"     ,  38, 87.62     , 2.64      , 1050.15   , 1655.15   , 5.695       );
-    public final static ElementData Yttrium = new ElementData( "Y" , "Yttrium"       ,  39, 88.90585  , 4.47      , 1795.15   , 3618.15   , 6.217       );
-    public final static ElementData Zirconium = new ElementData( "Zr", "Zirconium"     ,  40, 91.224    , 6.52      , 2128.15   , 4682.15   , 6.634       );
-    public final static ElementData Niobium = new ElementData( "Nb", "Niobium"       ,  41, 92.90638  , 8.57      , 2750.15   , 5017.15   , 6.759       );
-    public final static ElementData Molybdenum = new ElementData( "Mo", "Molybdenum"    ,  42, 95.94     , 10.2      , 2896.15   , 4912.15   , 7.092      );
-    public final static ElementData Technetium = new ElementData( "Tc", "Technetium"    ,  43, 98        , 11        , 2430.15   , 4538.15   , 7.28       );
-    public final static ElementData Ruthenium = new ElementData( "Ru", "Ruthenium"     ,  44, 101.07    , 12.1      , 2607.15   , 4423.15   , 7.361      );
-    public final static ElementData Rhodium = new ElementData( "Rh", "Rhodium"       ,  45, 102.90550 , 12.4      , 2237.15   , 3968.15   , 7.459      );
-    public final static ElementData Palladium = new ElementData( "Pd", "Palladium"     ,  46, 106.42    , 12.0      , 1828.05   , 3236.15   , 8.337      );
-    public final static ElementData Silver = new ElementData( "Ag", "Silver"        ,  47, 107.8682  , 10.501    , 1234.93   , 2435.15   , 7.576      );
-    public final static ElementData Cadmium = new ElementData( "Cd", "Cadmium"       ,  48, 112.411   , 8.69      , 594.22    , 1040.15   , 8.994      );
-    public final static ElementData Indium = new ElementData( "In", "Indium"        ,  49, 114.818   , 7.31      , 429.75    , 2345.15   , 5.786      );
-    public final static ElementData Tin = new ElementData( "Sn", "Tin"           ,  50, 118.710   , 7.287     , 505.08    , 2875.15   , 7.344          );
-    public final static ElementData Antimony = new ElementData( "Sb", "Antimony"      ,  51, 121.760   , 6.685     , 903.78    , 1860.15   , 8.64          );
-    public final static ElementData Tellurium = new ElementData( "Te", "Tellurium"     ,  52, 127.60    , 6.232     , 722.66    , 1261.15   , 9.010      );
-    public final static ElementData Iodine = new ElementData( "I" , "Iodine"        ,  53, 126.90447 , 4.93      , 386.85    , 457.55    , 10.451         );
-    public final static ElementData Xenon = new ElementData( "Xe", "Xenon"         ,  54, 131.29    , 2.953     , 161.4     , 165.11    , 12.130     );
-    public final static ElementData Cesium = new ElementData( "Cs", "Cesium"        ,  55, 132.90545 , 1.93      , 301.59    , 944.15    , 3.894      );
-    public final static ElementData Barium = new ElementData( "Ba", "Barium"        ,  56, 137.327   , 3.62      , 1000.15   , 2170.15   , 5.212      );
-    public final static ElementData Lanthanum = new ElementData( "La", "Lanthanum"     ,  57, 138.9055  , 6.15      , 1191.15   , 3737.15   , 5.577      );
-    public final static ElementData Cerium = new ElementData( "Ce", "Cerium"        ,  58, 140.116   , 8.16      , 1071.15   , 3716.15   , 5.539      );
-    public final static ElementData Praseodymium = new ElementData( "Pr", "Praseodymium"  ,  59, 140.90765 , 6.77      , 1204.15   , 3793.15   , 5.464      );
-    public final static ElementData Neodymium = new ElementData( "Nd", "Neodymium"     ,  60, 144.24    , 7.01      , 1294.15   , 3347.15   , 5.525      );
-    public final static ElementData Promethium = new ElementData( "Pm", "Promethium"    ,  61, 145       , 7.26      , 1315.15   , 3273.15   , 5.55       );
-    public final static ElementData Samarium = new ElementData( "Sm", "Samarium"      ,  62, 150.36    , 7.52      , 1347.15   , 2067.15   , 5.644      );
-    public final static ElementData Europium = new ElementData( "Eu", "Europium"      ,  63, 151.964   , 5.24      , 1095.15   , 1869.15   , 5.670      );
-    public final static ElementData Gadolinium = new ElementData( "Gd", "Gadolinium"    ,  64, 157.25    , 7.90      , 1586.15   , 3546.15   , 6.150      );
-    public final static ElementData Terbium = new ElementData( "Tb", "Terbium"       ,  65, 158.92534 , 8.23      , 1629.15   , 3503.15   , 5.864      );
-    public final static ElementData Dysprosium = new ElementData( "Dy", "Dysprosium"    ,  66, 162.50    , 8.55      , 1685.15   , 2840.15   , 5.939      );
-    public final static ElementData Holmium = new ElementData( "Ho", "Holmium"       ,  67, 164.93032 , 8.80      , 1747.15   , 2973.15   , 6.022      );
-    public final static ElementData Erbium = new ElementData( "Er", "Erbium"        ,  68, 167.26    , 9.07      , 1802.15   , 3141.15   , 6.108      );
-    public final static ElementData Thulium = new ElementData( "Tm", "Thulium"       ,  69, 168.93421 , 9.32      , 1818.15   , 2223.15   , 6.184      );
-    public final static ElementData Ytterbium = new ElementData( "Yb", "Ytterbium"     ,  70, 173.04    , 6.90      , 1092.15   , 1469.15   , 6.254      );
-    public final static ElementData Lutetium = new ElementData( "Lu", "Lutetium"      ,  71, 174.967   , 9.84      , 1936.15   , 3675.15   , 5.426      );
-    public final static ElementData Hafnium = new ElementData( "Hf", "Hafnium"       ,  72, 178.49    , 13.3      , 2506.15   , 4876.15   , 6.825      );
-    public final static ElementData Tantalum = new ElementData( "Ta", "Tantalum"      ,  73, 180.9479  , 16.4      , 3290.15   , 5731.15   , 7.89       );
-    public final static ElementData Tungsten = new ElementData( "W" , "Tungsten"      ,  74, 183.84    , 19.3      , 3695.15   , 5828.15   , 7.98       );
-    public final static ElementData Rhenium = new ElementData( "Re", "Rhenium"       ,  75, 186.207   , 20.8      , 3459.15   , 5869.15   , 7.88       );
-    public final static ElementData Osmium = new ElementData( "Os", "Osmium"        ,  76, 190.23    , 22.5      , 3306.15   , 5285.15   , 8.7        );
-    public final static ElementData Iridium = new ElementData( "Ir", "Iridium"       ,  77, 192.217   , 22.5      , 2719.15   , 4701.15   , 9.1        );
-    public final static ElementData Platinum = new ElementData( "Pt", "Platinum"      ,  78, 195.078   , 21.46     , 2041.55   , 4098.15   , 9.0        );
-    public final static ElementData Gold = new ElementData( "Au", "Gold"          ,  79, 196.96655 , 19.282    , 1337.33   , 3129.15   , 9.226      );
-    public final static ElementData Mercury = new ElementData( "Hg", "Mercury"       ,  80, 200.59    , 13.5336   , 234.32    , 629.88    , 10.438     );
-    public final static ElementData Thallium = new ElementData( "Tl", "Thallium"      ,  81, 204.3833  , 11.8      , 577.15    , 1746.15   , 6.108      );
-    public final static ElementData Lead = new ElementData( "Pb", "Lead"          ,  82, 207.2     , 11.342    , 600.61    , 2022.15   , 7.417      );
-    public final static ElementData Bismuth = new ElementData( "Bi", "Bismuth"       ,  83, 208.98038 , 9.807     , 544.55    , 1837.15   , 7.289      );
-    public final static ElementData Polonium = new ElementData( "Po", "Polonium"      ,  84, 209       , 9.32      , 527.15    , 1235.15   , 8.417      );
-    public final static ElementData Astatine = new ElementData( "At", "Astatine"      ,  85, 210       , -1        , 575.15    , -1        , -1         );
-    public final static ElementData Radon = new ElementData( "Rn", "Radon"         ,  86, 222       , 4.4       , 202.15    , 211.45    , 10.749     );
-    public final static ElementData Francium = new ElementData( "Fr", "Francium"      ,  87, 223       , -1        , 300.15    , -1        , -1         );
-    public final static ElementData Radium = new ElementData( "Ra", "Radium"        ,  88, 226       , 5         , 973.15    , -1        , 5.279      );
-    public final static ElementData Actinium = new ElementData( "Ac", "Actinium"      ,  89, 227       , 10.07     , 1324.15   , 3471.15   , 5.17           );
-    public final static ElementData Thorium = new ElementData( "Th", "Thorium"       ,  90, 232.0381  , 11.72     , 2023.15   , 5061.15   , 6.08       );
-    public final static ElementData Protactinium = new ElementData( "Pa", "Protactinium"  ,  91, 231.03588 , 15.37     , 1845.15   , -1        , 5.89           );
-    public final static ElementData Uranium = new ElementData( "U" , "Uranium"       ,  92, 238.0289  , 18.95     , 1408.15   , 4404.15   , 6.194      );
-    public final static ElementData Neptunium = new ElementData( "Np", "Neptunium"     ,  93, 237       , 20.25     , 917.15    , -1        , 6.266          );
-    public final static ElementData Plutonium = new ElementData( "Pu", "Plutonium"     ,  94, 244       , 19.84     , 913.15    , 3501.15   , 6.06       );
-    public final static ElementData Americium = new ElementData( "Am", "Americium"     ,  95, 243       , 13.69     , 1449.15   , 2284.15   , 5.993         );
-    public final static ElementData Curium = new ElementData( "Cm", "Curium"        ,  96, 247       , 13.51     , 1618.15   , -1        , 6.02           );
-    public final static ElementData Berkelium = new ElementData( "Bk", "Berkelium"     ,  97, 247       , 14        , 1323.15   , -1        , 6.23          );
-    public final static ElementData Californium = new ElementData( "Cf", "Californium"   ,  98, 251       , -1        , 1173.15   , -1        , 6.30       );
-    public final static ElementData Einsteinium = new ElementData( "Es", "Einsteinium"   ,  99, 252       , -1        , 1133.15   , -1        , 6.42       );
-    public final static ElementData Fermium = new ElementData( "Fm", "Fermium"       , 100, 257       , -1        , 1800.15   , -1        , 6.50       );
-    public final static ElementData Mendelevium = new ElementData( "Md", "Mendelevium"   , 101, 258       , -1        , 1100.15   , -1        , 6.58       );
-    public final static ElementData Nobelium = new ElementData( "No", "Nobelium"      , 102, 259       , -1        , 1100.15   , -1        , 6.65       );
-    public final static ElementData Lawrencium = new ElementData( "Lr", "Lawrencium"    , 103, 262       , -1        , 1900.15   , -1        , -1         );
-    public final static ElementData Rutherfordium = new ElementData( "Rf", "Rutherfordium" , 104, 261       , -1        , -1        , -1        , -1         );
-    public final static ElementData Hahnium = new ElementData( "Ha", "Hahnium"       , 105, 262       , -1        , -1        , -1        , -1         );
-    public final static ElementData Seaborgium = new ElementData( "Sg", "Seaborgium"    , 106, 266       , -1        , -1        , -1        , -1         );
-    public final static ElementData Nielsbohrium = new ElementData( "Ns", "Nielsbohrium"  , 107, 264       , -1        , -1        , -1        , -1         );
-    public final static ElementData Hassium = new ElementData( "Hs", "Hassium"       , 108, 269       , -1        , -1        , -1        , -1         );
-    public final static ElementData Meitnerium = new ElementData( "Mt", "Meitnerium"    , 109, 268       , -1        , -1        , -1        , -1         );
-    // Last element:
-    
-}
\ No newline at end of file

GeomConverter/src/org/lcsim/material
ElementDataToGDML.java removed after 1.1
diff -N ElementDataToGDML.java
--- ElementDataToGDML.java	9 Jun 2005 03:35:07 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,118 +0,0 @@
-/*
- * ElementDataToXMLCnv.java
- *
- * Created on June 7, 2005, 3:28 PM
- */
-
-package org.lcsim.material;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.output.XMLOutputter;
-import org.jdom.output.Format;
-
-/**
- *
- * @author jeremym
- *
- * Converts org.lcsim.material.ElementData to valid GDML materials block.
- *
- */
-public class ElementDataToGDML
-{
-    static final String elementFileName = "elements.xml";
-    
-    /** Creates a new instance of ElementDataToXMLCnv */
-    public ElementDataToGDML()
-    {}
-    
-    /** Get an XML document containing elements. */
-    public static Document convertElementData()
-    {
-        Element root = createMaterialsRoot();
-        
-        for ( Object o : ElementData.elements().values() )
-        {
-            ElementData d = (ElementData) o;
-            
-            Element e = createElement(d);
-            Element m = createMaterial(d);
-            
-            root.addContent(e);
-            root.addContent(m);
-        }
-        
-        Document d = new Document();
-        d.setRootElement(root);
-        return d;
-    }
-    
-    /** Write GDML materials block to given file and path. */
-    public static void write(String path, String nm) throws FileNotFoundException, IOException
-    {
-        Document d = convertElementData();        
-        File f = new File(path + File.separator + nm);
-        OutputStream out = new BufferedOutputStream(new FileOutputStream(f.getAbsolutePath()));
-        XMLOutputter outputter = new XMLOutputter();
-        outputter.setFormat(Format.getPrettyFormat());
-        outputter.output(d, out);
-        out.close();
-    }
-    
-    /** Default write converted elements to ./elements.xml . */
-    public static void write() throws FileNotFoundException, IOException
-    {
-        write(".", elementFileName);
-    }
-    
-    /** Create the "materials" root node. */
-    public static Element createMaterialsRoot()
-    {
-        return new Element("materials");
-    }
-    
-    /** 
-     * Create a chemical element node.      
-     */
-    public static Element createElement(ElementData d)
-    {
-        Element e = new Element("element");
-        e.setAttribute("name", d.fullName()+"_e" );
-        e.setAttribute("formula", d.name() );
-        e.setAttribute("Z", String.valueOf( d.Z() ));
-        
-        Element a = new Element("atom");
-        a.setAttribute("type", "A");
-        a.setAttribute("unit", "g/mol");
-        a.setAttribute("value", String.valueOf( d.A() ));
-        e.addContent(a);
-        
-        return e;
-    }
-    
-    /** Create a material node for the chemical element. */
-    public static Element createMaterial(ElementData d)
-    {
-        Element m = new Element("material");
-        m.setAttribute("name", d.fullName());
-        
-        Element dens = new Element("D");
-        dens.setAttribute("type", "density");
-        dens.setAttribute("unit", "g/cm3");
-        dens.setAttribute("value", String.valueOf(d.rho() ));
-        m.addContent(dens);
-        
-        Element comp = new Element("composite");
-        comp.setAttribute("n","1");
-        comp.setAttribute("ref",d.fullName()+"_e");
-        m.addContent(comp);
-        
-        return m;
-    }
-}
CVSspam 0.2.8