The best way is to go to wikipedia.org and enter "History of Hanover" in the search area. You can then read the article and decide for yourself what the correct answer is. This is the way I do mine.
German history is very complicated, and don't expect the answer to be simple. "Holy 'Roman Empire works from around 960 A.D. to 1806, but especially after 1648, you would want to include the local jurisdiction in the description as well, as it would be important for religious and political reasons.
It's good that you are trying to do this: you will learn a great deal about why your ancestors emigrated as well as a lot of German and European history by doing so..