Skip to content

Commit 48d8665

Browse files
mathieuouillonbaltzell
authored andcommitted
Update the wires checked during pre-clustering to ensure the AI can handle cases at the border.
1 parent bfd78f0 commit 48d8665

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

reconstruction/alert/src/main/java/org/jlab/rec/ahdc/AI/PreClustering.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,19 @@ public ArrayList<PreCluster> find_preclusters_for_AI(List<Hit> AHDC_hits) {
5555
ArrayList<Hit> temp = new ArrayList<>();
5656
temp.add(hit);
5757
hit.setUse(true);
58+
int expected_wire_plus = hit.getWireId() + 1;
59+
int expected_wire_minus = hit.getWireId() - 1;
60+
if (hit.getWireId() == 1)
61+
expected_wire_minus = hit.getNbOfWires();
62+
if (hit.getWireId() == hit.getNbOfWires() )
63+
expected_wire_plus = 1;
64+
5865

5966
boolean has_next = true;
6067
while (has_next) {
6168
has_next = false;
6269
for (Hit hit1 : p) {
63-
if (hit1.is_NoUsed() && (hit1.getWireId() == temp.get(temp.size() - 1).getWireId() + 1 || hit1.getWireId() == temp.get(temp.size() - 1).getWireId() - 1)) {
70+
if (hit1.is_NoUsed() && (hit1.getWireId() == expected_wire_minus || hit1.getWireId() == expected_wire_plus)) {
6471
temp.add(hit1);
6572
hit1.setUse(true);
6673
has_next = true;

0 commit comments

Comments
 (0)