I have a powder room toilet that bangs terribly when you flush. Personally, it sounds more like a drill than a hammer to me. If you turn the cold water tap on fairly high and then down a bit this stops it but you have to leave the tap on a trickle for a few minutes or the sound will start again as soon as you turn the cold tap off. After a few minutes, the tap can be turned fully off and there will be no noise. If the washing machine is filling, this can delay the sound from starting. There are three other toilets in the house which do not have any trouble. I have tried bleeding the system by turning on all the taps and turning off the main, but this has not helped. I have replaced two ballcock assemblies so far perhaps I need to do this one too? The system is 18 years old.