Patrice's code for D meson