tractor - It is different for trained hunting dogs, especially the gun dogs. I grew up in a rural area, and pretty much none of the dogs in our neighborhood were upset by the booms, but they were all exposed to gunfire from puppyhood. The closest we had to issues with dogs on the 4th was that our Vizla (who we got from my best friend's family when the parents divorced) got super excited by gunshots, thinking she was going to get to go get a bird, and she would involuntarily piddle, and want to run off looking for a bird. So she had to be in her outdoor kennel during our home festivities, but that was it.
My current dogs live in an area where discharging a gun, for any reason, is illegal. They just haven't been exposed to these kinds of booms on any kind of consistent basis, and certainly not as part of any training protocol, so it's just different.