We analyze the energy spectra of single b-jets and B-hadrons resulting from the production and decay of top quarks within the SM at the LHC at the NLO QCD. For both hadrons and jets, we calculate the correlation of the peak of the spectrum with the top quark mass, considering the "energy peak" as an observable to determine the top quark mass. Such a method is motivated by our previous work where we argued that this approach can have reduced sensitivity to the details of the production mechanism of the top quark, whether it concerns higher-order QCD effects or new physics contributions. For a 1% jet energy scale uncertainty, the top quark mass can then be extracted using the energy peak of b-jets with an error ±(1.2(exp) + 0.6(th)) GeV. In view of the dominant jet energy scale uncertainty in the measurement using b-jets, we also investigate the extraction of the top quark mass from the energy peak of the corresponding B-hadrons which, in principle, can be measured without this uncertainty. The calculation of the B-hadron energy spectrum is carried out using fragmentation functions at NLO. The dependence on the fragmentation scale turns out to be the largest theoretical uncertainty in this extraction of top quark mass.