On the payment page, you can retrieve the selected Carrier ID using the following Smarty variable:
{$cart->id_carrier}
This will work anywhere in the Front-end, both on PrestaShop v1.4.x and v1.5.x.
{if isset($cart->id_carrier) && $cart->id_carrier == 1}
{* Do some stuff here *}
{/if}