  The connection between the pre-stellar core mass function (CMF) and the
stellar initial mass function (IMF) lies at the heart of all star formation
theories. In this paper, we study the earliest phases of star formation with a
series of high-resolution numerical simulations that include the formation of
sinks. In particular, we focus on the transition from cores to sinks within a
massive molecular filament. We compare the CMF and IMF between magnetized and
unmagnetized simulations, and between different resolutions. We find that
selecting cores based on their kinematic virial parameter excludes collapsing
objects because they host large velocity dispersions. Selecting only the
thermally unstable magnetized cores, we observe that their mass-to-flux ratio
spans almost two orders of magnitude for a given mass. We also see that, when
magnetic fields are included, the CMF peaks at higher core mass values with
respect to pure hydrodynamical simulations. Nonetheless, all models produce
sink mass functions with a high-mass slope consistent with Salpeter. Finally,
we examine the effects of resolution and find that, in isothermal simulations,
even models with very high dynamical range fail to converge in the mass
function. Our main conclusion is that, although the resulting CMFs and IMFs
have similar slopes in all simulations, the cores have slightly different sizes
and kinematical properties when a magnetic field is included. However, a core
selection based on the mass-to-flux ratio alone is not enough to alter the
shape of the CMF, if we do not take thermal stability into account. Finally, we
conclude that extreme care should be given to resolution issues when studying
sink formation with an isothermal equation of state.
