  We present a next-to-leading order (NLO) calculation of $t\bar{t}$ production
in hadronic collisions interfaced to shower generators according to the POWHEG
method. We start from an NLO result from previous work, obtained in the zero
width limit, where radiative corrections to both production and decays are
included. The POWHEG interface required an extension of the POWHEG BOX
framework, in order to deal with radiation from the decay of resonances. This
extension is fully general (i.e. it can be applied in principle to any process
considered in the zero width limit), and is here applied for the first time. In
order to perform a realistic simulation, we introduce finite width effects
using different approximations, that we validated by comparing with published
exact NLO results. We have interfaced our POWHEG code to the PYTHIA8 shower
Monte Carlo generator. At this stage, we dealt with novel issues related to the
treatment of resonances, especially with regard to the initial scale for the
shower that needs to be set appropriately. This procedure affects, for example,
the fragmentation function of the b quark, that we have studied with particular
attention. We believe that the tool presented here improves over previous
generators for all aspects that have to do with top decays, and especially for
the study of issues related to top mass measurements that involve B hadrons or
b jets. The work presented here also constitutes a first step towards a fully
consistent matching of NLO calculations involving intermediate resonances
decaying into coloured particles, with parton showers.
