Lightweight 2D representation of a CDC hit for KD-tree sorting.
More...
#include <Utils.h>
|
| double | x |
| | X coordinate of the hit.
|
| |
| double | y |
| | Y coordinate of the hit.
|
| |
| int | hitIndex |
| | Index of the hit in the original input collection.
|
| |
Lightweight 2D representation of a CDC hit for KD-tree sorting.
Represents a CDC hit by its 2D coordinates and a corresponding index.
Definition at line 23 of file Utils.h.
◆ squaredDistanceTo()
| double squaredDistanceTo |
( |
const KDTHit & | other | ) |
const |
|
inline |
Compute squared distance to another KDTHit.
- Parameters
-
- Returns
- Squared Euclidean distance.
Definition at line 35 of file Utils.h.
36 {
37 double dx = x - other.x;
38 double dy = y - other.y;
39 return dx * dx + dy * dy;
40 }
◆ hitIndex
Index of the hit in the original input collection.
Definition at line 29 of file Utils.h.
X coordinate of the hit.
Definition at line 25 of file Utils.h.
Y coordinate of the hit.
Definition at line 27 of file Utils.h.
The documentation for this struct was generated from the following file: