Skip to content

Commit b365a8c

Browse files
authored
Merge branch 'development' into rgl-yaml
2 parents 524b248 + 4a1f948 commit b365a8c

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/MPGD/trapezoid/MPGDTrapezoidStripFactory.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ protected static boolean buildStripSegment(int internalIndex, StripConstants c,
337337
Vector3d nXY = new Vector3d(ca, -sa, 0.0);
338338
double rhs = (internalIndex + 0.5) * c.pitch;
339339

340-
List<Vector3d> inters = new ArrayList<>(4);
340+
List<Vector3d> inters = new ArrayList<>();
341341

342342
for (Vector3d[] e : tr.edges()) {
343343
Vector3d P = new Vector3d(0, 0, 0);
@@ -360,8 +360,14 @@ protected static boolean buildStripSegment(int internalIndex, StripConstants c,
360360
double d2 = dx * dx + dy * dy;
361361
if (d2 > best) {
362362
best = d2;
363-
a = inters.get(i);
364-
b = inters.get(j);
363+
if(dy>0) {
364+
a = inters.get(i);
365+
b = inters.get(j);
366+
}
367+
else {
368+
a = inters.get(j);
369+
b = inters.get(i);
370+
}
365371
}
366372
}
367373
}
@@ -419,9 +425,9 @@ protected List<StripGeom> buildStripCache(StripConstants c) {
419425
tmp.add(s);
420426
}
421427

422-
tmp.sort(Comparator
423-
.comparingDouble((StripGeom s) -> s.orderXLocal)
424-
.thenComparingInt(s -> s.internalIndex));
428+
// tmp.sort(Comparator
429+
// .comparingDouble((StripGeom s) -> s.orderXLocal)
430+
// .thenComparingInt(s -> s.internalIndex));
425431

426432
int comp = 1;
427433
for (StripGeom s : tmp) {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<dependency>
7575
<groupId>org.yaml</groupId>
7676
<artifactId>snakeyaml</artifactId>
77-
<version>2.5</version>
77+
<version>2.6</version>
7878
</dependency>
7979

8080
<dependency>

0 commit comments

Comments
 (0)