J&K cop dies, daughter injured in terrorist attack