construct event map and weight vector, store the mapping of indices (with @chaubold)