Stochastic model building of photophysics using hidden Markov model