Quantum coherence in a dissipative-driven system and the optical Stern-Gerlach experiment