Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions common-tools/clara-io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@
<groupId>org.jlab.clas</groupId>
<artifactId>clas-utils</artifactId>
<version>14.2.1-SNAPSHOT</version>
</dependency>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.15.0</version>
</dependency>

</dependencies>
Expand Down
2 changes: 0 additions & 2 deletions common-tools/clas-io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<dependency>
<groupId>org.jlab.coda</groupId>
<artifactId>xmsg</artifactId>
<version>2.3</version>
</dependency>

<dependency>
Expand All @@ -45,7 +44,6 @@
<dependency>
<groupId>org.jlab.coda</groupId>
<artifactId>et</artifactId>
<version>14.0</version>
</dependency>

<dependency>
Expand Down
1 change: 0 additions & 1 deletion common-tools/clas-jcsg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<dependency>
<groupId>java3d</groupId>
<artifactId>vecmath</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
6 changes: 0 additions & 6 deletions common-tools/clas-reco/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@
<classifier>jar-with-dependencies</classifier>
</dependency>

<dependency>
<groupId>org.jlab.coda</groupId>
<artifactId>jtools</artifactId>
<version>2.2</version>
</dependency>

<dependency>
<groupId>cnuphys</groupId>
<artifactId>magfield</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand All @@ -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()));
}
});
}
Original file line number Diff line number Diff line change
@@ -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 &gt;= chi2) for X ~ &chi;&sup2;(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);
}
}
1 change: 0 additions & 1 deletion common-tools/clas-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.15.0</version>
</dependency>
<dependency>
<groupId>org.jlab.clas</groupId>
Expand Down
37 changes: 1 addition & 36 deletions common-tools/coat-libs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<dependency>
<groupId>org.jlab.coda</groupId>
<artifactId>et</artifactId>
<version>14.0</version>
</dependency>

<dependency>
Expand All @@ -37,24 +36,6 @@
<artifactId>j4ml-clas12</artifactId>
</dependency>

<dependency>
<groupId>org.jama</groupId>
<artifactId>jamapack</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>org.jlab.plugins</groupId>
<artifactId>trackfitter</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>org.jlab.plugins</groupId>
<artifactId>jMath</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-io</artifactId>
Expand Down Expand Up @@ -145,26 +126,10 @@
<version>14.2.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.freehep</groupId>
<artifactId>jminuit</artifactId>
</dependency>

<dependency>
<groupId>de.erichseifert</groupId>
<artifactId>vectorgraphics2d</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>net.objecthunter</groupId>
<artifactId>exp4j</artifactId>
</dependency>

</dependencies>

<build>

<resources>
<resource>
<directory>src/main/resources</directory>
Expand Down
115 changes: 81 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,37 @@

<repositories>
<repository>
<id>code.jlab.org-hipo-java</id> <!-- `jnp-hipo4` is now built and published from its own repository, https://code.jlab.org/hallb/clas12/hipo-java. Project 919's package registry is public -->
<id>code.jlab.org-hipo-java</id> <!-- `jnp-hipo4` -->
<url>https://code.jlab.org/api/v4/projects/919/packages/maven</url>
</repository>
<repository>
<id>code.jlab.org-clara-java</id>
<id>code.jlab.org-clara-java</id> <!-- `jclara` -->
<url>https://code.jlab.org/api/v4/projects/243/packages/maven</url>
</repository>
<repository>
<id>code.jlab.org-xmsg-java</id>
<url>https://code.jlab.org/api/v4/projects/959/packages/maven</url>
</repository>
<repository>
<id>code.jlab.org-ccdbrcdb-java</id>
<url>https://code.jlab.org/api/v4/projects/245/packages/maven</url>
</repository>
<!-- <repository> -->
<!-- <id>code.jlab.org-evio</id> --> <!-- `jevio` -->
<!-- <url>https://code.jlab.org/api/v4/projects/1038/packages/maven</url> -->
<!-- </repository> -->
<!-- <repository> -->
<!-- <id>code.jlab.org-et</id> --> <!-- `et` -->
<!-- <url>https://code.jlab.org/api/v4/projects/1044/packages/maven</url> -->
<!-- </repository> -->
<repository>
<id>code.jlab.org-groot</id>
<url>https://code.jlab.org/api/v4/projects/388/packages/maven</url>
</repository>
<repository>
<id>freehep-SLAC</id>
<url>https://srs.slac.stanford.edu/nexus/content/groups/freehep-maven2-public</url>
</repository>
<repository>
<id>clasweb-clas12maven</id>
<url>https://clasweb.jlab.org/.clas12maven</url>
Expand Down Expand Up @@ -106,6 +130,12 @@
<classifier>linux</classifier>
</dependency>

<dependency>
<groupId>java3d</groupId>
<artifactId>vecmath</artifactId>
<version>1.3.1</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand All @@ -124,29 +154,41 @@
<version>3.20.0</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.15.0</version>
</dependency>

<dependency>
<groupId>org.jlab</groupId>
<artifactId>groot</artifactId>
<version>4.0.5</version>
<version>5.0.0</version> <!-- WARNING: if changed, check the `net.objecthunter:exp4j` version; see `docs/dependency_conflicts.md` -->
</dependency>

<dependency>
<groupId>org.freehep</groupId>
<artifactId>jminuit</artifactId>
<version>1.0</version>
<artifactId>freehep-jminuit</artifactId>
<version>1.0.2</version>
</dependency>

<dependency>
<groupId>org.jlab.coda</groupId>
<artifactId>jclara</artifactId>
<version>4.3</version>
<version>6.2</version>
</dependency>

<dependency>
<groupId>org.jlab.coda</groupId>
<artifactId>xmsg</artifactId>
<version>2.5</version>
</dependency>

<dependency>
<groupId>org.jlab.coda</groupId>
<artifactId>jevio</artifactId>
<classifier>jar-with-dependencies</classifier>
<version>6.2-SNAPSHOT</version>
<version>6.2-SNAPSHOT</version> <!-- FIXME: bump to code.jlab.org version 6.2.1 ? -->
<exclusions>
<exclusion>
<groupId>net.jpountz.lz4</groupId>
Expand All @@ -167,6 +209,12 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.jlab.coda</groupId>
<artifactId>et</artifactId>
<version>14.0</version> <!-- FIXME: bump to code.jlab.org version 16.6.1 ? -->
</dependency>

<dependency>
<groupId>org.jlab.jnp</groupId>
<artifactId>jnp-hipo</artifactId>
Expand All @@ -176,7 +224,24 @@
<dependency>
<groupId>org.jlab.jnp</groupId>
<artifactId>jnp-hipo4</artifactId>
<version>4.5</version> <!-- from code.jlab.org/hallb/clas12/hipo-java; WARNING: if changed, check the `net.objecthunter:exp4j` version; see `docs/dependency_conflicts.md` -->
<version>4.5</version> <!-- WARNING: if changed, check the `net.objecthunter:exp4j` version; see `docs/dependency_conflicts.md` -->
</dependency>

<dependency>
<groupId>org.jlab.ccdbrcdb</groupId>
<artifactId>ccdbrcdb</artifactId>
<version>2.1</version>
<exclusions>
<exclusion>
<!--
protobuf is transitive via `mysql-connector-j` and is only needed for
the X DevAPI (MySQL X Protocol); it also conflicts with the version
used by `xmsg`, so we exclude it here
-->
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand All @@ -197,12 +262,6 @@
<version>0.9-SNAPSHOT</version> <!-- WARNING: if changed, check the `org.ejml:ejml-simple` version; see `docs/dependency_conflicts.md` -->
</dependency>

<dependency>
<groupId>org.jlab.ccdbrcdb</groupId>
<artifactId>ccdbrcdb</artifactId>
<version>2.0</version>
</dependency>

<dependency>
<groupId>gov.nist.math</groupId>
<artifactId>jama</artifactId>
Expand All @@ -212,36 +271,29 @@
<dependency> <!-- sets version number for all 'ai.djl' dependencies -->
<groupId>ai.djl</groupId>
<artifactId>bom</artifactId>
<version>0.38.0</version> <!-- WARNING: if changed, check the `com.google.code.gson:gson` version; see `docs/dependency_conflicts.md` -->
<version>0.38.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<!-- BEGIN DEPENDENCY CONFLICT RESOLUTION -->
<!--
the following dependency versions are specified to resolve dependency tree conflicts
the following dependency versions are pinned to resolve dependency tree conflicts
- see also exclusions in `maven-enforcer-plugin`
- see `docs/dependency_conflicts.md` for more info
-->

<!-- resolve conflict between `org.jlab.jnp:jnp-hipo:jar:2.0-SNAPSHOT` and `org.jlab.jnp:jnp-hipo4:jar:4.5`
by choosing the later version of their `net.objecthunter:exp4j` dependency -->
<!-- resolve conflicting `net.objecthunter:exp4j` by choosing the latest used by
- `org.jlab.jnp:jnp-hipo` uses version 0.4.4
- `org.jlab.jnp:jnp-hipo4` uses version 0.4.8
- `org.jlab:groot` uses version 0.4.8
-->
<dependency>
<groupId>net.objecthunter</groupId>
<artifactId>exp4j</artifactId>
<version>0.4.8</version> <!-- WARNING: if changed, see `docs/dependency_conflicts.md` -->
</dependency>

<!-- resolve conflict between `org.jlab.coda:jclara` and `ai.djl:api`
by choosing the later version of their `com.google.code.gson:gson` dependency
- `djl`'s `gson` version is here: https://github.com/deepjavalibrary/djl/blob/master/gradle/libs.versions.toml
-->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.13.1</version> <!-- WARNING: if changed, see `docs/dependency_conflicts.md` -->
</dependency>

<!-- resolve conflict between `j4ml:j4ml-clas12` and `clas-tracking`
by using the version of `org.ejml:ejml-simple` used by `j4ml:j4ml-clas12:jar:0.9-SNAPSHOT` -->
<dependency>
Expand Down Expand Up @@ -389,12 +441,7 @@
</goals>
<configuration>
<rules>
<dependencyConvergence>
<excludes>
<!-- excluding conflicts that may be tricky to resolve -->
<exclude>com.google.protobuf:protobuf-java</exclude> <!-- `org.jlab.ccdbrcdb:ccdbrcdb` use v3, but `org.jlab.coda.xmsg` uses v2 -->
</excludes>
</dependencyConvergence>
<dependencyConvergence/>
</rules>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion reconstruction/alert/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib/services</outputDirectory>
<includeGroupIds>ai.djl</includeGroupIds>
<includeGroupIds>ai.djl,com.google.code.gson</includeGroupIds>
</configuration>
</execution>
</executions>
Expand Down
Loading
Loading