Examples of GaussianFWHMBeam


Examples of pymontecarlo.program.nistmonte.options.beam.GaussianFWHMBeam

    public void testGAUSSIAN_FWHM() throws IOException, EPQException {
        Element element = createGaussianFWHMBeamElement();

        BeamExtractor extractor = BeamExtractorFactory.GAUSSIAN_FWHM;

        GaussianFWHMBeam beam = (GaussianFWHMBeam) extractor.extract(element);
        assertEquals(1234, FromSI.eV(beam.getBeamEnergy()), 1e-4);
        assertEquals(0.01, beam.getCenter()[0], 1e-4);
        assertEquals(0.02, beam.getCenter()[1], 1e-4);
        assertEquals(0.03, beam.getCenter()[2], 1e-4);
        assertEquals(4, beam.getDirection()[0], 1e-4);
        assertEquals(5, beam.getDirection()[1], 1e-4);
        assertEquals(6, beam.getDirection()[2], 1e-4);
        assertEquals(10, beam.getDiameter() * 1e9, 1e-4);
    }
View Full Code Here

Examples of pymontecarlo.program.nistmonte.options.beam.GaussianFWHMBeam

            PencilBeamExtractor implements BeamExtractor {

        @Override
        public ElectronGun extract(Element beamElement)
                throws IOException, EPQException {
            GaussianFWHMBeam beam =
                    new GaussianFWHMBeam(extractDiameter(beamElement));

            beam.setBeamEnergy(ToSI.eV(extractBeamEnergy(beamElement)));
            beam.setCenter(extractCenter(beamElement));
            beam.setDirection(extractDirection(beamElement));

            return beam;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.