A new high brightness injector based on a new photocathode RF electron gun is planned to be installed at Hefei light source. To get high quality electron bunch, precise control of beam position is required. The positional resolution of the beam position monitor (BPM) system designed for RF electron gun should be higher than 10 μm. A new type of cavity BPM with racetrack cavity is designed. The racetrack cavity is a cavity with a racetrack cross section, so that it has a pair of dipole modes with different resonant frequency and fixed polarization direction. The cross-talk problem is then solved. The 3D model of the cavity is simulated in MWS, and the theoretical performance of racetrack BPM and the optimization method are analysed. The theoretical resolution of racetrack cavity BPM can be