Not sure. You can try this for the next two days:

Day 1) Have coffee, no chocolate. Wait till headache arises. Have coffee. Record results.
Day 2) Have coffee, no chocolate. Wait till headache arises. Have sugar. Record results.