hi wolfgang et al.,

we have just discovered that the new muoncollectionmerger (muonbuilder) sometimes produces multiple muons with the same id track in the aod collection. 

the problem has been traced back to a flaw in the sorting/decision logic. 
the initial sorting does not take the 'bestmatch' flag into account as a result the first muon in the sorted list before merging can be a muon that is later on rejected when the overlaps are resolved. 

the 'second', bestmatch muon is correctly kept but all other tagged muons that are overlapping are not correctly merged. this can even happen for two combined muons!

the fix is rather trival, i've updated the 'sort' operator to correctly take into account the 'bestmatch' flag when sorting. 
this solves the problem, new tag:

muoncollectionbuilders-00-00-05

as this is a rather nasty bug for groups doing physics analysis, i'd propose to push for having this tag in for the reprocessing. 
i've already started reprocessing a full run with the tag to ensure that it does not have any strange side effects. 

we should have results over the weekend.

cheers niels

