Best way to get number of hit DOMs
I was wondering if there is a faster way to get the number of hit DOMs among the triggered hits of an event. I used the following because I could not come up with a way to evaluate this in array from.
hits = f.events.hits
hit_doms_cut = 5
no_hit_doms = np.array([len(np.unique(evt.dom_id[evt.trig!=0])) for evt in hits])
hit_event_selection_mask = no_hit_doms >= hit_doms_cut
So, step by step this is: get only the triggered hits, get the dom_id's of them, only use unique entries among them, count the length of these unique entries. Then loop over every event.
Any suggestions?
p.s. Where can I add tags in this? Would be a "discussion" I guess.