(a) After the sentence hearing has been conducted, and after the jury has returned a verdict, or after such a verdict has been waived as provided in Section 13A-5-46(a) or Section 13A-5-46(g), the trial court shall impose sentence. Where the jury has returned a verdict of death, the court shall sentence the defendant to death. Where a sentence of death is not returned by the jury, the court shall sentence the defendant to life imprisonment without parole. This code section shall not affect a trial court's power to sentence in accordance with a guilty plea.
(b) Where the sentencing jury is waived pursuant to Section 13A-5-44 and before imposing sentence the trial court shall permit the parties to present arguments concerning the existence of aggravating and mitigating circumstances and the proper sentence to be imposed in the case. The order of the arguments shall be the same as at the trial of a case. The trial court, based upon evidence presented at trial and the evidence presented during the sentence hearing and any evidence submitted in connection with it, shall enter specific written findings concerning the existence or nonexistence of each aggravating circumstance enumerated in Section 13A-5-49, each mitigating circumstance enumerated in Section 13A-5-51, and any additional mitigating circumstances offered pursuant to Section 13A-5-52. The trial court shall also enter written findings of facts summarizing the crime and the defendant's participation in it. In deciding upon the sentence, the trial court shall determine whether the aggravating circumstances it finds to exist outweigh the mitigating circumstances it finds to exist.