Text this: Longitudinal structure optimization for a high density electromagnetic calorimeter