Photosynthetic capacity, canopy size and rooting depth mediate response to heat and water stress of annual and perennial grain crops