I wonder if some one can give me some pointers for an efficient way to do coincidence sorting between two Root trees.
I have two Root trees that contain Gamma events from two different detectors. One of the branches in each tree contains a 64-bit time stamp in increasing order(and sorted to the last significant bit). The two tree have diiferent number of events.
I would like to seek out those events from both trees that occur within a set time window, e.g., within 10 nanoseconds of each other.
I have had a good look into the ROOT classes. I understand “qSort” is available in Root for 64-bit integer. “TList” has the sort method implemented. But if I implement any sorting using the way I have in mind, it would be very inefficient.
I believe sorting for coincidence is a common requirements in high energy Physics experiments. Someone out there would have done a better job than what I can do, since there are many tricks of the trade when it come to sorting.
I would welcome any pointers; better still, some one willing to share their codes.
Much appreciated
Tim