Twin boundary energy of hierarchically twinned magnetic shape memory alloys