For the tart tatin: Preheat the oven to 180 Centigrade (350 degrees F). Place the sugar and butter in a heavy-based, ovenproof frying pan over medium-high heat. Stir 2 or 3 times and then leave to simmer until the sugar is melted and golden.
Add the pears, lemon juice, 2 tablespoons water, the rosemary and vanilla to the pan and gently stir until the pears are well coated. Cook gently until they take on some color and start to caramelize, about 5 minutes. Remove the pan from the heat and arrange the pears so that they are lying as flat and close together as possible.
Cut out a circle of puff pastry that is about 1 inch wider than the width of the pan. Lay it over the pears and tuck in the sides so that everything is well covered. (If you don¿t have an ovenproof pan, just transfer the pear mixture to a greased, shallow, round ovenproof baking dish or flan dish at this stage.) Pierce the pastry a few times with a knife to allow steam to escape during cooking, and bake until the pastry is puffy and golden, 25 to 30 minutes.
Meanwhile, make the ganache: Heat the chocolate and cream together over a double boiler until the chocolate has melted. Stir until silky.
To serve: Leave the tart to cool for a few minutes before turning out onto a plate. Hold the plate over the pan with a dish cloth and invert the pan¿be very careful, as the extremely hot caramel can spill out. Serve with white chocolate ganache and a dollop of mascarpone.