Risk of predation, hydrodynamic efficiency and their influence on school structure