Scrub mussels under cold running water with a kitchen brush. Open mussels (to open, hold the hinged end in your hand and insert a sturdy, blunt knife between the shell halves, working it to cut the hinge; twist the knife to pry open the shell) preserving its juices (important! You need them for taste) and discarding the half of the shell with no meat.
Peel potatoes, cut into thick slices crossways and put them in a bowl with cold water.
Peel garlic cloves and mince; clean, wash and chop onions, celery, parsley and basil; wash and cut cherry tomatoes into pieces.
Preheat oven to 180 degrees C. Put some olive oil and butter in a deep pie dish; then make a layer with garlic, onions, parsley, celery, basil and tomatoes. Cover with a layer of potatoes, season to taste with salt and sprinkle with pecorino cheese. Arrange mussels and their juices and sprinkle with pepper. Cover with the rice.
Repeat a layer of garlic, onions, celery, parsley, basil, tomatoes and oil; season to taste with salt and sprinkle with pecorino cheese. Cover with potato slices and coat them with garlic, onions, celery, parsley, basil, tomatoes, olive oil and some butter. Season to taste with salt and sprinkle grated cheese. Pour over water to just cover the ingredients and bake for at least 30 minutes or until there is no cooking juice. If necessary, add some hot water (no more than a couple of tablespoons), during cooking.
Let the dish rest for a few minutes and then serve.