-
graphicle.select.arg_closest(focus: MomentumArray, candidate: MomentumArray, num_threads: int =
1) list[int][source] Assigns four-momenta elements in
candidateto the nearest four-momenta elements infocus. Elements incandidateare assigned to one element infocusonly.New in version 0.2.14.
Changed in version 0.3.8: Modified the distance metric to include transverse momentum.
- Parameters:¶
- focus : MomentumArray¶
Four-momenta of objects to receive assignments to nearest
candidateobjects.- candidate : MomentumArray¶
Four-momenta of candidate objects to draw from until
focusobjects have each received an assignment.- num_threads : int¶
Number of threads to parallelise the cost matrix computation over. Default is 1.
- Returns:¶
Indices of elements in
candidateassigned to each respective element infocus. This will be the same length asfocus.- Return type:¶
See also
monte_carlo_tagMC truth parton assignment to particle clustering.
Notes
Since only one
focuselement can receive a givencandidateelement, this must be regarded a cost-minimisation problem. The costs here are the distances in the azimuth-rapidity plane between elements. To illustrate, if onecandidateelement is the closest for twofocuselements, it must be assigned to the smaller distance of the two, and the remainingfocuselement must be assigned the next-nearestcandidateelement. This is equivalent to the Assignment Problem [1] for a complete bipartite graph, and uses SciPy’s modified Jonker-Volgenant algorithm with no initialisation ref. [2] under the hood.References
Last update:
Jun 27, 2025