def filter_distorigin(subparticles, subpart, distorigin):
    """return True is particle must be kept"""
    xDim, yDim, _ = subpart.getDim()
    coordinate = subpart.getCoordinate()
    x = coordinate.getX()
    y = coordinate.getY()
    distance_sqr = (x - xDim / 2.0) ** 2 + (y - yDim / 2.0) ** 2
    return distance_sqr > distorigin ** 2
