  We present FMNLO, a framework to combine general-purpose Monte Carlo
generators and fragmentation functions (FFs). It is based on a hybrid scheme of
phase-space slicing method and local subtraction method, and accurate to
next-to-leading order (NLO) in QCD. The new framework has been interfaced to
MG5 aMC@NLO and made publicly available in this work. We demonstrate its unique
ability by giving theoretical predictions of various fragmentation measurements
at the LHC, followed by comparison with the data. With the help of
interpolation techniques, FMNLO allows for fast calculation of fragmentation
processes for a large number of different FFs, which makes it a promising tool
for future fits of FFs. As an example, we perform a NLO fit of parton
fragmentation functions to unidentified charged hadrons using measurements at
the LHC. We find the ATLAS data from inclusive dijet production show a strong
constraining power. Notable disparities are found between our gluon FF and that
of BKK, DSS and NNFF, indicating the necessities of additional constraints and
data for gluon fragmentation function.
