Left: invariant mass distributions of \Dplusminus candidates in the $2<\pT<3 \gev/c$ interval. The green solid line shows the total fit function and the gray dotted line the combinatorial background. The contributions of \Dplusminus mesons originating from charm hadronisation and beauty-hadron decays are obtained with the method relying on the definition of different selection criteria, as explained in the text. Right: example of raw-yield distribution as a function of the BDT-based selection employed in the procedure adopted for the determination of the fraction of \Dplusminus originating from beauty-hadron decays for the $2<\pT<3 \gev/c$ interval.