From e898982fe7ecfda1497a9bbe7c610dff434677d5 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 28 Sep 2026 14:03:16 -0400 Subject: [PATCH 01/16] build(deps): bump `org.jlab.coda:jclara` to 6.1 release notes: https://code.jlab.org/hallb/clas12/coatjava/clara-java/-/releases/6.1 --- common-tools/clas-io/pom.xml | 1 - pom.xml | 12 +++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/common-tools/clas-io/pom.xml b/common-tools/clas-io/pom.xml index 32aa1e67c2..c470daab26 100644 --- a/common-tools/clas-io/pom.xml +++ b/common-tools/clas-io/pom.xml @@ -18,7 +18,6 @@ org.jlab.coda xmsg - 2.3 diff --git a/pom.xml b/pom.xml index e1fee795a0..eefc2db896 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,10 @@ code.jlab.org-clara-java https://code.jlab.org/api/v4/projects/243/packages/maven + + clas12-xmsg-java + https://code.jlab.org/api/v4/projects/959/packages/maven + clasweb-clas12maven https://clasweb.jlab.org/.clas12maven @@ -139,7 +143,13 @@ org.jlab.coda jclara - 4.3 + 6.2 + + + + org.jlab.coda + xmsg + 2.5 From e37b15a262772fbabf1f77bb34f224ecfd794700 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 28 Sep 2026 17:23:54 -0400 Subject: [PATCH 02/16] build: drop conflict resolution for gson --- pom.xml | 21 +++++++-------------- reconstruction/alert/pom.xml | 2 +- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index eefc2db896..2291859d8a 100644 --- a/pom.xml +++ b/pom.xml @@ -131,7 +131,7 @@ org.jlab groot - 4.0.5 + 4.0.5 @@ -222,7 +222,7 @@ ai.djl bom - 0.38.0 + 0.38.0 pom import @@ -234,24 +234,17 @@ - see `docs/dependency_conflicts.md` for more info --> - + net.objecthunter exp4j 0.4.8 - - - com.google.code.gson - gson - 2.13.1 - - diff --git a/reconstruction/alert/pom.xml b/reconstruction/alert/pom.xml index c4baa62486..025d2aaa81 100644 --- a/reconstruction/alert/pom.xml +++ b/reconstruction/alert/pom.xml @@ -137,7 +137,7 @@ ${project.build.directory}/lib/services - ai.djl + ai.djl,com.google.code.gson From c01ad192e9136f81127da0a4bbe3c5ef239ef415 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 29 Sep 2026 10:12:00 -0400 Subject: [PATCH 03/16] build: consume ccdbrcdb --- pom.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2291859d8a..012584f979 100644 --- a/pom.xml +++ b/pom.xml @@ -24,13 +24,17 @@ https://code.jlab.org/api/v4/projects/919/packages/maven - code.jlab.org-clara-java + code.jlab.org-clara-java https://code.jlab.org/api/v4/projects/243/packages/maven clas12-xmsg-java https://code.jlab.org/api/v4/projects/959/packages/maven + + clas12-ccdbrcdb-java + https://code.jlab.org/api/v4/projects/245/packages/maven + clasweb-clas12maven https://clasweb.jlab.org/.clas12maven @@ -210,7 +214,7 @@ org.jlab.ccdbrcdb ccdbrcdb - 2.0 + 2.1 From 6f2018df28e0d838fe93c38d53f56c860bceff0e Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 29 Sep 2026 16:59:10 -0400 Subject: [PATCH 04/16] build: jevio 6.2.1 --- pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 012584f979..28d6363ebd 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,10 @@ clas12-ccdbrcdb-java https://code.jlab.org/api/v4/projects/245/packages/maven + + clas12-evio-java + https://code.jlab.org/api/v4/projects/1038/packages/maven + clasweb-clas12maven https://clasweb.jlab.org/.clas12maven @@ -160,7 +164,7 @@ org.jlab.coda jevio jar-with-dependencies - 6.2-SNAPSHOT + 6.2.1 net.jpountz.lz4 From 56b064174c4f5406d24cb0b78e7b50d4da8da2cb Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 29 Sep 2026 18:44:41 -0400 Subject: [PATCH 05/16] build: `et` 16.6.1 --- common-tools/clas-io/pom.xml | 1 - common-tools/coat-libs/pom.xml | 1 - pom.xml | 13 ++++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/common-tools/clas-io/pom.xml b/common-tools/clas-io/pom.xml index c470daab26..d51e553d66 100644 --- a/common-tools/clas-io/pom.xml +++ b/common-tools/clas-io/pom.xml @@ -44,7 +44,6 @@ org.jlab.coda et - 14.0 diff --git a/common-tools/coat-libs/pom.xml b/common-tools/coat-libs/pom.xml index e9a5384fed..84101a5cec 100644 --- a/common-tools/coat-libs/pom.xml +++ b/common-tools/coat-libs/pom.xml @@ -24,7 +24,6 @@ org.jlab.coda et - 14.0 diff --git a/pom.xml b/pom.xml index 28d6363ebd..41ca6215d7 100644 --- a/pom.xml +++ b/pom.xml @@ -36,9 +36,13 @@ https://code.jlab.org/api/v4/projects/245/packages/maven - clas12-evio-java + clas12-evio https://code.jlab.org/api/v4/projects/1038/packages/maven + + clas12-et + https://code.jlab.org/api/v4/projects/1044/packages/maven + clasweb-clas12maven https://clasweb.jlab.org/.clas12maven @@ -185,6 +189,12 @@ + + org.jlab.coda + et + 16.6.1 + + org.jlab.jnp jnp-hipo @@ -403,6 +413,7 @@ + com.google.protobuf:protobuf-java From e5e9bf6d54876e4be3178ecff0a6db30180d9adc Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Wed, 30 Sep 2026 15:56:08 -0400 Subject: [PATCH 06/16] build: move all dependency version in one place; remove unused ones from shade --- common-tools/clara-io/pom.xml | 3 +- .../calib/utils/DatabaseConstantProvider.java | 4 +-- common-tools/clas-jcsg/pom.xml | 1 - common-tools/clas-reco/pom.xml | 1 - common-tools/clas-utils/pom.xml | 1 - common-tools/coat-libs/pom.xml | 21 +---------- pom.xml | 36 +++++++++++++++---- reconstruction/cvt/pom.xml | 2 -- reconstruction/dc/pom.xml | 1 - .../org/jlab/service/ltcc/LTCCCluster.java | 1 - .../service/ltcc/LTCCClusterCorrection.java | 6 ++-- .../main/java/org/jlab/rec/rtpc/Geometry.java | 5 --- 12 files changed, 36 insertions(+), 46 deletions(-) diff --git a/common-tools/clara-io/pom.xml b/common-tools/clara-io/pom.xml index 6b3b0e59c0..1c3a50f9b6 100644 --- a/common-tools/clara-io/pom.xml +++ b/common-tools/clara-io/pom.xml @@ -52,12 +52,11 @@ org.jlab.clas clas-utils 14.2.1-SNAPSHOT - + org.apache.commons commons-text - 1.15.0 diff --git a/common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/DatabaseConstantProvider.java b/common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/DatabaseConstantProvider.java index 0505a2204a..a4b0d69c1f 100644 --- a/common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/DatabaseConstantProvider.java +++ b/common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/DatabaseConstantProvider.java @@ -12,7 +12,7 @@ import java.util.Vector; import java.util.logging.Level; import java.util.logging.Logger; -import org.jlab.ccdb.CCDB; +import org.jlab.ccdb.CcdbPackage; import javax.swing.JFrame; import org.jlab.ccdb.Assignment; @@ -144,7 +144,7 @@ private void initialize(String address){ // choose /tmp directory: FileSystemExecScan.scan(); - provider = CCDB.createProvider(address); + provider = CcdbPackage.createProvider(address); LOGGER.log(Level.INFO, String.format("[DB] ---> open %s | %s | %s | %s", runNumber, variation, databaseDate, address)); diff --git a/common-tools/clas-jcsg/pom.xml b/common-tools/clas-jcsg/pom.xml index 623abdfa82..03531bcc43 100644 --- a/common-tools/clas-jcsg/pom.xml +++ b/common-tools/clas-jcsg/pom.xml @@ -47,7 +47,6 @@ java3d vecmath - 1.3.1 org.slf4j diff --git a/common-tools/clas-reco/pom.xml b/common-tools/clas-reco/pom.xml index 9a84fdb676..634ce5d640 100644 --- a/common-tools/clas-reco/pom.xml +++ b/common-tools/clas-reco/pom.xml @@ -39,7 +39,6 @@ org.jlab.coda jtools - 2.2 diff --git a/common-tools/clas-utils/pom.xml b/common-tools/clas-utils/pom.xml index 4057106f8a..57208d53ee 100644 --- a/common-tools/clas-utils/pom.xml +++ b/common-tools/clas-utils/pom.xml @@ -17,7 +17,6 @@ org.apache.commons commons-text - 1.15.0 org.jlab.clas diff --git a/common-tools/coat-libs/pom.xml b/common-tools/coat-libs/pom.xml index 84101a5cec..b6255f662f 100644 --- a/common-tools/coat-libs/pom.xml +++ b/common-tools/coat-libs/pom.xml @@ -36,22 +36,9 @@ j4ml-clas12 - - org.jama - jamapack - 1.0 - - org.jlab.plugins trackfitter - 1.0 - - - - org.jlab.plugins - jMath - 1.0 @@ -149,12 +136,6 @@ jminuit - - de.erichseifert - vectorgraphics2d - 1.0 - - net.objecthunter exp4j @@ -163,7 +144,7 @@ - + src/main/resources diff --git a/pom.xml b/pom.xml index 41ca6215d7..92848bd4d5 100644 --- a/pom.xml +++ b/pom.xml @@ -122,6 +122,12 @@ linux + + java3d + vecmath + 1.3.1 + + org.slf4j slf4j-api @@ -140,6 +146,12 @@ 3.20.0 + + org.apache.commons + commons-text + 1.15.0 + + org.jlab groot @@ -195,6 +207,12 @@ 16.6.1 + + org.jlab.coda + jtools + 2.2 + + org.jlab.jnp jnp-hipo @@ -207,6 +225,18 @@ 4.5 + + org.jlab.ccdbrcdb + ccdbrcdb + 2.1 + + + + org.jlab.plugins + trackfitter + 1.0 + + j4ml j4ml-neuroph @@ -225,12 +255,6 @@ 0.9-SNAPSHOT - - org.jlab.ccdbrcdb - ccdbrcdb - 2.1 - - gov.nist.math jama diff --git a/reconstruction/cvt/pom.xml b/reconstruction/cvt/pom.xml index 9e84e203fd..1319e25e62 100644 --- a/reconstruction/cvt/pom.xml +++ b/reconstruction/cvt/pom.xml @@ -17,7 +17,6 @@ java3d vecmath - 1.3.1 org.jlab @@ -89,7 +88,6 @@ org.jlab.plugins trackfitter - 1.0 junit diff --git a/reconstruction/dc/pom.xml b/reconstruction/dc/pom.xml index 4e7f4562b3..92bdb67c88 100644 --- a/reconstruction/dc/pom.xml +++ b/reconstruction/dc/pom.xml @@ -100,7 +100,6 @@ org.jlab.plugins trackfitter - 1.0 org.jlab.clas diff --git a/reconstruction/ltcc/src/main/java/org/jlab/service/ltcc/LTCCCluster.java b/reconstruction/ltcc/src/main/java/org/jlab/service/ltcc/LTCCCluster.java index f6a91e0bf3..1ccc7d5534 100644 --- a/reconstruction/ltcc/src/main/java/org/jlab/service/ltcc/LTCCCluster.java +++ b/reconstruction/ltcc/src/main/java/org/jlab/service/ltcc/LTCCCluster.java @@ -7,7 +7,6 @@ import org.jlab.io.base.DataBank; import org.jlab.io.base.DataEvent; -//import org.jMath.Vector.threeVec; import java.util.List; import java.util.ArrayList; import org.jlab.geom.prim.Vector3D; diff --git a/reconstruction/ltcc/src/main/java/org/jlab/service/ltcc/LTCCClusterCorrection.java b/reconstruction/ltcc/src/main/java/org/jlab/service/ltcc/LTCCClusterCorrection.java index 086038d90d..59eebc1f8f 100644 --- a/reconstruction/ltcc/src/main/java/org/jlab/service/ltcc/LTCCClusterCorrection.java +++ b/reconstruction/ltcc/src/main/java/org/jlab/service/ltcc/LTCCClusterCorrection.java @@ -5,8 +5,6 @@ */ package org.jlab.service.ltcc; -//import org.jMath.Vector.threeVec; - import org.jlab.geom.prim.Vector3D; @@ -27,13 +25,13 @@ public class LTCCClusterCorrection { /* * static member function calcPosition * arguments: - - threeVec clusterPos: estimated cluster position from the + - Vector3D clusterPos: estimated cluster position from the reconstruction - double p: track momentum - int charge: track charge - double torus: torus field setting - double solenoid: solenoid field setting - * returns (threeVec): a vector with a more accurate cluster position + * returns (Vector3D): a vector with a more accurate cluster position */ public static Vector3D calcPosition(Vector3D clusterPos, double p, int charge, double torus, double solenoid) { diff --git a/reconstruction/rtpc/src/main/java/org/jlab/rec/rtpc/Geometry.java b/reconstruction/rtpc/src/main/java/org/jlab/rec/rtpc/Geometry.java index 9652c3b283..d3d43e8805 100644 --- a/reconstruction/rtpc/src/main/java/org/jlab/rec/rtpc/Geometry.java +++ b/reconstruction/rtpc/src/main/java/org/jlab/rec/rtpc/Geometry.java @@ -4,11 +4,6 @@ import java.io.FileNotFoundException; import java.io.PrintWriter; -/*import org.jMath.Vector.threeVec; - -import trackfitter.surface.Line; -import trackfitter.track.Helix;*/ - public class Geometry { public Geometry() { From 1fc147191251119049ac83b778dea6aa05a7a626 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Wed, 30 Sep 2026 18:30:25 -0400 Subject: [PATCH 07/16] build: remove `jtools` --- common-tools/clas-reco/pom.xml | 5 ----- .../java/org/jlab/clas/reco/Clas12Types.java | 17 +---------------- pom.xml | 6 ------ 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/common-tools/clas-reco/pom.xml b/common-tools/clas-reco/pom.xml index 634ce5d640..cd69073c41 100644 --- a/common-tools/clas-reco/pom.xml +++ b/common-tools/clas-reco/pom.xml @@ -36,11 +36,6 @@ jar-with-dependencies - - org.jlab.coda - jtools - - cnuphys magfield diff --git a/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/Clas12Types.java b/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/Clas12Types.java index 4daf8a9c13..656d9b9211 100644 --- a/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/Clas12Types.java +++ b/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/Clas12Types.java @@ -5,8 +5,6 @@ import org.jlab.clara.base.error.ClaraException; import org.jlab.clara.engine.ClaraSerializer; import org.jlab.clara.engine.EngineDataType; -import org.jlab.clas12.tools.MimeType; -import org.jlab.clas12.tools.property.JPropertyList; import org.jlab.jnp.hipo4.data.Event; @@ -30,22 +28,9 @@ public Object read(ByteBuffer buffer) throws ClaraException { } } - public static final EngineDataType EVIO = new EngineDataType(MimeType.EVIO.type(), EngineDataType.BYTES.serializer()); + public static final EngineDataType EVIO = new EngineDataType("binary/data-evio", EngineDataType.BYTES.serializer()); public static final EngineDataType HIPO = new EngineDataType("binary/data-hipo", new HipoSerializer()); - public static final EngineDataType PROPERTY_LIST = new EngineDataType(MimeType.PROPERTY_LIST.type(), new ClaraSerializer() { - - @Override - public ByteBuffer write(Object data) throws ClaraException { - JPropertyList pl = (JPropertyList) data; - return ByteBuffer.wrap(pl.getStringRepresentation(true).getBytes()); - } - - @Override - public Object read(ByteBuffer buffer) throws ClaraException { - return new JPropertyList(new String(buffer.array())); - } - }); } diff --git a/pom.xml b/pom.xml index 92848bd4d5..dfb7735a13 100644 --- a/pom.xml +++ b/pom.xml @@ -207,12 +207,6 @@ 16.6.1 - - org.jlab.coda - jtools - 2.2 - - org.jlab.jnp jnp-hipo From ceeccb5d891d454b902f692d004a89e4821f11c0 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 1 Oct 2026 18:43:15 -0400 Subject: [PATCH 08/16] fix: ccdb regression --- .../jlab/detector/calib/utils/DatabaseConstantProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/DatabaseConstantProvider.java b/common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/DatabaseConstantProvider.java index a4b0d69c1f..0505a2204a 100644 --- a/common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/DatabaseConstantProvider.java +++ b/common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/DatabaseConstantProvider.java @@ -12,7 +12,7 @@ import java.util.Vector; import java.util.logging.Level; import java.util.logging.Logger; -import org.jlab.ccdb.CcdbPackage; +import org.jlab.ccdb.CCDB; import javax.swing.JFrame; import org.jlab.ccdb.Assignment; @@ -144,7 +144,7 @@ private void initialize(String address){ // choose /tmp directory: FileSystemExecScan.scan(); - provider = CcdbPackage.createProvider(address); + provider = CCDB.createProvider(address); LOGGER.log(Level.INFO, String.format("[DB] ---> open %s | %s | %s | %s", runNumber, variation, databaseDate, address)); From f7950cc0d2bfe9eeb5f325e2af42d531bf775294 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 1 Oct 2026 19:23:12 -0400 Subject: [PATCH 09/16] build: dependency convergence for `protobuf` --- pom.xml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index dfb7735a13..ccd790458f 100644 --- a/pom.xml +++ b/pom.xml @@ -173,7 +173,7 @@ org.jlab.coda xmsg - 2.5 + 2.5 @@ -216,13 +216,13 @@ org.jlab.jnp jnp-hipo4 - 4.5 + 4.5 org.jlab.ccdbrcdb ccdbrcdb - 2.1 + 2.1 @@ -281,6 +281,16 @@ 0.4.8 + + + com.google.protobuf + protobuf-java + 4.31.1 + + @@ -428,13 +438,7 @@ - - - - - com.google.protobuf:protobuf-java - - + From f620c5031f80276443a2255e85d96e379123ede8 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 2 Oct 2026 16:42:53 -0400 Subject: [PATCH 10/16] build: groot 5 --- common-tools/coat-libs/pom.xml | 1 + pom.xml | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/common-tools/coat-libs/pom.xml b/common-tools/coat-libs/pom.xml index b6255f662f..0d2ae95d39 100644 --- a/common-tools/coat-libs/pom.xml +++ b/common-tools/coat-libs/pom.xml @@ -136,6 +136,7 @@ jminuit + net.objecthunter exp4j diff --git a/pom.xml b/pom.xml index ccd790458f..106fefb0cf 100644 --- a/pom.xml +++ b/pom.xml @@ -43,6 +43,10 @@ clas12-et https://code.jlab.org/api/v4/projects/1044/packages/maven + + clas12-groot + https://code.jlab.org/api/v4/projects/388/packages/maven + clasweb-clas12maven https://clasweb.jlab.org/.clas12maven @@ -155,7 +159,7 @@ org.jlab groot - 4.0.5 + 5.0.0 @@ -271,9 +275,9 @@ --> net.objecthunter From aa818d7b42c053cafd4db0a9ef5655e54588fb26 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 2 Oct 2026 19:32:19 -0400 Subject: [PATCH 11/16] build: remove `jminuit` and `exp4j` from shade --- common-tools/coat-libs/pom.xml | 11 ----------- pom.xml | 5 +++-- reconstruction/rich/pom.xml | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/common-tools/coat-libs/pom.xml b/common-tools/coat-libs/pom.xml index 0d2ae95d39..e23adbb87b 100644 --- a/common-tools/coat-libs/pom.xml +++ b/common-tools/coat-libs/pom.xml @@ -131,17 +131,6 @@ 14.2.1-SNAPSHOT - - org.freehep - jminuit - - - - - net.objecthunter - exp4j - - diff --git a/pom.xml b/pom.xml index 106fefb0cf..97dcbca33f 100644 --- a/pom.xml +++ b/pom.xml @@ -164,8 +164,9 @@ org.freehep - jminuit - 1.0 + freehep-jminuit + 1.0.2 + diff --git a/reconstruction/rich/pom.xml b/reconstruction/rich/pom.xml index ec70fcfb6e..99b0df7413 100644 --- a/reconstruction/rich/pom.xml +++ b/reconstruction/rich/pom.xml @@ -16,7 +16,7 @@ org.freehep - jminuit + freehep-jminuit org.jlab.clas From 254988c44515a41489db0f272d2d731b0c0e605d Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 5 Oct 2026 10:32:50 -0400 Subject: [PATCH 12/16] refacor: replace `trackfitter`'s `LineFitter` and `LineFitPars` with DC's --- .../tracking/utilities/ProbChi2perNDF.java | 23 +++++++++++ common-tools/coat-libs/pom.xml | 5 --- pom.xml | 6 --- reconstruction/cvt/pom.xml | 4 -- .../org/jlab/rec/cvt/fit/CosmicFitter.java | 2 +- .../org/jlab/rec/cvt/fit/LineFitPars.java | 2 +- .../java/org/jlab/rec/cvt/track/Track.java | 3 +- reconstruction/dc/pom.xml | 4 -- .../org/jlab/rec/dc/banks/RecoBankWriter.java | 2 +- .../jlab/rec/dc/cross/CrossListFinder.java | 2 +- .../rec/dc/track/TrackCandListFinder.java | 4 +- .../rec/dc/track/fit/basefit/LineFitPars.java | 2 +- .../rec/dc/track/fit/basefit/LineFitter.java | 39 ++++++++++++------- .../rec/dc/trajectory/TrajectoryFinder.java | 2 +- 14 files changed, 56 insertions(+), 44 deletions(-) create mode 100644 common-tools/clas-tracking/src/main/java/org/jlab/clas/tracking/utilities/ProbChi2perNDF.java diff --git a/common-tools/clas-tracking/src/main/java/org/jlab/clas/tracking/utilities/ProbChi2perNDF.java b/common-tools/clas-tracking/src/main/java/org/jlab/clas/tracking/utilities/ProbChi2perNDF.java new file mode 100644 index 0000000000..0a67deb03a --- /dev/null +++ b/common-tools/clas-tracking/src/main/java/org/jlab/clas/tracking/utilities/ProbChi2perNDF.java @@ -0,0 +1,23 @@ +package org.jlab.clas.tracking.utilities; + +import org.apache.commons.math3.special.Gamma; + +/** Chi-square probability utilities */ +public class ProbChi2perNDF { + + /** + * Returns the upper-tail probability (survival function, or p-value) of the + * chi-square distribution: P(X >= chi2) for X ~ χ²(ndf). + * @param chi2 the chi-square statistic + * @param ndf the number of degrees of freedom + * @return the probability of observing a chi-square value at least as large as {@code chi2}, in the range [0, 1] + */ + public static double prob(double chi2, int ndf) { + if(ndf <= 0) + return 0.0; + if(chi2 <= 0.0) { // edge cases follow ROOT's `TMath::Prob` conventions + return chi2 < 0.0 ? 0.0 : 1.0; + } + return Gamma.regularizedGammaQ(0.5 * ndf, 0.5 * chi2); + } +} diff --git a/common-tools/coat-libs/pom.xml b/common-tools/coat-libs/pom.xml index e23adbb87b..098bce4112 100644 --- a/common-tools/coat-libs/pom.xml +++ b/common-tools/coat-libs/pom.xml @@ -36,11 +36,6 @@ j4ml-clas12 - - org.jlab.plugins - trackfitter - - org.jlab.clas clas-io diff --git a/pom.xml b/pom.xml index 97dcbca33f..22cb42fdc4 100644 --- a/pom.xml +++ b/pom.xml @@ -230,12 +230,6 @@ 2.1 - - org.jlab.plugins - trackfitter - 1.0 - - j4ml j4ml-neuroph diff --git a/reconstruction/cvt/pom.xml b/reconstruction/cvt/pom.xml index 1319e25e62..4f49cd1f7e 100644 --- a/reconstruction/cvt/pom.xml +++ b/reconstruction/cvt/pom.xml @@ -85,10 +85,6 @@ test jar - - org.jlab.plugins - trackfitter - junit junit diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/fit/CosmicFitter.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/fit/CosmicFitter.java index e8032d2aa4..7c15982be8 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/fit/CosmicFitter.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/fit/CosmicFitter.java @@ -6,7 +6,7 @@ import org.jlab.geom.prim.Point3D; import org.jlab.geom.prim.Vector3D; import org.jlab.rec.cvt.trajectory.Ray; -import trackfitter.fitter.utilities.ProbChi2perNDF; +import org.jlab.clas.tracking.utilities.ProbChi2perNDF; /** * A fitter which does sequential fit (for x, y coordinates) and then (for r, z diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/fit/LineFitPars.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/fit/LineFitPars.java index 78aa9c5f56..200e95154d 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/fit/LineFitPars.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/fit/LineFitPars.java @@ -1,7 +1,7 @@ package org.jlab.rec.cvt.fit; import org.jlab.rec.cvt.trajectory.Ray; -import trackfitter.fitter.utilities.ProbChi2perNDF; +import org.jlab.clas.tracking.utilities.ProbChi2perNDF; /** * The fit parameters of a line fit returned by LineFitter diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/Track.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/Track.java index eea7abe5e6..12fa0704ab 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/Track.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/Track.java @@ -3,7 +3,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -24,7 +23,7 @@ import org.jlab.rec.cvt.trajectory.Helix; import org.jlab.rec.cvt.trajectory.StateVec; import org.jlab.rec.cvt.trajectory.Trajectory; -import trackfitter.fitter.utilities.ProbChi2perNDF; +import org.jlab.clas.tracking.utilities.ProbChi2perNDF; /** * A class representing track candidates in the CVT. A track has a trajectory diff --git a/reconstruction/dc/pom.xml b/reconstruction/dc/pom.xml index 92bdb67c88..60aa46f6ac 100644 --- a/reconstruction/dc/pom.xml +++ b/reconstruction/dc/pom.xml @@ -97,10 +97,6 @@ snr 14.2.1-SNAPSHOT - - org.jlab.plugins - trackfitter - org.jlab.clas swim-tools diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java index d018dd3c8d..9029c777eb 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java @@ -13,7 +13,7 @@ import org.jlab.rec.dc.segment.Segment; import org.jlab.rec.dc.track.Track; -import trackfitter.fitter.utilities.*; +import org.jlab.clas.tracking.utilities.ProbChi2perNDF; /** * A class to fill the reconstructed DC banks diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/cross/CrossListFinder.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/cross/CrossListFinder.java index 5399b2dadb..968139284b 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/cross/CrossListFinder.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/cross/CrossListFinder.java @@ -15,7 +15,7 @@ import org.jlab.rec.dc.segment.Segment; import org.jlab.rec.dc.timetodistance.TimeToDistanceEstimator; import org.jlab.utils.groups.IndexedTable; -import trackfitter.fitter.LineFitter; +import org.jlab.rec.dc.track.fit.basefit.LineFitter; /** * A class with methods used to find lists of crosses. This is the Pattern Recognition step used in track seeding, to diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java index b643cfccc7..ac296a27f1 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java @@ -24,8 +24,8 @@ import org.jlab.rec.dc.trajectory.Trajectory; import org.jlab.rec.dc.trajectory.TrajectoryFinder; -import trackfitter.fitter.LineFitPars; -import trackfitter.fitter.LineFitter; +import org.jlab.rec.dc.track.fit.basefit.LineFitter; +import org.jlab.rec.dc.track.fit.basefit.LineFitPars; import org.jlab.clas.tracking.kalmanfilter.Surface; import org.jlab.clas.tracking.kalmanfilter.zReference.KFitter; diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/fit/basefit/LineFitPars.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/fit/basefit/LineFitPars.java index 46d078eb01..d6414be29d 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/fit/basefit/LineFitPars.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/fit/basefit/LineFitPars.java @@ -1,6 +1,6 @@ package org.jlab.rec.dc.track.fit.basefit; -import trackfitter.fitter.utilities.ProbChi2perNDF; +import org.jlab.clas.tracking.utilities.ProbChi2perNDF; /** * The fit parameters of a line fit returned by LineFitter diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/fit/basefit/LineFitter.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/fit/basefit/LineFitter.java index 443db3eb7d..28f3aa6c40 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/fit/basefit/LineFitter.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/fit/basefit/LineFitter.java @@ -1,6 +1,5 @@ package org.jlab.rec.dc.track.fit.basefit; -import java.util.ArrayList; import java.util.List; /** A least square fitting method @@ -15,9 +14,9 @@ public class LineFitter { // the constructor public LineFitter() { } - private final List w = new ArrayList(); + // fit status - public boolean fitStatus(List x, List y, List sigma_x, List sigma_y, int nbpoints) { + public boolean fitStatus(double[] x, double[] y, double[] sigma_x, double[] sigma_y, int nbpoints) { boolean fitStat = false; if (nbpoints>=2) { // must have enough points to do the fit @@ -25,22 +24,21 @@ public boolean fitStatus(List x, List y, List sigma_x, L // initialize weight-sum and moments double Sw, Sx, Sy, Sxx, Sxy; Sw = Sx = Sy = Sxx = Sxy =0.; + double[] w = new double[nbpoints]; - w.clear(); - ((ArrayList) w).ensureCapacity(nbpoints); for (int i = 0; i0 @@ -61,8 +59,8 @@ public boolean fitStatus(List x, List y, List sigma_x, L double chi_2 = 0.; double pointchi_2[] = new double[nbpoints]; //individual chi2 for each fitted point for (int j = 0; j x, List y, List sigma_x, L // if there is a fit return true return fitStat; } + + // fit status (overload) + public boolean fitStatus(List x, List y, List sigma_x, List sigma_y, int nbpoints) { + return fitStatus( + x.stream().mapToDouble(Double::doubleValue).toArray(), + y.stream().mapToDouble(Double::doubleValue).toArray(), + sigma_x.stream().mapToDouble(Double::doubleValue).toArray(), + sigma_y.stream().mapToDouble(Double::doubleValue).toArray(), + nbpoints); + } + // return the fit result public LineFitPars getFit() { return _linefitresult; diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/trajectory/TrajectoryFinder.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/trajectory/TrajectoryFinder.java index 9fa71474d4..320d87e5c1 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/trajectory/TrajectoryFinder.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/trajectory/TrajectoryFinder.java @@ -7,7 +7,7 @@ import org.jlab.geom.prim.Vector3D; import org.jlab.rec.dc.Constants; import org.jlab.rec.dc.cross.Cross; -import trackfitter.fitter.LineFitter; +import org.jlab.rec.dc.track.fit.basefit.LineFitter; import Jama.Matrix; /** From 619f8bc4871179304d7907a0d5f124e43c330ab1 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 5 Oct 2026 17:08:13 -0400 Subject: [PATCH 13/16] build: hold back `et` and `jevio` bumps for now --- pom.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 22cb42fdc4..74eac40c6c 100644 --- a/pom.xml +++ b/pom.xml @@ -35,14 +35,14 @@ clas12-ccdbrcdb-java https://code.jlab.org/api/v4/projects/245/packages/maven - - clas12-evio - https://code.jlab.org/api/v4/projects/1038/packages/maven - - - clas12-et - https://code.jlab.org/api/v4/projects/1044/packages/maven - + + + + + + + + clas12-groot https://code.jlab.org/api/v4/projects/388/packages/maven @@ -185,7 +185,7 @@ org.jlab.coda jevio jar-with-dependencies - 6.2.1 + 6.2-SNAPSHOT net.jpountz.lz4 @@ -209,7 +209,7 @@ org.jlab.coda et - 16.6.1 + 14.0 From 345c71153e06562a3e95ade70dcd05bde31cd15d Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 5 Oct 2026 18:24:18 -0400 Subject: [PATCH 14/16] build: use jminuit from SLAC --- pom.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 74eac40c6c..c5deca0de3 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,10 @@ clas12-groot https://code.jlab.org/api/v4/projects/388/packages/maven + + freehep-repo-public + https://srs.slac.stanford.edu/nexus/content/groups/freehep-maven2-public/ + clasweb-clas12maven https://clasweb.jlab.org/.clas12maven @@ -166,7 +170,6 @@ org.freehep freehep-jminuit 1.0.2 - From c4ae539a67688a631e53268b98b9863297e851fe Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 6 Oct 2026 11:18:39 -0400 Subject: [PATCH 15/16] build: exclude ccdbrcdb's protobuf --- pom.xml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index c5deca0de3..abdf9cf81d 100644 --- a/pom.xml +++ b/pom.xml @@ -181,7 +181,7 @@ org.jlab.coda xmsg - 2.5 + 2.5 @@ -230,7 +230,18 @@ org.jlab.ccdbrcdb ccdbrcdb - 2.1 + 2.1 + + + + com.google.protobuf + protobuf-java + + @@ -267,7 +278,7 @@ @@ -283,16 +294,6 @@ 0.4.8 - - - com.google.protobuf - protobuf-java - 4.31.1 - - From 12bf6dcdae635b4902739b95e148ed298d15e53a Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 6 Oct 2026 14:56:58 -0400 Subject: [PATCH 16/16] build: better repo names --- pom.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index abdf9cf81d..7ac4c897ac 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ - code.jlab.org-hipo-java + code.jlab.org-hipo-java https://code.jlab.org/api/v4/projects/919/packages/maven @@ -28,28 +28,28 @@ https://code.jlab.org/api/v4/projects/243/packages/maven - clas12-xmsg-java + code.jlab.org-xmsg-java https://code.jlab.org/api/v4/projects/959/packages/maven - clas12-ccdbrcdb-java + code.jlab.org-ccdbrcdb-java https://code.jlab.org/api/v4/projects/245/packages/maven - + - + - clas12-groot + code.jlab.org-groot https://code.jlab.org/api/v4/projects/388/packages/maven - freehep-repo-public - https://srs.slac.stanford.edu/nexus/content/groups/freehep-maven2-public/ + freehep-SLAC + https://srs.slac.stanford.edu/nexus/content/groups/freehep-maven2-public clasweb-clas12maven