The electromagnetic field inside perfectly conducting parallel plates interacting with two-level atom is investigated. The cavity modes are firstly quantized, allowing the effective Hamiltonian to be evaluated for an electric dipole located at an arbitrary point. Some statistical aspect of this effective Hamiltonian such as the temporal evolution of the atomic inversion and the von Neuman entropy are presented. Theses aspects are sensitive to the changes of the distance between the two plates, which control the number of the propagating of the cavity modes.