1. To make the tart dough, mix the flour, sugar, and salt in the bowl of a stand mixer fitted with the paddle attachment. (You can also make it in a food processor, or by hand, using a pastry blender.) Add the cold butter and mix until the butter pieces are the size of peas.
2. Add the ice water and continue to mix just until the dough comes together. Gather the dough with your hands, shape it into a disk, wrap it plastic, and refrigerate for at least 30 minutes.
3. Cut the tomatoes into 1/2-inch (2cm) slices and set them in a colander, sprinkling them very lightly with a little bit of salt as you lay them in. Let tomatoes drain for about for 30 minutes.
4. Make the filling. If using fromage frais, stir it together with the mustard, fresh herbs (parsley and basil, or parsley and thyme or tarragon), 2 minced garlic cloves, the egg, Parmesan, 1/2 teaspoon salt, black pepper, and cayenne, until smooth. If using whole milk ricotta, mix all the ingredients together, except for the herbs, in a blender or food processor, until smooth, then stir in the herbs by hand. (It’s not imperative to puree the ricotta first, although it does help it lose any graininess store-bought ricotta can have.)
5. Preheat the oven to 400ºF (205ºC).
6. On a lightly floured surface, roll the dough to a 14-inch (36cm) circle and fit it into a 10-inch (26/27cm) tart pan or quiche dish. Let the overhang of dough rest hanging over the edge of the pan. Spread the tart filling over the bottom of the dough in an even layer.If using a baking sheet, lay the dough on a baking sheet lined with parchment paper or a silicone baking mat and spread the filling over the dough, leaving a 2-inch (5cm) band of dough around the filling, with no filling on it, that you’ll be using to fold over the tomatoes.
7. Line a dinner plate with a few layers of paper towels. Remove the tomatoes from the colander and, working in batches, set a few tomatoes at a time on the paper towels to remove excess moisture, then arrange them in overlapping circles over the filling. Continue preparing and arranging the tomatoes the same way in the pan.Places the pieces of sliced garlic over the tomatoes. Grind a little black pepper over the tomatoes. Take the overhang of tart dough, hanging over the edges of the pan, and fold it over the tomatoes to enclose them to make a crust. Bake for 15 minutes.
8. Remove the tart from the oven and sprinkle the tart, including the crust, with the grated Gruyère and bake until the tart is golden brown on top, for another 20 to 30 minutes. (Mine took 30 minutes in the tart pan, and 20 minutes baked freestyle, on the baking sheet.) Remove from the oven and let cool until the tart is cooled down, or tepid. If you’ve baked the tart on a baking sheet (i.e.; freestyle) as soon as it’s cooled and firm up enough to hold together, slide the tart off the baking sheet and onto a wire cooling rack.Sprinkle with additional fresh herbs, and serve. You can serve the tart warm but it’ll be a bit of a challenge to cut into neat pieces.