A tool for risk analysis and protection design of railway infrastructures