working on analysis ot make it work properly with CERN testbeam data