It's not the smoking. It's the malfunction in our brain that gives us the compulsion to smoke which also causes the headache. There are a lot of addictive type personalities here (smokers, drunks, etc.). Research shows some serotonin link eith this type of personality. And of course, the serotonin points back to the hypothalamus.