Package gov.nist.microanalysis.NISTMonte

Examples of gov.nist.microanalysis.NISTMonte.BasicMaterialModel


    @Test
    public void testFindAllXRayTransitions() throws Exception {
        MonteCarloSS mcss = getMonteCarloSS();
        new Region(mcss.getChamber(),
                new BasicMaterialModel(
                        MaterialFactory.createPureElement(Element.Au)),
                MultiPlaneShape.createSubstrate(Math2.Z_AXIS,
                        Math2.ORIGIN_3D));

        Set<XRayTransition> transitions =
View Full Code Here




    protected void createGeometry(Region chamber) throws EPQException {
        Material mat = MaterialFactory.createPureElement(Element.Au);
        IMaterialScatterModel model = new BasicMaterialModel(mat);

        double dim = 0.01; // 1 mm
        double[] dims = new double[] { dim, dim, dim };
        double[] pos = new double[] { 0.0, 0.0, -dim / 2.0 };
        MultiPlaneShape shape = MultiPlaneShape.createBlock(dims, pos, 0, 0, 0);
View Full Code Here

    protected static Element createMaterialsElement() throws EPQException {
        Element element = new Element("materials");

        Material mat = MaterialFactory.createCompound("Si3N4", 3.44);
        IMaterialScatterModel model = new BasicMaterialModel(mat);
        model.setMinEforTracking(ToSI.eV(1234));
        element.addContent(createMaterialElement(model, 1));

        mat = MaterialFactory.createCompound("Al2O3", 4.53);
        model = new BasicMaterialModel(mat);
        model.setMinEforTracking(ToSI.eV(4321));
        element.addContent(createMaterialElement(model, 2));

        mat =
                MaterialFactory
                        .createPureElement(gov.nist.microanalysis.EPQLibrary.Element.Au);
        model = new BasicMaterialModel(mat);
        model.setMinEforTracking(ToSI.eV(50));
        element.addContent(createMaterialElement(model, 3));

        return element;
    }
View Full Code Here

         */
        protected Map<Integer, IMaterialScatterModel> extractMaterials(
                Element geometryElement) throws IOException, EPQException {
            Map<Integer, IMaterialScatterModel> materials =
                    new HashMap<Integer, IMaterialScatterModel>();
            materials.put(0, new BasicMaterialModel(Material.Null));

            Element materialsElement = geometryElement.getChild("materials");

            int index;
            String name;
            double density, absorptionEnergyElectron;
            Composition composition;
            Material material;
            IMaterialScatterModel scatterModel;
            for (Element materialElement : materialsElement.getChildren()) {
                try {
                    index =
                            materialElement.getAttribute("_index")
                                    .getIntValue();
                } catch (DataConversionException e) {
                    throw new IOException(e);
                }

                name = materialElement.getAttribute("name").getValue();

                try {
                    density =
                            materialElement.getAttribute("density")
                                    .getDoubleValue();
                } catch (DataConversionException e) {
                    throw new IOException(e);
                }

                absorptionEnergyElectron = 50.0;
                for (Element absEnergyElement : materialElement
                        .getChildren("absorptionEnergy")) {
                    if (absEnergyElement.getAttribute("particle").getValue() != "electron")
                        continue;
                    absorptionEnergyElectron =
                            Double.parseDouble(absEnergyElement.getText());
                }

                composition = extractComposition(materialElement);

                material = new Material(composition, density);
                material.setName(name);

                scatterModel = new BasicMaterialModel(material);
                scatterModel.setMinEforTracking(ToSI
                        .eV(absorptionEnergyElectron));

                materials.put(index, scatterModel);
            }
View Full Code Here

TOP

Related Classes of gov.nist.microanalysis.NISTMonte.BasicMaterialModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.