From 0d37a618824e5853f5d75aa356f8520dcd88d983 Mon Sep 17 00:00:00 2001 From: Dae Heun Koh Date: Thu, 7 Mar 2024 00:27:19 -0800 Subject: [PATCH] Idiotic mistake in Vertex Constraint --- analysis/post_processing/csp/constraints.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/analysis/post_processing/csp/constraints.py b/analysis/post_processing/csp/constraints.py index fbed8c31..35c017f5 100644 --- a/analysis/post_processing/csp/constraints.py +++ b/analysis/post_processing/csp/constraints.py @@ -3,6 +3,7 @@ from mlreco.utils.globals import * from .utils import select_valid_domains +import networkx as nx def constraints_dict(name): cst_dict = { @@ -138,7 +139,8 @@ def __call__(self, particle, interaction): return out dists = np.linalg.norm(particle.points - interaction.vertex, axis=1) # Check if particle point cloud is separated from vertex: - if dists.any() >= self.r: + print(particle, dists.min(), dists.all()) + if (dists >= self.r).all(): out[ELEC_PID] = False out[PHOT_PID] = True