Package pymontecarlo.program.nistmonte.options.detector

Examples of pymontecarlo.program.nistmonte.options.detector.PhotonIntensityDetector


    public void testPHOTON_INTENSITY() throws IOException, EPQException {
        Element element = createPhotonIntensityDetectorElement("det1");

        DetectorExtractor extractor = DetectorExtractorFactory.PHOTON_INTENSITY;

        PhotonIntensityDetector det =
                (PhotonIntensityDetector) extractor.extract(element);

        double[] pos = det.getDetectorPosition();
        assertEquals(Math.toRadians(40.0), Math.atan2(pos[2], pos[0]), 1e-4);
        assertEquals(Math.toRadians(90.0), Math.atan2(pos[1], pos[0]), 1e-4);
    }
View Full Code Here


        assertEquals(1, detectors.size());

        // Detector 1 (photon intensity detector)
        Detector det = detectors.get("det1");

        PhotonIntensityDetector phDet = (PhotonIntensityDetector) det;
        double[] pos = phDet.getDetectorPosition();
        assertEquals(Math.toRadians(40.0), Math.atan2(pos[2], pos[0]), 1e-4);
        assertEquals(Math.toRadians(90.0), Math.atan2(pos[1], pos[0]), 1e-4);

        // // Detector 2 (photon spectrum)
        // det = detectors.get("det2");
View Full Code Here

        public Detector extract(Element detectorElement) throws IOException,
                EPQException {
            double takeOffAngle = extractTakeOffAngle(detectorElement);
            double azimuthAngle = extractAzimuthAngle(detectorElement);

            return new PhotonIntensityDetector(takeOffAngle, azimuthAngle);
        }
View Full Code Here

TOP

Related Classes of pymontecarlo.program.nistmonte.options.detector.PhotonIntensityDetector

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.