Ive never had to tried it my self but ive heard having relaxing music playing loudly or even like thunderstorm soundtracks can help to mask the booms. Also a heavy blanket/vest wrapped around the dog really helps. I think its called a thunder blanket(?) but its like wrapping them in a constant hug. Ive also had a friend whos dog was prescribed puppy valium for fireworks because it was so bad for the dog.