A method and apparatus for treating abnormal mucosa in the esophagus is disclosed, such that the depth of the treated tissue is controlled. The depth of ablation is controlled by monitoring the tissue impedance and/or the tissue temperature. A desired ablation depth is also achieved by controlling the energy density or power density, and the amount of time required for energy delivery. A method and apparatus is disclosed for measuring an inner diameter of a body lumen, where a balloon is inflated inside the body lumen at a fixed pressure.