Skip to content

Commit 9bf4715

Browse files
committed
Tried to introduce a "pull" to the track on the correct sign of a wire by setting the measurement on the correct "virtual wire" with a larger error.
1 parent a0d4aaa commit 9bf4715

File tree

1 file changed

+13
-11
lines changed
  • reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter

1 file changed

+13
-11
lines changed

reconstruction/alert/src/main/java/org/jlab/rec/ahdc/KalmanFilter/Hit.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ public Hit(int superLayer, int layer, int wire, int numWire, double r, double do
113113

114114
//calculate the "virtual" left and right wires accounting for the DOCA
115115
double deltaphi = Math.asin(this.doca/R_layer);
116-
double wx_plus = -R_layer * Math.sin( alphaW_layer * (this.wire-1) + deltaphi );//OK
117-
double wy_plus = -R_layer * Math.cos( alphaW_layer * (this.wire-1) + deltaphi );//OK
116+
double wx_plus = -R_layer * Math.sin( alphaW_layer * (this.wire-1) - deltaphi );//OK
117+
double wy_plus = -R_layer * Math.cos( alphaW_layer * (this.wire-1) - deltaphi );//OK
118118

119-
double wx_plus_end = -R_layer * Math.sin( alphaW_layer * (this.wire-1) + thster * (Math.pow(-1, this.superLayer-1)) + deltaphi );//OK
120-
double wy_plus_end = -R_layer * Math.cos( alphaW_layer * (this.wire-1) + thster * (Math.pow(-1, this.superLayer-1)) + deltaphi );//OK
119+
double wx_plus_end = -R_layer * Math.sin( alphaW_layer * (this.wire-1) + thster * (Math.pow(-1, this.superLayer-1)) - deltaphi );//OK
120+
double wy_plus_end = -R_layer * Math.cos( alphaW_layer * (this.wire-1) + thster * (Math.pow(-1, this.superLayer-1)) - deltaphi );//OK
121121

122122
line = new Line3D(wx_plus, wy_plus, -zl/2, wx_plus_end, wy_plus_end, zl/2);
123123
lPoint = new Point3D();
@@ -128,11 +128,11 @@ public Hit(int superLayer, int layer, int wire, int numWire, double r, double do
128128
wireLine = new Line3D(lPoint, rPoint);
129129
this.line3D_plus = wireLine;
130130

131-
double wx_minus = -R_layer * Math.sin( alphaW_layer * (this.wire-1) - deltaphi );//OK
132-
double wy_minus = -R_layer * Math.cos( alphaW_layer * (this.wire-1) - deltaphi );//OK
131+
double wx_minus = -R_layer * Math.sin( alphaW_layer * (this.wire-1) + deltaphi );//OK
132+
double wy_minus = -R_layer * Math.cos( alphaW_layer * (this.wire-1) + deltaphi );//OK
133133

134-
double wx_minus_end = -R_layer * Math.sin( alphaW_layer * (this.wire-1) + thster * (Math.pow(-1, this.superLayer-1)) - deltaphi );//OK
135-
double wy_minus_end = -R_layer * Math.cos( alphaW_layer * (this.wire-1) + thster * (Math.pow(-1, this.superLayer-1)) - deltaphi );//OK
134+
double wx_minus_end = -R_layer * Math.sin( alphaW_layer * (this.wire-1) + thster * (Math.pow(-1, this.superLayer-1)) + deltaphi );//OK
135+
double wy_minus_end = -R_layer * Math.cos( alphaW_layer * (this.wire-1) + thster * (Math.pow(-1, this.superLayer-1)) + deltaphi );//OK
136136

137137
line = new Line3D(wx_minus, wy_minus, -zl/2, wx_minus_end, wy_minus_end, zl/2);
138138
lPoint = new Point3D();
@@ -167,7 +167,7 @@ public RealMatrix get_MeasurementNoise(boolean goodsign) {
167167
if(goodsign){
168168
return new Array2DRowRealMatrix(new double[][]{{0.0225}});
169169
}else{
170-
return new Array2DRowRealMatrix(new double[][]{{2*this.doca*this.doca}});
170+
return new Array2DRowRealMatrix(new double[][]{{this.doca*this.doca}});
171171
}
172172
}
173173

@@ -194,8 +194,10 @@ public double distance(Point3D point3D) {
194194
public double distance(Point3D point3D, int sign) {
195195
//if(sign!=0)
196196
//System.out.println(" r " + this.r + " phi " + this.phi + " doca " + this.doca + " sign " + sign + " distance " + this.line3D.distance(point3D).length() + " (sign 0) " + this.line3D_plus.distance(point3D).length() + " (sign+) " + this.line3D_minus.distance(point3D).length() + " (sign-) ");
197-
if(sign>0)return this.line3D_plus.distance(point3D).length();
198-
if(sign<0)return this.line3D_minus.distance(point3D).length();
197+
if(sign>0 && sign*this.hitsign<0
198+
)return this.line3D_plus.distance(point3D).length();
199+
if(sign<0 && sign*this.hitsign<0
200+
)return this.line3D_minus.distance(point3D).length();
199201
return this.line3D.distance(point3D).length();
200202
}
201203

0 commit comments

Comments
 (0)