Hierarchical Risk Analysis of Complex Systems