Courthouse shooter sentenced to death