Correlation between microstructure and martensitic transformation, mechanical properties and elastocaloric effect in Ni–Mn-based alloys