Skip to content

Commit e8c3822

Browse files
committed
cleanup unused variables, if+if->if+else
1 parent cc74fda commit e8c3822

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

  • reconstruction/cvt/src/main/java/org/jlab/rec/cvt/cluster

reconstruction/cvt/src/main/java/org/jlab/rec/cvt/cluster/Cluster.java

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.jlab.detector.base.DetectorType;
1313
import org.jlab.geom.prim.Arc3D;
1414
import org.jlab.geom.prim.Cylindrical3D;
15-
import org.jlab.geom.prim.Plane3D;
1615
import org.jlab.geom.prim.Transformation3D;
1716
import org.jlab.rec.cvt.Geometry;
1817
import org.jlab.rec.cvt.bmt.BMTType;
@@ -725,12 +724,12 @@ public Surface measurement() {
725724
Surface surface = null;
726725

727726
if(this.getDetector()==DetectorType.BST) {
728-
Point3D endPt1 = this.getLine().origin();
729-
Point3D endPt2 = this.getLine().end();
727+
//Point3D endPt1 = this.getLine().origin();
728+
//Point3D endPt2 = this.getLine().end();
730729
// org.jlab.clas.tracking.objects.Strip strp = new org.jlab.clas.tracking.objects.Strip(this.getId(), this.getCentroid(),
731730
// endPt1.x(), endPt1.y(), endPt1.z(),
732731
// endPt2.x(), endPt2.y(), endPt2.z());
733-
Plane3D plane = new Plane3D(endPt1, this.getN());
732+
//Plane3D plane = new Plane3D(endPt1, this.getN());
734733
surface = Geometry.getInstance().getSVT().getSurface(this.getLayer(), this.getSector(), this.getId(),
735734
this.getCentroid(), this.getLine());
736735
surface.hemisphere = Math.signum(this.center().y());
@@ -803,8 +802,6 @@ public int compareTo(Cluster arg) {
803802
int return_val = ((CompPhi == 0) ? return_val1 : CompPhi);
804803

805804
return return_val;
806-
807-
808805
}
809806

810807
private double PhiInRange(double phi) {
@@ -866,22 +863,22 @@ public void setN(Vector3D _n) {
866863

867864
public void update(int trackId, HitOnTrack traj) {
868865

869-
Point3D trackPos = new Point3D(traj.x, traj.y, traj.z);
870-
Vector3D trackDir = new Vector3D(traj.px, traj.py, traj.pz).asUnit();
866+
Point3D trackPos = new Point3D(traj.x, traj.y, traj.z);
871867

872868
this.setAssociatedTrackID(trackId);
873869
this.setCentroidResidual(traj.residual);
874870
this.setSeedResidual(trackPos);
875871
this.setTrakInters(trackPos);
876-
877872

878-
if(this.getDetector()==DetectorType.BMT && this.getType()==BMTType.C) {
879-
this.setS(this.getAxis().direction().asUnit());
880-
this.setN(this.getAxis().distance(trackPos).direction().asUnit());
881-
this.setL(this.getS().cross(this.getN()).asUnit());
882-
}
883-
if(this.getDetector()==DetectorType.BMT && this.getType()==BMTType.Z) {
884-
this.setCentroidResidual(traj.residual*this.getTile().baseArc().radius());
873+
if(this.getDetector() == DetectorType.BMT) {
874+
if (this.getType() == BMTType.C) {
875+
this.setS(this.getAxis().direction().asUnit());
876+
this.setN(this.getAxis().distance(trackPos).direction().asUnit());
877+
this.setL(this.getS().cross(this.getN()).asUnit());
878+
}
879+
else if (this.getType() == BMTType.Z) {
880+
this.setCentroidResidual(traj.residual*this.getTile().baseArc().radius());
881+
}
885882
}
886883

887884
for (Hit hit : this) {

0 commit comments

Comments
 (0)