Skip to content

Commit eb3bcb1

Browse files
committed
generalize
1 parent 70ed202 commit eb3bcb1

File tree

3 files changed

+39
-27
lines changed

3 files changed

+39
-27
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package org.jlab.clas.swimtools;
2+
3+
import org.jlab.geom.prim.Point3D;
4+
import org.jlab.geom.prim.Vector3D;
5+
6+
/**
7+
*
8+
* @author baltzell
9+
*/
10+
public abstract class ASwim extends SwimPars implements ISwim {
11+
12+
@Override
13+
public double[] SwimToPlaneTiltSecSys(int sector, double z_cm) {
14+
throw new UnsupportedOperationException("Not supported yet.");
15+
}
16+
17+
@Override
18+
public double[] SwimToPlaneTiltSecSysBdlXZPlane(int sector, double z_cm) {
19+
throw new UnsupportedOperationException("Not supported yet.");
20+
}
21+
22+
@Override
23+
public double[] SwimToPlaneLab(double z_cm) {
24+
return SwimPlane(new Vector3D(0,0,1), new Point3D(0,0,z_cm), accuracy);
25+
}
26+
27+
@Override
28+
public double[] SwimToCylinder(double radius) {
29+
return SwimGenCylinder(new Point3D(0,0,-1), new Point3D(0,0,1), radius, accuracy);
30+
}
31+
32+
@Override
33+
public double[] SwimToZ(double Z, int dir) {
34+
return SwimPlane(new Vector3D(0,0,dir*1), new Point3D(0,0,Z), accuracy);
35+
}
36+
37+
}

common-tools/swim-tools/src/main/java/org/jlab/clas/swimtools/AdaptiveSwim.java

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,7 @@
1414

1515
import cnuphys.swim.SwimTrajectory;
1616

17-
public class AdaptiveSwim extends SwimPars implements ISwim {
18-
19-
@Override
20-
public double[] SwimToPlaneTiltSecSys(int sector, double z_cm) {
21-
throw new UnsupportedOperationException("Not supported yet.");
22-
}
23-
24-
@Override
25-
public double[] SwimToPlaneTiltSecSysBdlXZPlane(int sector, double z_cm) {
26-
throw new UnsupportedOperationException("Not supported yet.");
27-
}
28-
29-
@Override
30-
public double[] SwimToPlaneLab(double z_cm) {
31-
return SwimPlane(new Vector3D(0,0,1), new Point3D(0,0,z_cm), accuracy);
32-
}
33-
34-
@Override
35-
public double[] SwimToCylinder(double radius) {
36-
return SwimGenCylinder(new Point3D(0,0,-1), new Point3D(0,0,1), radius, accuracy);
37-
}
17+
public class AdaptiveSwim extends ASwim {
3818

3919
@Override
4020
public double[] SwimRho(double radius, double accuracy) {
@@ -166,11 +146,6 @@ public double[] SwimToLine(Line3D l) {
166146
throw new UnsupportedOperationException("Not supported yet.");
167147
}
168148

169-
@Override
170-
public double[] SwimToZ(double Z, int dir) {
171-
return SwimPlane(new Vector3D(0,0,dir*1), new Point3D(0,0,Z), accuracy);
172-
}
173-
174149
@Override
175150
public double[] SwimToDCA(SwimTrajectory trk2) {
176151
throw new UnsupportedOperationException("Not supported yet.");

common-tools/swim-tools/src/main/java/org/jlab/clas/swimtools/Swim.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
* @author ziegler
2929
*/
30-
public class Swim extends SwimPars implements ISwim {
30+
public class Swim extends ASwim {
3131

3232
private SwimTrajectory swimTraj;
3333

0 commit comments

Comments
 (0)