View Javadoc

1   package org.lcsim.detector.material;
2   
3   /**
4    *
5    * This is the primary interface to material information
6    * in the {@link org.lcsim.detector} package.
7    *
8    * @author Jeremy McCormick <jeremym@slac.stanford.edu>
9    * @version $Id: IMaterial.java,v 1.5 2010/04/14 18:24:53 jeremy Exp $
10   */
11  public interface IMaterial 
12  {
13      /**
14       * Get the name of this material.
15       * @return The name of the material.
16       */
17  	public String getName();
18      
19      /**
20       * Get the density of this material in g/cm3.
21       * @return The density in g/cm3.
22       */
23  	public double getDensity();
24      
25      /**
26       * Get the atomic mass of this material.
27       * @return The atomic mass.
28       */
29  	public double getZ();
30      
31      /**
32       * Get the atomic number of this material.
33       * @return The atomic number.
34       */
35  	public double getA();
36         
37      /**
38       * Get the nuclear interaction length in g/cm2.
39       * @return The nuclear interaction length in g/cm2.
40       */
41  	public double getNuclearInteractionLength();
42      
43      /**
44       * Get the nuclear interaction length in g/cm2.
45       * @return The nuclear interaction length in cm.
46       */
47  	public double getNuclearInteractionLengthWithDensity();
48      
49      /**
50       * Get the radiation length in g/cm2.
51       * @return The radiation length in g/cm2.
52       */
53  	public double getRadiationLength();
54      
55      /**
56       * Get the radiation length in cm.
57       * @return The radiation length in cm.
58       */
59  	public double getRadiationLengthWithDensity();
60      
61      /**
62       * Get the Moliere radius in cm.
63       * @return The moliere radius in cm.
64       */
65  	public double getMoliereRadius();
66      
67      /**
68       * Get the temperature of the material in Kelvin.
69       * @return The temperature in Kelvin.
70       */
71      public double getTemperature();
72      
73      /**
74       * Get the pressure of the material in atmospheres.
75       * @return The pressure of the material in atmospheres.
76       */
77      public double getPressure();
78      
79      /**
80       * Get the state of this material, either liquid, gas, solid, or unknown.
81       * @return The state of this material.
82       */
83  	public State getState();
84  	
85      public final static State Unknown = new State("unknown");
86      public final static State Gas = new State("gas");
87      public final static State Liquid = new State("liquid");
88      public final static State Solid = new State("solid");
89  	
90  	public class State
91  	{
92  	    private String state;
93  	    	    
94  	    private State(String state)
95  	    {
96  	        this.state = state;
97  	    }
98  	    
99  	    public String toString()
100 	    {	       
101 	        return state;
102 	    }	
103 	}
104 	
105 	// Defaults for non-mandatory parameters.
106 	static public final double defaultTemperature=273.15;
107 	static public final State defaultState=Unknown;
108 	static public final double defaultPressure=1.0;
109 	static public final double defaultIonizationPotential=0.0;	
110 }