Package pymontecarlo.program.nistmonte.options.detector

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


        HDF5Group resultsGroup =
                rootGroup.createSubgroup("result-" + identifier);

        // Save results from detectors
        String key;
        Detector detector;
        for (Entry<String, Detector> entry : detectors.entrySet()) {
            key = entry.getKey();
            detector = entry.getValue();

            detector.saveResults(resultsGroup, key);
        }

        // Save overall log
        Properties props = new Properties();
        createLog(props, mcss);
View Full Code Here


        Map<String, Detector> detectors = new HashMap<String, Detector>();

        DetectorExtractor extractor;
        String key;
        Detector detector;
        for (Element detectorElement : detectorsRoot.getChildren()) {
            key = detectorElement.getAttributeValue("_key");

            extractor =
                    (DetectorExtractor) ExtractorManager
View Full Code Here

    public void testGetDetectors() {
        Map<String, Detector> detectors = extractor.getDetectors();
        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);
View Full Code Here

TOP

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

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.