lcsim/src/org/lcsim/recon/pfa/identifier
diff -u -r1.5 -r1.6
--- TrackHelixExtrapolator.java 9 Oct 2008 21:38:28 -0000 1.5
+++ TrackHelixExtrapolator.java 27 Oct 2008 18:48:20 -0000 1.6
@@ -98,7 +98,18 @@
double rBarrel = Math.sqrt(interceptBarrel.x()*interceptBarrel.x() + interceptBarrel.y()*interceptBarrel.y());
double zEndcap = interceptEndcap.z();
double zBarrel = interceptBarrel.z();
- throw new AssertionError("Track hits endcap THEN barrel -- this doesn't make sense!\nEndcap intercept at alpha="+alphaEndcap+" has r="+rEndcap+", z="+zEndcap+"\nBarrel intercept at alpha="+alphaBarrel+" has r="+rBarrel+", z="+zBarrel);
+ System.out.println(this.getClass().getName()+": Track extrapolation failure: Track hits endcap THEN barrel -- this doesn't make sense!");
+ System.out.println(" Endcap intercept at alpha="+alphaEndcap+" has r="+rEndcap+", z="+zEndcap);
+ System.out.println(" Barrel intercept at alpha="+alphaBarrel+" has r="+rBarrel+", z="+zBarrel);
+ Hep3Vector p3 = new BasicHep3Vector(tr.getMomentum());
+ double p = p3.magnitude();
+ double pt = Math.sqrt(p3.x()*p3.x() + p3.y()*p3.y());
+ System.out.println(" Track has p="+p+" and pt="+pt);
+ validEndcap = validBarrel = false;
+ m_intercept = null;
+ m_swimmer = null;
+ m_alphaIntercept = Double.NaN;
+ return null;
} else {
validEndcap = false;
}
lcsim/src/org/lcsim/recon/pfa/identifier
diff -u -r1.4 -r1.5
--- TrackHelixPlusHitExtrapolator.java 9 Oct 2008 21:38:28 -0000 1.4
+++ TrackHelixPlusHitExtrapolator.java 27 Oct 2008 18:48:20 -0000 1.5
@@ -34,6 +34,13 @@
// Start by swimming as per parent:
super.performExtrapolation(tr);
+ if (m_swimmer == null) {
+ // Failed to extrapolate completely -- didn't even fit a helix
+ m_intercept = null;
+ m_swimmer = null;
+ m_alphaIntercept = Double.NaN;
+ return null;
+ }
// Now scan over tracker hits and find the outermost one.
// Note that the details here depend on what kind of hit