The CARM beam-wave interaction and cavity design