  A refined version of a multi-step calculation of heavy-flavor observables in
pp and AA collisions has been developed, based on pQCD at NLO accuracy followed
by parton shower evolution to describe heavy-quark production and on the
relativistic Langevin equation to describe their stochastic evolution in the
QCD plasma. Then, hadronization is modeled through an implementation of
fragmentation functions based on pQCD and constrained by $e^{+}e^{-}$ collider
data. Results of our calculations can be compared with recent measurements
performed at the LHC in Pb--Pb collisions at $\sqrt{s_{NN}}$=2.76 TeV: nuclear
modification factor $R_{AA}$ of the $p_{T}$ spectra at mid-rapidity of
heavy-flavor decay electrons and of exclusively reconstructed open-charm mesons
at different centralities, as well as their elliptic-flow $v_{2}$($p_{T}$) in
semi-central collisions. To test the validity of our setup for such studies,
its predictions are also checked against the $p_{T}$ spectra measured in pp
collisions at $\sqrt{s}$=7 TeV and 2.76 TeV.
