Measurement of the effective b quark fragmentation function at the Z resonance