Pasta gratin with tomato sauce