To prepare the marinade, heat the oil in a saucepan, add all the vegetables, herbs and spices, cover and cook gently until tender. Place the fillet in a long non-metallic dish or casserole, sprinkle with the salt, cover with the vegetable mixture, and pour on the vermouth and brandy. Cover and leave in a cool place or a refrigerator for 24 hours, turning and basting every few hours.
Meanwhile blend the flour, butter, Cookeen, salt and water together. Butter the outside of a 12 by 3-inch loaf tin. Roll three-fifths of the pastry into a rectangle of 16 by 7-inches, lay it over the upside-down tin and press into place. Trim so that the pastry forms a case of 1 1/2-inches deep. Prick all over with a fork and chill for 30 minutes. Chill the remaining pastry as well.
Preheat the oven to 425 degrees F.
Bake the "case" still attached to the loaf tin, in the middle of the oven until light brown, about 12 to 15 minutes. Cool for 10 minutes on the tin, then carefully unmold.
Scrape the marinade off the meat, reserve it for the sauce, and dry with kitchen paper. Rub the meat with oil and put in a roasting pan, cover with oiled foil and place in the oven. Roast for 25 minutes, turning and basting halfway through the cooking time. Remove from oven and cool for 30 minutes.
Saute the mushrooms and shallots in the butter for about 8 minutes, add the Madeira and boil rapidly until all the liquid has evaporated. Stir in 4 tablespoons of pate, mix well, turn into a bowl and cover until needed.
Roll the remaining pastry into a 16 by 7-inch rectangle. Over the bottom spread half the softened butter, fold in half to enclose butter. Repeat with the remaining butter and fold again. Roll into a rectangle, then fold in thirds like a business letter. Chill for 2 hours, then roll into another rectangle of 16 by 10-inches.
Place the baked bottom case on a buttered baking sheet, spread half the sauteed mushroom mixture on the bottom of the pastry case. Remove the string from the beef, place the beef on top of the mushrooms and cover with the rest. Beat the egg with half a teaspoon of water and paint the sides of the case, press together and trim if necessary. Paint with the egg glaze. Make cross-hatch marks over the pastry and three vent holes 3-inches apart. Insert in these tiny foil funnels for escaping steam.
Bake in the middle of a preheated oven at 425 degrees for 20 minutes then lower the heat to 375 degrees F for another 20 minutes before serving.
To make the sauce, simmer the marinade with the mushroom ketchup in the beef stock and tomato puree for 1 hour. When reduced to 16 fluid ounces, strain, return to saucepan, and thicken with cornflour mixed with the Madeira, port, or sherry. Simmer until shiny and thickened, season, to taste.