Quantum Coherence and Spin Squeezing in Optomechanical System