Skip to content
Open
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
6 changes: 0 additions & 6 deletions common-tools/clas-reco/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
<artifactId>json</artifactId>
</dependency>

<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<classifier>linux</classifier>
</dependency>

<dependency>
<groupId>org.jlab.coda</groupId>
<artifactId>jclara</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jlab.clas.detector.matching;

import java.util.List;
import javafx.util.Pair;
import java.util.AbstractMap.SimpleImmutableEntry;
import org.jlab.clas.detector.DetectorParticle;
import org.jlab.clas.detector.DetectorResponse;
import org.jlab.detector.base.DetectorType;
Expand Down Expand Up @@ -123,8 +123,8 @@ public final int bestMatch(DetectorParticle p, List<DetectorResponse> r, Detecto
* @return
*/
@Override
public int compare(Pair<DetectorParticle,DetectorResponse> a,
Pair<DetectorParticle,DetectorResponse> b) {
public int compare(SimpleImmutableEntry<DetectorParticle,DetectorResponse> a,
SimpleImmutableEntry<DetectorParticle,DetectorResponse> b) {
if (this.quality(a.getKey(),a.getValue()) <
this.quality(b.getKey(),b.getValue())) {
return 1;
Expand All @@ -138,9 +138,9 @@ public int compare(Pair<DetectorParticle,DetectorResponse> a,

/*
public DetectorResponse findMatch2(DetectorParticle p, List<DetectorResponse> r) {
List<Pair<DetectorParticle,DetectorResponse>> l = new ArrayList<>();
List<SimpleImmutableEntry<DetectorParticle,DetectorResponse>> l = new ArrayList<>();
for (DetectorResponse r1 : r) {
l.add(new Pair<>(p,r1));
l.add(new SimpleImmutableEntry<>(p,r1));
}
Collections.sort(l, this);
return l.get(0).getValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Comparator;
import java.util.List;
import javafx.util.Pair;
import java.util.AbstractMap.SimpleImmutableEntry;
import org.jlab.clas.detector.DetectorParticle;
import org.jlab.clas.detector.DetectorResponse;
import org.jlab.detector.base.DetectorType;
Expand All @@ -11,7 +11,7 @@
*
* @author baltzell
*/
public interface IMatch extends Comparator<Pair<DetectorParticle,DetectorResponse>> {
public interface IMatch extends Comparator<SimpleImmutableEntry<DetectorParticle,DetectorResponse>> {

public abstract boolean matches(DetectorParticle p, DetectorResponse r);

Expand Down
5 changes: 0 additions & 5 deletions reconstruction/ltcc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
</parent>

<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.function.Function;
import java.util.List;
import java.util.stream.Collectors;
import javafx.util.Pair;
import java.util.AbstractMap.SimpleImmutableEntry;
import org.jlab.groot.data.H1F;
import org.jlab.groot.data.H2F;

Expand Down Expand Up @@ -38,7 +38,7 @@ private FillArg getData(DataType data) {
}

private final Map<String, SmartHisto<H1F, Double>> histos1D;
private final Map<String, SmartHisto<H2F, Pair<Double, Double>>> histos2D;
private final Map<String, SmartHisto<H2F, SimpleImmutableEntry<Double, Double>>> histos2D;

LTCCHistogrammer() {
histos1D = new LinkedHashMap();
Expand All @@ -48,7 +48,7 @@ private FillArg getData(DataType data) {
public void add(H1F histo, Function<DataType, Double> getter) {
histos1D.put(histo.getName(), new SmartHisto(histo, getter));
}
public void add(H2F histo, Function<DataType, Pair<Double, Double>> getter) {
public void add(H2F histo, Function<DataType, SimpleImmutableEntry<Double, Double>> getter) {
histos2D.put(histo.getName(), new SmartHisto(histo, getter));
}

Expand All @@ -58,7 +58,7 @@ public void fill(DataType data) {
public void fill(DataType data, double weight) {
histos1D.forEach((k, v) -> v.getHisto().fill(v.getData(data), weight));
histos2D.forEach((k, v) -> {
Pair<Double, Double> args = v.getData(data);
SimpleImmutableEntry<Double, Double> args = v.getData(data);
v.getHisto().fill(args.getKey(), args.getValue(), weight);
});
}
Expand Down
Loading