Skip to content

Commit

Permalink
Idiotic mistake in Vertex Constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dae Heun Koh committed Mar 7, 2024
1 parent 7626aa8 commit 0d37a61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion analysis/post_processing/csp/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 0d37a61

Please sign in to comment.