Was this happening before the hard drive re-formatting?
Please check with your hardware Setting.
It could be a number of things.
I would check the power supply unit and the fans.
What happens if you reboot the machine but you don’t log in ? does it reboot after some time ?
Have you tried rebooting the machine in safe mode ? If it does not reboot when in safe mode, then the problem is probably not hardware. Maybe some incorrect driver.
Also check your event logs and see if there are any errors occurring before the reboots. Try re-seating your memory as well.
If this is a fresh rebuild, you may be better off restarting and trying again and see if the problem exists a second time. As previously mentioned, reseat all memory & removable devices (CD/DVD, network, etc.) Can you boot to a CD-ROM? Try the UBCD4Win (Ultimate Boot CD for Windows) It may permit you to look at the disk and other devices to see if there are issues.