hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.25 -r1.26
--- TrackUtils.java 17 Sep 2013 00:52:52 -0000 1.25
+++ TrackUtils.java 11 Oct 2013 02:28:20 -0000 1.26
@@ -32,7 +32,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: TrackUtils.java,v 1.25 2013/09/17 00:52:52 phansson Exp $
+ * @version $Id: TrackUtils.java,v 1.26 2013/10/11 02:28:20 phansson Exp $
* TODO: Switch to JLab coordinates
*/
@@ -767,19 +767,22 @@
Hep3Vector org = hpstrans.transformVectorToTracking(mcp.getOrigin());
Hep3Vector p = hpstrans.transformVectorToTracking(mcp.getMomentum());
// Move to x=0 if needed
- if(org.x() < 0.) {
+ double targetX = SvtTrackExtrapolator.DIPOLE_EDGELOW;
+ if(org.x() < targetX) {
double dydx = p.y()/p.x();
double dzdx = p.z()/p.x();
- double delta_x = -1. * org.x();
+ double delta_x = targetX - org.x();
double y = delta_x * dydx + org.y();
double z = delta_x * dzdx + org.z();
double x = org.x() + delta_x;
- if( Math.abs(x) > 1e-8) throw new RuntimeException("Error: origin is not zero!");
+ if( Math.abs(x-targetX) > 1e-8) throw new RuntimeException("Error: origin is not zero!");
Hep3Vector old = org;
org = new BasicHep3Vector(x,y,z);
- System.out.printf("org %s p %s -> org %s\n", old.toString(),p.toString(),org.toString());
+ //System.out.printf("org %s p %s -> org %s\n", old.toString(),p.toString(),org.toString());
}
+ //System.out.printf("outside org %s p %s \n",p.toString(),org.toString());
+
HelixParamCalculator helixParamCalculator = new HelixParamCalculator(p, org, -1*((int)mcp.getCharge()), Bz);
@@ -792,7 +795,7 @@
SymmetricMatrix cov = new SymmetricMatrix(5);
for(int i=0;i<cov.getNRows();++i) cov.setElement(i, i, 1.);
HelicalTrackFit htf = new HelicalTrackFit(par, cov, new double[2], new int[2], null, null);
- System.out.printf("d0 %f z0 %f R %f phi %f lambda %s\n", htf.dca(),htf.z0(),htf.R(),htf.phi0(),htf.slope() );
+ //System.out.printf("d0 %f z0 %f R %f phi %f lambda %s\n", htf.dca(),htf.z0(),htf.R(),htf.phi0(),htf.slope() );
return htf;
}