Ashton Carter, former Obama secretary of defense, died after a “sudden cardiac event,” his family said.