  We present a study of charmed hadron transverse momentum distribution from
p+p collisions at $\sqrt{s_{NN}}=200$ GeV using the PYTHIA Monte Carlo event
generator. The PHENIX tuned PYTHIA parameter set based on electron measurements
alone yields a $D$ meson $p_{T}$ distribution softer than the preliminary STAR
experimental data from d+Au collisions scaled by the number of binary
collisions. In order to match the STAR $p_{T}$ spectrum, the higher order QCD
effects in PYTHIA have to be taken into account, and a fragmentation function
of charm quarks much harder than the default Peterson function is needed.
Electrons from beauty quark semi-leptonic decays are found significantly below
the contribution from charm quark decays for the $p_{T}$ region up to 8 GeV/c
in our modified fragmentation scheme, while in the default fragmentation scheme
the B decay electrons dominate at $p_{T}$ above 4 GeV/c. We propose an
experimental measurement of electron and charged hadron correlation to
differentiate these scenarios.
