It happened to me to when I played with the hood latch. I tried to clean the dirty old grease from it and grease it with lithium grease spray. After this I lost the alarm.
There is a small switch (blue) in the hood latch. Looks like if it gets shorted it does'nt arm the alarm. I used a the crc electronic contact cleaner, sprayed it on the blue switch and it started working fine again.
Check if this applies to you, if it does not, you could check for other sensor/switch locations on the car check if any of these have gone bad.