3 modified files
lcsim/src/org/lcsim/fit/helicaltrack
diff -u -r1.30 -r1.31
--- HelicalTrackHitDriver.java 20 Jan 2009 19:18:26 -0000 1.30
+++ HelicalTrackHitDriver.java 20 Feb 2009 22:45:10 -0000 1.31
@@ -81,7 +81,7 @@
*/
Digitized
}
- private StereoHitMaker _crosser = new StereoHitMaker(10., 10.);
+ private StereoHitMaker _crosser = new StereoHitMaker(2., 10.);
private HitIdentifier ID = new HitIdentifier();
private SegmentationManager _segman;
private List<String> _vscol = new ArrayList<String>();
@@ -235,6 +235,7 @@
strips.add(strip);
stripmap.put(strip,h);
} else {
+ System.out.println("trying to make an axial hit???");
HelicalTrackHit dah = makeDigiAxialHit(h);
helhits.add(dah); //isolated hit
hitrelations.add(new MyLCRelation(dah,hit));
@@ -442,20 +443,31 @@
Hep3Vector org = trans.transformed(_orgloc);
Hep3Vector u = global.getMeasuredCoordinate();
Hep3Vector v = global.getUnmeasuredCoordinate();
+// System.out.println("Strip hit origin x: "+org.x()+" y: "+org.y()+" z: "+org.z());
+// System.out.println("Strip hit measured x: "+u.x()+" y: "+u.y()+" z: "+u.z());
+// System.out.println("Strip hit unmeasured x: "+v.x()+" y: "+v.y()+" z: "+v.z());
double umeas = local.getPosition()[0];
double vmin = VecOp.dot(local.getUnmeasuredCoordinate(),local.getHitSegment().getStartPoint());
double vmax = VecOp.dot(local.getUnmeasuredCoordinate(),local.getHitSegment().getEndPoint());
double du = Math.sqrt(local.getCovarianceAsMatrix().diagonal(0));
-
+// System.out.println("umeas: "+umeas+" vmin: "+vmin+" vmax: "+vmax+" du: "+du);
+
IDetectorElement de = h.getSensor();
String det = ID.getName(de);
int lyr = ID.getLayer(de);
BarrelEndcapFlag be = ID.getBarrelEndcapFlag(de);
-
+// System.out.println("Identifier: "+det+lyr+be);
+
double dEdx = h.getdEdx();
double time = h.getTime();
List<RawTrackerHit> rawhits = h.getRawHits();
+// for (RawTrackerHit raw : rawhits) {
+// for (SimTrackerHit shit : raw.getSimTrackerHits()) {
+// System.out.println("Sim Hit x: "+shit.getPoint()[0]+
+// " y: "+shit.getPoint()[1]+" z: "+shit.getPoint()[2]);
+// }
+// }
HelicalTrackStrip strip = new HelicalTrackStrip(org, u, v, umeas, du,
vmin, vmax, dEdx, time, rawhits, det, lyr, be);
lcsim/src/org/lcsim/fit/helicaltrack
diff -u -r1.6 -r1.7
--- HitUtils.java 28 Aug 2008 01:20:58 -0000 1.6
+++ HitUtils.java 20 Feb 2009 22:45:10 -0000 1.7
@@ -178,10 +178,10 @@
MatrixAdd(Vec2Matrix(VecOp.mult(strip2.du() * factor, strip1.v())), cov);
// Calculate the uncertainty in the unmeasured coordinate due to not knowing the track direction
// by assuming phat . u has an uncertainty of 2/sqrt(12) so dv = 2 / sqrt(12) * seperation / sin(alpha)
- double dv = 2. * separation / (Math.sqrt(12) * salpha);
+ double dv = Math.abs(2. * separation / (Math.sqrt(12) * salpha));
// Add the covariance contributions from not knowing the track direction cov += (v1 * v1^T + v2 * v2^T) * (dv/2)^2
- MatrixAdd(Vec2Matrix(VecOp.mult(factor, strip1.v())), cov);
- MatrixAdd(Vec2Matrix(VecOp.mult(factor, strip2.v())), cov);
+ MatrixAdd(Vec2Matrix(VecOp.mult(dv * factor, strip1.v())), cov);
+ MatrixAdd(Vec2Matrix(VecOp.mult(dv * factor, strip2.v())), cov);
return new SymmetricMatrix(cov);
}
lcsim/src/org/lcsim/fit/helicaltrack
diff -u -r1.6 -r1.7
--- StereoHitMaker.java 2 Oct 2008 17:13:38 -0000 1.6
+++ StereoHitMaker.java 20 Feb 2009 22:45:10 -0000 1.7
@@ -29,7 +29,7 @@
* Creates a new instance of StereoHitMaker
*/
public StereoHitMaker() {
- this(10., 10.);
+ this(2., 10.);
}
public StereoHitMaker(double tolerance, double maxsep) {
@@ -59,10 +59,11 @@
Hep3Vector p1 = VecOp.add(strip1.origin(), VecOp.mult(strip1.umeas(), strip1.u()));
Hep3Vector p2 = VecOp.add(strip2.origin(), VecOp.mult(strip2.umeas(), strip2.u()));
Hep3Vector dp = VecOp.sub(p1, p2);
-
+
+
// Check that the sensors planes are parallel to each other
if (VecOp.cross(strip1.w(), strip2.w()).magnitude() > _eps) continue;
-
+
// Check that the sensor seperation meets requirements
double seperation = Math.abs(VecOp.dot(dp, strip1.w()));
if (seperation > _maxsep) continue;
@@ -73,12 +74,13 @@
// Check if we can form a cross within tolerances
double v1 = VecOp.dot(dp, strip2.u()) / salpha;
-
- if (v1 > strip1.vmax() + seperation * _tolerance) continue;
- if (v1 < strip1.vmin() - seperation * _tolerance) continue;
+
+ double vtol = Math.abs(seperation * _tolerance / salpha);
+ if (v1 > strip1.vmax() + vtol ) continue;
+ if (v1 < strip1.vmin() - vtol) continue;
double v2 = VecOp.dot(dp, strip1.u()) / salpha;
- if (v2 > strip2.vmax() + seperation * _tolerance) continue;
- if (v2 < strip2.vmin() - seperation * _tolerance) continue;
+ if (v2 > strip2.vmax() + vtol) continue;
+ if (v2 < strip2.vmin() - vtol) continue;
// Strip pair passes all requirements, make a new cross and add it to the collection
HelicalTrackCross cross = new HelicalTrackCross(strip1, strip2);
CVSspam 0.2.8