From ad53d3cbfe27aa5c76110b57231e9955351a4325 Mon Sep 17 00:00:00 2001 From: tongtongcao Date: Thu, 2 May 2024 14:45:36 -0400 Subject: [PATCH] update for DC stereo angle --- .../dc/src/main/java/org/jlab/rec/dc/Constants.java | 7 ++++--- .../dc/src/main/java/org/jlab/rec/dc/segment/Segment.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/Constants.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/Constants.java index 11f0267afe..c406da2127 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/Constants.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/Constants.java @@ -54,9 +54,10 @@ public static Constants getInstance() { public static final double SIN25 = Math.sin(Math.toRadians(25.)); public static final double COS25 = Math.cos(Math.toRadians(25.)); public static final double COS30 = Math.cos(Math.toRadians(30.)); - public static final double SIN6 = Math.sin(Math.toRadians(6.)); - public static final double COS6 = Math.cos(Math.toRadians(6.)); - public static final double TAN6 = Math.tan(Math.toRadians(6.)); + public static final double STEREOANGLE = 6.; + public static final double SIN6 = Math.sin(Math.toRadians(STEREOANGLE)); + public static final double COS6 = Math.cos(Math.toRadians(STEREOANGLE)); + public static final double TAN6 = Math.tan(Math.toRadians(STEREOANGLE)); public static final double CTAN6 = 1/TAN6; public static final double[] SINSECTOR60 = {0, Math.sin(Math.toRadians(60.)), Math.sin(Math.toRadians(120.)), 0, Math.sin(Math.toRadians(240.)), Math.sin(Math.toRadians(300.))}; diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/segment/Segment.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/segment/Segment.java index b4617909f9..793dfe0e5f 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/segment/Segment.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/segment/Segment.java @@ -244,7 +244,7 @@ public boolean hasConsistentSlope(Segment otherseg) { boolean value = false; if (this.get_fitPlane() != null && otherseg.get_fitPlane() != null) { - if (Math.abs(Math.toDegrees(Math.acos(this.get_fitPlane().normal().dot(otherseg.get_fitPlane().normal()))) - 12.) < Constants.SEGMENTPLANESANGLE) // the angle between the plane normals is 12 degrees with some tolerance + if (Math.abs(Math.toDegrees(Math.acos(this.get_fitPlane().normal().dot(otherseg.get_fitPlane().normal()))) - 2*Constants.STEREOANGLE) < Constants.SEGMENTPLANESANGLE) // the angle between the plane normals is 2*Constants.STEREOANGLE degrees with some tolerance { value = true; }