We have developed the integrated 2D PIC code for the analysis of the negative ion beam optics, in which an overall region from the source plasma to the accelerator is modeled. Thus, the negative ion trajectory can be solved self-consistently without any assumption of the plasma meniscus form initially. This code can reproduce the negative ion beam halo observed in an actual negative ion beam. It is confirmed that the surface produced negative ions which are extracted near the edge of the meniscus can be one of the reasons for the beam halo: these negative ions are over-focused due to the curvature of the meniscus. The negative ions are not focused by the electrostatic lens, and consequently become the beam halo.