@Override
    public DetectorHit getLayerHit(Path3D path) {
        if (path == null) {
            return null;
        }

        // Create an intersect point object that will contain the line-face
        // insercetion coordinates, if there is an intersection, set by the
        // intersect method
        Point3D intersectPt = new Point3D();

        // Create an error point object which will remain (0,0,0) because we do
        // not have error data
        Point3D errorPt = new Point3D();

        // Use the path's points to create lines...
        // For each line:
        int nPathNodes = path.nodes();
        Line3D line = new Line3D();
        for (int node = 1; node < nPathNodes; node++) {
            line.set(path.getNode(node - 1), path.getNode(node));

            if (useBoundaryFilter) {
                boolean noHit = true;
                for(int f=0; f<boundary.size() && noHit; f++)
                    if (Face3D.intersection(boundary.face(f), line, errorPt))
                        noHit = false;
                if (noHit)
                    continue;
            }
            
            // For each paddle in the in the sector:
            for (DetectorPaddle paddle: paddles.values()) {

                // If the line intersects the front face of the paddle
                if (paddle.intersectFront(line, intersectPt)) {
                    DetectorDescriptor desc = new DetectorDescriptor(
                            detectorId, sectorId, superlayerId, layerId, paddle.getComponent());
                    DetectorHit hit = new DetectorHit(desc, intersectPt, errorPt);
                    return hit;
                }
            }
        }

        return null;
    }