The racing heartbeat and burning head sensation could certainly be related to the cannabis. It is well known to cause anxiety
and even panic attacks (anxiety associated with physical symptoms like you described). This is usually more likely to happen with higher potency cannabis as well as when you're off of it for a while and then restart smoking
. Of course, you should always also suspect the cannabis could have been "cut" with something else. This is an unfortunate practice of some dealers who add other drugs to the cannabis to make it more addictive. Common things to put on/in weed include cocaine, LSD, and meth. These adulterants can also cause the symptoms you're describing.