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