opengate.actors.coincidences ============================ .. py:module:: opengate.actors.coincidences Functions --------- .. autoapisummary:: opengate.actors.coincidences.coincidences_sorter opengate.actors.coincidences.process_chunk opengate.actors.coincidences.copy_tree_for_dump opengate.actors.coincidences.remove_multiples Module Contents --------------- .. py:function:: coincidences_sorter(singles_tree, time_window, minSecDiff, policy, chunk_size=10000) Consider the singles and sort them according to coincidences :param singles_tree: input tree of singles (root format) :param time_window: time windows in G4 units (ns) :param chunk_size: events are managed by this chunk size :return: the coincidences as a dict of events Chunk size is important for very large root file to avoid loading everything in memory DEV NOTES: 1) potential bug while having several chunks: couple of coincidences too much 2) filtering during sorting or after? so far done after but maybe better do during for execution speed 3) removeMultiples policy is applied on EventID maybe should be done differently: checking while time window is open .. py:function:: process_chunk(keys, chunk, coincidences, time_window, policy) .. py:function:: copy_tree_for_dump(input_tree) .. py:function:: remove_multiples(coincidences)