Cascade of secondary particles produced as the result of a high-energy particle interacting with dense matter