I'd bet on the dirt weed too. All I smoke is cheap shit and I get the headaches every once inawhile too. 1000mg of Tylenol takes care if that everytime...
Well, if the water isn't helping it's obviously not dehydration. The best advice I could give you is 1: lay of the cigs, and 2: even if it means taking a long drive and picking up large amounts at one time to get more quality shit, it's worth it. Or you can just not smoke.