protected AbstractDetectorLayer(
            String detectorName,
            int sector,
            int superlayer,
            int layer,
            List<DetectorPaddle> paddles,
            Plane3D plane,
            Shape3D boundary,
            boolean useBoundaryFilter) {
        if (detectorName == null)
            throw new IllegalArgumentException("Error: detectorName cannot be null");
        if (sector < 0 || sector>=6)
            throw new IllegalArgumentException("Error: sector should be in range [0,5], but sector="+sector);
        if (superlayer < 0)
            throw new IllegalArgumentException("Error: superlayer cannot be negative");
        if (layer < 0)
            throw new IllegalArgumentException("Error: layer cannot be negative");
        if (paddles == null)
            throw new IllegalArgumentException("Error: paddles cannot be null");
        if (plane == null)
            throw new IllegalArgumentException("Error: plane cannot be null");
        if (boundary == null)
            throw new IllegalArgumentException("Error: boundary cannot be null");
        this.detectorName = detectorName;
        detectorId = DetectorTypes.getType(detectorName).id();
        sectorId = sector;
        superlayerId = superlayer;
        layerId = layer;
        defaultPaddle = new DetectorPaddle(-1, 1, 1, 1);
        defaultPaddle.translateXYZ(0, 0, -10000);
        this.paddles = new HashMap();
        for (DetectorPaddle paddle : paddles)
            this.paddles.put(paddle.getComponent(), paddle);
        this.plane = plane;
        this.boundary = boundary;
        this.useBoundaryFilter = useBoundaryFilter;
        transformation = new Transformation3D();
    }