Geometric invariants as detector of Hawking and Unruh effects and quantum field theory in curved space