Black hole geometrothermodynamics