A total energy trigger at large angles used in a calorimetric study of 150 GeV and 300 GeV pion and proton interactions on hydrogen