  Heavy quark observables are applied to probe the initial energy density
distribution with violation of longitudinal boost invariance produced in
relativistic heavy-ion collisions. Using an improved Langevin model coupled to
a (3+1)-dimensional viscous hydrodynamic model, we study the nuclear
modification factor ($R_\text{AA}$), directed flow ($v_1$) and elliptic flow
($v_2$) coefficients of heavy mesons and their decayed electrons at the RHIC
energy. We find that the counter-clockwise tilt of the nuclear matter in the
reaction plane results in a positive (negative) heavy flavor $v_1$ in the
backward (forward) rapidity region, whose magnitude increases with the heavy
quark transverse momentum. The difference in the heavy flavor $R_\text{AA}$
between different angular regions is also proposed as a complementary tool to
characterize the asymmetry of the medium profile. Our model results are
consistent with currently available data at RHIC and provide predictions that
can be tested by future measurements.
