1 package org.lcsim.detector.material; 2 3 import java.util.List; 4 5 /** 6 * This interface is a material mixture that is defined by a list 7 * of sub-materials. The sub-materials are added by mass fraction 8 * or atom count. Mixing mass fractions and atom counts in a single 9 * definition is not allowed and will cause a fatal error. 10 * 11 * @author Jeremy McCormick <jeremym@slac.stanford.edu> 12 * @version $Id: IMaterialMixture.java,v 1.4 2010/04/14 18:24:53 jeremy Exp $ 13 */ 14 public interface IMaterialMixture 15 extends IMaterial 16 { 17 /** 18 * Get the total number of components allowed in this mixture. 19 * @return The maximum number of allowed components. 20 */ 21 public int getNComponentsMax(); 22 23 /** 24 * The number of components added thusfar to the mixture. 25 * @return The number of components added so far. 26 */ 27 public int getNComponents(); 28 29 /** 30 * Get the number of different elements in this mixture. 31 * @return The number of different elements in this mixture. 32 */ 33 public int getNElements(); 34 35 /** 36 * Get a list of elements in this mixture. 37 * @return A list of elements in this mixture. 38 */ 39 public List<MaterialElement> getElements(); 40 41 /** 42 * Get the list of mass fractions in this element. Same order as {@link #getElements()}. 43 * @return 44 */ 45 public List<Double> getMassFractions(); 46 47 /** 48 * Get the list of atom counts in this element. Same order as {@link #getElements()}. 49 * @return The list of atom counts. 50 */ 51 public List<Integer> getAtomCounts(); 52 53 /** 54 * 55 * @return True if {@link #getNComponents()} is equal to {@link #getNComponentsMax()}. 56 */ 57 public boolean isFilled(); 58 }