Energy spectrum of the quasiparticle in a quantum dot formed by a superconducting pair potential under a magnetic field