Energy transfer during intense geomagnetic storms driven by interplanetary coronal mass ejections and their sheath regions