3 added + 7 modified, total 10 files
lcsim/src/org/lcsim/contrib/JanStrube/tracking
diff -N SwimmerTest.py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ SwimmerTest.py 18 Jul 2006 13:20:41 -0000 1.1
@@ -0,0 +1,19 @@
+from TrackingCalculator import *
+
+point = ThreeVector(1, 0, 1)
+momentum = ThreeVector(3, 2, 1)
+t1 = ArbTrack(momentum=momentum, position=point, charge=-1)
+print t1
+
+par = t1.parameters
+m = Measurement()
+m.d0 = par.d0
+m.pt = par.pt
+m.phi0 = par.phi0
+m.tanLambda = par.tanLambda
+m.omega = par.omega
+m.z0 = par.z0
+
+print ArbTrack(parameters=m)
+
+
lcsim/src/org/lcsim/contrib/JanStrube/tracking
diff -N TrackingCalculator.py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ TrackingCalculator.py 18 Jul 2006 13:20:41 -0000 1.1
@@ -0,0 +1,136 @@
+"""
+TrackingCalculator.py
+This little tool provides functions to calculate back and forth
+between the space-momentum and the 5 parameter helix representations
+of a track
+
+ Jan Strube, Jul 2006
+"""
+from math import sin, cos, sqrt, atan2, atan
+from __future__ import division
+
+class ThreeVector:
+ def __init__(self, x=0, y=0, z=0):
+ self.x = x
+ self.y = y
+ self.z = z
+
+class Measurement:
+ def __init__(self):
+ self.d0 = 0
+ self.phi0 = 0
+ self.tanLambda = 0
+ self.omega = 0
+ self.z0 = 0
+ self.pt = 0
+
+
+class Track:
+ fieldConst = 3333.566*5.
+
+ def __init__(self, momentum=None, position=None, charge=None, parameters=None, refPoint=ThreeVector()):
+ self.refPoint = refPoint
+ if parameters is None:
+ self.momentum = momentum
+ self.origin = position
+ self.charge = charge
+ self.parameters = Measurement()
+ self.calc5VecFromSpaceMomentum()
+ else:
+ self.parameters = parameters
+ self.charge = self.parameters.omega*self.parameters.pt/Track.fieldConst
+ self.origin = self.getOriginPoint()
+ self.momentum = self.getOriginMomentum()
+
+
+ def getOriginPoint(self):
+ par = self.parameters
+ x = self.refPoint.x - par.d0*sin(par.phi0)
+ y = self.refPoint.y + par.d0*cos(par.phi0)
+ z = self.refPoint.z + par.z0
+ return ThreeVector(x, y, z)
+
+ def getOriginMomentum(self):
+ par = self.parameters
+ pt = Track.fieldConst * abs(self.charge/par.omega)
+ px = pt*cos(par.phi0)
+ py = pt*sin(par.phi0)
+ pz = pt*par.tanLambda
+ return ThreeVector(px, py, pz)
+
+ def calc5VecFromSpaceMomentum(self):
+ par = self.parameters
+ par.phi0 = atan2(self.momentum.y, self.momentum.x)
+ par.d0 = -(self.origin.x - self.refPoint.x)*sin(par.phi0) \
+ + (self.origin.y-self.refPoint.y)*cos(par.phi0)
+ par.z0 = self.origin.z - self.refPoint.z
+ par.pt = sqrt(self.momentum.x*self.momentum.x +
+ self.momentum.y*self.momentum.y)
+ par.tanLambda = self.momentum.z/par.pt
+ par.omega = self.charge*Track.fieldConst/par.pt
+
+ def __str__(self):
+ par = self.parameters
+ repr = ""
+ repr += "TrackParameters: \n"
+ repr += "d0: %s\nphi0: %s\nomega: %s\ntanLambda: %s\nz0: %s\npt: %s\n" % (
+ par.d0, par.phi0, par.omega, par.tanLambda, par.z0, par.pt)
+ repr += "Spacial Rep:\n"
+ pos = self.origin
+ repr += "x: %s\ny: %s\nz: %s\n" % (pos.x, pos.y, pos.z)
+ mom = self.momentum
+ repr += "px: %s\npy: %s\npz: %s\n" % (mom.x, mom.y, mom.z)
+ return repr
+
+class ArbTrack(Track):
+ def __init__(self, momentum=None, position=None, charge=None, parameters=None, refPoint=ThreeVector()):
+ self.refPoint = refPoint
+ if parameters is None:
+ self.momentum = momentum
+ self.origin = position
+ self.charge = charge
+ self.parameters = Measurement()
+ self.calc5VecFromSpaceMomentum()
+ else:
+ self.parameters = parameters
+ self.charge = self.parameters.omega*self.parameters.pt/Track.fieldConst
+ self.origin = self.getOriginPoint(0)
+ self.momentum = self.getOriginMomentum(0)
+
+ def calc5VecFromSpaceMomentum(self):
+ par = self.parameters
+ mom = self.momentum
+ pos = self.origin
+ ref = self.refPoint
+ x0 = pos.x-ref.x
+ y0 = pos.y-ref.y
+ px0 = mom.x - Track.fieldConst*y0*self.charge
+ py0 = mom.y + Track.fieldConst*x0*self.charge
+ pt0 = sqrt(px0*px0 + py0*py0)
+ phi = atan(mom.y / mom.x)
+ par.pt = sqrt(mom.x*mom.x + mom.y*mom.y)
+ l = (atan(py0 / px0) - phi)*par.pt/self.charge/Track.fieldConst
+ par.d0 = (par.pt-pt0)/(Track.fieldConst*self.charge)
+ par.phi0 = atan(py0 / px0)
+ par.omega = self.charge*Track.fieldConst/par.pt
+ par.z0 = pos.z-ref.z-l*mom.z/par.pt
+ par.tanLambda = mom.z/par.pt
+
+ def getOriginPoint(self, l):
+ ref = self.refPoint
+ par = self.parameters
+ r = 1./par.omega
+ phi = par.phi0 - par.omega*l
+ x = ref.x + (r-par.d0)*sin(par.phi0) - r*sin(phi)
+ y = ref.y - (r-par.d0)*cos(par.phi0) + r*cos(phi)
+ z = ref.z + par.z0 + l*par.tanLambda
+ return ThreeVector(x, y, z)
+
+ def getOriginMomentum(self, l):
+ par = self.parameters
+ phi = par.phi0 - par.omega*l
+ x = par.pt*cos(phi)
+ y = par.pt*sin(phi)
+ z = par.pt*par.tanLambda
+ return ThreeVector(x, y, z)
+
\ No newline at end of file
lcsim/src/org/lcsim/contrib/JanStrube/tracking
diff -N NewMCFastTrackDriver.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ NewMCFastTrackDriver.java 18 Jul 2006 13:20:41 -0000 1.1
@@ -0,0 +1,111 @@
+/**
+ * @version $Id: NewMCFastTrackDriver.java,v 1.1 2006/07/18 13:20:41 jstrube Exp $
+ */
+package org.lcsim.contrib.JanStrube.tracking;
+
+import hep.physics.particle.Particle;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.lcsim.conditions.ConditionsEvent;
+import org.lcsim.conditions.ConditionsListener;
+import org.lcsim.conditions.ConditionsSet;
+import org.lcsim.event.EventHeader;
+import org.lcsim.mc.fast.tracking.MCFastTracking;
+import org.lcsim.mc.fast.tracking.SimpleTables;
+import org.lcsim.mc.fast.tracking.TrackResolutionTables;
+import org.lcsim.util.Driver;
+
+/**
+ * A replacement for the current FastMC Tracks.
+ * The simple tables are currently not implemented
+ * @author jstrube
+ *
+ */
+public class NewMCFastTrackDriver extends Driver implements ConditionsListener {
+ private TrackResolutionTables parm;
+ private SimpleTables SmTbl;
+ private boolean beamSpotConstraint;
+ private boolean simple;
+ private final static double[] IP = { 0, 0, 0 };
+
+ public NewMCFastTrackDriver(boolean beamSpotConstraint)
+ {
+ this.beamSpotConstraint = beamSpotConstraint;
+ }
+
+ public NewMCFastTrackDriver() {
+ this(false);
+ }
+
+ protected void process(EventHeader event) {
+ if (parm == null) {
+ ConditionsSet conditions = getConditionsManager().getConditions("TrackParameters");
+ conditions.addConditionsListener(this);
+ parm = setTrackResolutionTables(conditions, beamSpotConstraint);
+ }
+
+ if (SmTbl == null) {
+ ConditionsSet conditions = getConditionsManager().getConditions("SimpleTrack");
+ conditions.addConditionsListener(this);
+ SmTbl = new SimpleTables(conditions);
+ }
+
+ NewFastMCTrackFactory factory = new NewFastMCTrackFactory(event, beamSpotConstraint);
+
+ double bField = event.getDetector().getFieldMap().getField(IP)[2];
+ boolean hist = getHistogramLevel() > 0;
+
+ List<org.lcsim.event.Track> trackList = new ArrayList<org.lcsim.event.Track>();
+ for (Particle p : event.getMCParticles()) {
+ // filter for FINAL_STATE
+ if (p.getGeneratorStatus() != Particle.FINAL_STATE) {
+ continue;
+ }
+ double pCharge = p.getCharge();
+ if (pCharge == 0
+ || Double.isNaN(pCharge)
+ || pCharge == Double.NEGATIVE_INFINITY
+ || pCharge == Double.POSITIVE_INFINITY) {
+ continue;
+ }
+
+ double[] momentum = p.getMomentum().v();
+ double pt2 = (momentum[0] * momentum[0]) + (momentum[1] * momentum[1]);
+ double pt = Math.sqrt(pt2);
+ double ptot = Math.sqrt(pt2 + (momentum[2] * momentum[2]));
+ double cosTheta = momentum[2] / ptot;
+
+ // within acceptance
+ if (pt < parm.getPtMin()) {
+ continue;
+ }
+ if (Math.abs(cosTheta) > parm.getPolarOuter()) {
+ continue;
+ }
+
+ Track t = factory.getTrack(p.getMomentum(), p.getOrigin(), (int)p.getCharge());
+ org.lcsim.event.Track passpartout = new TransitionalTrack(t);
+ trackList.add(passpartout);
+ }
+ event.put(EventHeader.TRACKS, trackList, Track.class, 0);
+ }
+
+ public void conditionsChanged(ConditionsEvent event) {
+ ConditionsSet conditions = getConditionsManager().getConditions("TrackParameters");
+ ConditionsSet simpleconditions = getConditionsManager().getConditions("SimpleTrack");
+ parm = setTrackResolutionTables(conditions, beamSpotConstraint);
+ SmTbl = new SimpleTables(simpleconditions);
+ }
+
+ private TrackResolutionTables setTrackResolutionTables(ConditionsSet conditions, boolean beamSpotConstraint) {
+ try {
+ return new TrackResolutionTables(conditions, beamSpotConstraint);
+ } catch (IOException x) {
+ throw new RuntimeException("Error reading track resolution tables", x);
+ }
+ }
+
+}
lcsim/src/org/lcsim/contrib/JanStrube/tracking
diff -u -r1.2 -r1.3
--- NewTrack.java 15 Jul 2006 09:12:45 -0000 1.2
+++ NewTrack.java 18 Jul 2006 13:20:41 -0000 1.3
@@ -1,5 +1,5 @@
/**
- * @version $Id: NewTrack.java,v 1.2 2006/07/15 09:12:45 jstrube Exp $
+ * @version $Id: NewTrack.java,v 1.3 2006/07/18 13:20:41 jstrube Exp $
*/
package org.lcsim.contrib.JanStrube.tracking;
@@ -37,6 +37,12 @@
return _parameters.get(name);
}
/* (non-Javadoc)
+ * @see org.lcsim.contrib.JanStrube.tracking.Track#getParameters()
+ */
+ public EMap getParameters() {
+ return _parameters;
+ }
+ /* (non-Javadoc)
* @see org.lcsim.contrib.JanStrube.tracking.Track#getPt()
*/
public double getPt() {
lcsim/src/org/lcsim/contrib/JanStrube/tracking
diff -u -r1.1 -r1.2
--- TransitionalTrack.java 17 Jul 2006 10:12:39 -0000 1.1
+++ TransitionalTrack.java 18 Jul 2006 13:20:41 -0000 1.2
@@ -1,5 +1,5 @@
/**
- * @version $Id: TransitionalTrack.java,v 1.1 2006/07/17 10:12:39 jstrube Exp $
+ * @version $Id: TransitionalTrack.java,v 1.2 2006/07/18 13:20:41 jstrube Exp $
*/
package org.lcsim.contrib.JanStrube.tracking;
@@ -7,27 +7,34 @@
import org.lcsim.event.Track;
import org.lcsim.event.TrackerHit;
+import static java.lang.Math.sin;
+import static java.lang.Math.cos;
/**
+ * This class is a passepartout so that the new Track interface fits in the old shoes
* @author jstrube
*
*/
public class TransitionalTrack implements Track {
+ org.lcsim.contrib.JanStrube.tracking.Track _track;
+ TransitionalTrack(org.lcsim.contrib.JanStrube.tracking.Track t) {
+ _track = t;
+ }
+
/* (non-Javadoc)
* @see org.lcsim.event.Track#fitSuccess()
*/
public boolean fitSuccess() {
// TODO Auto-generated method stub
- return false;
+ return true;
}
/* (non-Javadoc)
* @see org.lcsim.event.Track#getCharge()
*/
public int getCharge() {
- // TODO Auto-generated method stub
- return 0;
+ return _track.getCharge();
}
/* (non-Javadoc)
@@ -42,24 +49,26 @@
* @see org.lcsim.event.Track#getErrorMatrix()
*/
public double[][] getErrorMatrix() {
- // TODO Auto-generated method stub
- return null;
+ return _track.getErrorMatrix().getArray();
}
/* (non-Javadoc)
* @see org.lcsim.event.Track#getErrorMatrixElement(int, int)
*/
public double getErrorMatrixElement(int i, int j) {
- // TODO Auto-generated method stub
- return 0;
+ return _track.getErrorMatrix().get(i, j);
}
/* (non-Javadoc)
* @see org.lcsim.event.Track#getMomentum()
*/
public double[] getMomentum() {
- // TODO Auto-generated method stub
- return null;
+ double pt = _track.getPt();
+ double phi0 = _track.getParameter(org.lcsim.contrib.JanStrube.tracking.Track.ParameterName.phi0);
+ double x = pt*cos(phi0);
+ double y = pt*sin(phi0);
+ double z = pt*_track.getParameter(org.lcsim.contrib.JanStrube.tracking.Track.ParameterName.tanLambda);
+ return new double[] {x, y, z};
}
/* (non-Javadoc)
@@ -74,24 +83,29 @@
* @see org.lcsim.event.Track#getPX()
*/
public double getPX() {
- // TODO Auto-generated method stub
- return 0;
+ double pt = _track.getPt();
+ double phi0 = _track.getParameter(org.lcsim.contrib.JanStrube.tracking.Track.ParameterName.phi0);
+ double x = pt*cos(phi0);
+ return x;
}
/* (non-Javadoc)
* @see org.lcsim.event.Track#getPY()
*/
public double getPY() {
- // TODO Auto-generated method stub
- return 0;
+ double pt = _track.getPt();
+ double phi0 = _track.getParameter(org.lcsim.contrib.JanStrube.tracking.Track.ParameterName.phi0);
+ double y = pt*sin(phi0);
+ return y;
}
/* (non-Javadoc)
* @see org.lcsim.event.Track#getPZ()
*/
public double getPZ() {
- // TODO Auto-generated method stub
- return 0;
+ double pt = _track.getPt();
+ double z = pt*_track.getParameter(org.lcsim.contrib.JanStrube.tracking.Track.ParameterName.tanLambda);
+ return z;
}
/* (non-Javadoc)
@@ -106,32 +120,28 @@
* @see org.lcsim.event.Track#getReferencePoint()
*/
public double[] getReferencePoint() {
- // TODO Auto-generated method stub
- return null;
+ return _track.getReferencePoint().getCartesianArray();
}
/* (non-Javadoc)
* @see org.lcsim.event.Track#getReferencePointX()
*/
public double getReferencePointX() {
- // TODO Auto-generated method stub
- return 0;
+ return _track.getReferencePoint().x();
}
/* (non-Javadoc)
* @see org.lcsim.event.Track#getReferencePointY()
*/
public double getReferencePointY() {
- // TODO Auto-generated method stub
- return 0;
+ return _track.getReferencePoint().y();
}
/* (non-Javadoc)
* @see org.lcsim.event.Track#getReferencePointZ()
*/
public double getReferencePointZ() {
- // TODO Auto-generated method stub
- return 0;
+ return _track.getReferencePoint().z();
}
/* (non-Javadoc)
@@ -146,16 +156,14 @@
* @see org.lcsim.event.Track#getTrackParameter(int)
*/
public double getTrackParameter(int i) {
- // TODO Auto-generated method stub
- return 0;
+ return _track.getParameters().values[i];
}
/* (non-Javadoc)
* @see org.lcsim.event.Track#getTrackParameters()
*/
public double[] getTrackParameters() {
- // TODO Auto-generated method stub
- return null;
+ return _track.getParameters().values;
}
/* (non-Javadoc)
@@ -178,8 +186,7 @@
* @see org.lcsim.event.Track#getType()
*/
public int getType() {
- // TODO Auto-generated method stub
- return 0;
+ return 42;
}
/* (non-Javadoc)
@@ -203,7 +210,7 @@
*/
public boolean isReferencePointPCA() {
// TODO Auto-generated method stub
- return false;
+ return true;
}
}
lcsim/src/org/lcsim/contrib/JanStrube/tracking
diff -u -r1.2 -r1.3
--- Track.java 15 Jul 2006 09:12:45 -0000 1.2
+++ Track.java 18 Jul 2006 13:20:41 -0000 1.3
@@ -1,5 +1,5 @@
/**
- * @version $Id: Track.java,v 1.2 2006/07/15 09:12:45 jstrube Exp $
+ * @version $Id: Track.java,v 1.3 2006/07/18 13:20:41 jstrube Exp $
*/
package org.lcsim.contrib.JanStrube.tracking;
@@ -20,31 +20,37 @@
/**
* Returns the parameter by name
* @param name symbolic name of the parameter
- * @return the value of the parameter
+ * @return The value of the parameter
*/
public abstract double getParameter(ParameterName name);
/**
+ * Returns the parmeters container, which holds the 5 parameters and the pt
+ * @return The parameters for this Track
+ */
+ public abstract EMap getParameters();
+
+ /**
* Returns the transverse momentum
- * @return the transverse momentum
+ * @return The transverse momentum
*/
public abstract double getPt();
/**
* Returns the charge of the particle that made the track
- * @return an integral charge
+ * @return The charge
*/
public abstract int getCharge();
/**
* Returns the reference point with respect to which all parameters are defined
- * @return the point in space at which the parameters are defined
+ * @return The point in space at which the parameters are defined
*/
public abstract SpacePoint getReferencePoint();
/**
* Returns a 5x5 measurement error of the track parameters
- * @return the covariance matrix of the track parameters
+ * @return The covariance matrix of the track parameters
*/
public abstract Matrix getErrorMatrix();
lcsim/src/org/lcsim/contrib/JanStrube/tracking
diff -u -r1.4 -r1.5
--- NewFastMCTrackFactory.java 18 Jul 2006 03:26:50 -0000 1.4
+++ NewFastMCTrackFactory.java 18 Jul 2006 13:20:41 -0000 1.5
@@ -1,5 +1,5 @@
/**
- * @version $Id: NewFastMCTrackFactory.java,v 1.4 2006/07/18 03:26:50 jstrube Exp $
+ * @version $Id: NewFastMCTrackFactory.java,v 1.5 2006/07/18 13:20:41 jstrube Exp $
*/
package org.lcsim.contrib.JanStrube.tracking;
@@ -16,6 +16,8 @@
import static org.lcsim.contrib.JanStrube.tracking.Track.ParameterName.tanLambda;
import static org.lcsim.contrib.JanStrube.tracking.Track.ParameterName.z0;
+import hep.physics.vec.Hep3Vector;
+
import java.io.IOException;
import java.util.Random;
@@ -129,9 +131,7 @@
_swimmer.setTrack(momentum, location, charge);
double alpha = _swimmer.getTrackLengthToPoint(referencePoint);
SpacePoint poca = _swimmer.getPointAtDistance(alpha);
-// System.out.println("poca is: " + poca);
SpacePoint momentumAtPoca = _swimmer.getMomentumAtDistance(alpha);
-// System.out.println("momentum at POCA is: " + momentumAtPoca);
EMap parameters = new EMap();
parameters.pt = momentumAtPoca.rxy();
parameters.set(phi0, atan2(momentumAtPoca.y(), momentumAtPoca.x()));
@@ -163,8 +163,8 @@
? smearParameters(parameters, errorMatrix, random)
: parameters;
- // System.out.println("TrackFactory: POCA " + poca);
- // System.out.println("TrackFactory: Momentum " + momentumAtPoca);
+ System.out.println("TrackFactory: POCA " + poca);
+ System.out.println("TrackFactory: Momentum " + momentumAtPoca);
return new NewTrack(referencePoint, smearParams, errorMatrix, charge);
}
@@ -182,6 +182,9 @@
return getTrack(momentum, location, referencePoint, charge, random, true);
}
+ public Track getTrack(Hep3Vector momentum, Hep3Vector location, int charge) {
+ return getTrack(new SpacePoint(momentum), new SpacePoint(location), new SpacePoint(), charge, new Random());
+ }
/**
* Swims the Track to a new reference point and calculates the parameters anew.
lcsim/test/org/lcsim/contrib/JanStrube/tracking
diff -u -r1.1 -r1.2
--- HelixSwimmerTrackConsistencyTest.java 18 Jul 2006 06:40:10 -0000 1.1
+++ HelixSwimmerTrackConsistencyTest.java 18 Jul 2006 13:20:43 -0000 1.2
@@ -1,5 +1,5 @@
/**
- * @version $Id: HelixSwimmerTrackConsistencyTest.java,v 1.1 2006/07/18 06:40:10 jstrube Exp $
+ * @version $Id: HelixSwimmerTrackConsistencyTest.java,v 1.2 2006/07/18 13:20:43 jstrube Exp $
*/
package org.lcsim.contrib.JanStrube.tracking;
@@ -12,6 +12,8 @@
import org.lcsim.spacegeom.SpacePoint;
import static java.lang.Math.atan2;
+import static java.lang.Math.sin;
+import static java.lang.Math.sqrt;
import junit.framework.TestCase;
/**
@@ -66,34 +68,38 @@
// reference Point is (0, 0, 0)
Track t = factory.getTrack(momentum, location, referencePoint, charge, new Random(), false);
swimmerTrack.setTrack(t);
+// System.out.println("Swimming to origin:" + swimmerTrack.getPointAtDistance(0));
+// System.out.println("Swimming to origin momentum:" + swimmerTrack.getMomentumAtDistance(0));
double alpha = swimmerRaw.getTrackLengthToPoint(referencePoint);
double beta = swimmerTrack.getTrackLengthToPoint(referencePoint);
// The track is already at the reference point
assertEquals(beta, 0, 1e-10);
- // The distance that has been swum is equal and opposite
- assertEquals(alpha, -1 * swimmerTrack.getTrackLengthToPoint(location), 4e-4);
- // It should be possible to calculate the angle
- // phi = phi0 - omega*alpha*cosLambda
+ // Whereas the origin for the helix is the original location
+ assertEquals(alpha, -1 * swimmerTrack.getTrackLengthToPoint(location), 1e-3);
+
+ // swim to random points. The values for the tracklength must differ by alpha
+ SpacePoint p1 = new CartesianPoint(7, 7, 7);
+ assertEquals(swimmerRaw.getTrackLengthToPoint(p1), swimmerTrack.getTrackLengthToPoint(p1)+alpha, 1e-3);
+
double phi = atan2(momentum.y(), momentum.x());
double phi_0 = t.getParameter(Track.ParameterName.phi0);
double omega = t.getParameter(Track.ParameterName.omega);
System.out.printf("phi: %f\nphi0: %f\nomega: %f\nalpha: %f\n", phi, phi_0, omega, alpha);
-// assertEquals(phi, phi_0 - omega*alpha);
// The Track and the helix should be the same, except for being offset by alpha.
System.out.println("Raw:\n" + (Helix)swimmerRaw.getTrajectory());
System.out.println("Track:\n" + (Helix)swimmerTrack.getTrajectory());
+ double tanLambda = t.getParameter(Track.ParameterName.tanLambda);
+ double cosLambda = 1 / sqrt(1+tanLambda*tanLambda);
- System.out.println(swimmerRaw.getPointAtDistance(alpha));
+ System.out.println(swimmerRaw.getPointAtDistance(alpha/cosLambda));
System.out.println(swimmerTrack.getPointAtDistance(-alpha));
System.out.printf("Pt: %f\n", t.getPt());
for (Track.ParameterName n : Track.ParameterName.values()) {
System.out.printf("%s: %f\n", n.name(), t.getParameter(n));
}
// The points at these two locations should be the same, too.
-// assertEquals(swimmerRaw.getPointAtDistance(alpha), swimmerTrack.getPointAtDistance(0), 1e-4);
-
-
+// assertEquals(swimmerRaw.getPointAtDistance(alpha), swimmerTrack.getPointAtDistance(0), 4e-4);
}
/* (non-Javadoc)
lcsim/src/org/lcsim/contrib/JanStrube/vtxFitter
diff -u -r1.5 -r1.6
--- FitterTest.java 18 Jul 2006 03:26:52 -0000 1.5
+++ FitterTest.java 18 Jul 2006 13:20:43 -0000 1.6
@@ -5,9 +5,6 @@
import static org.lcsim.contrib.JanStrube.vtxFitter.Fitter.subtract;
import junit.framework.TestCase;
-import org.lcsim.event.ReconstructedParticle;
-import org.lcsim.event.Track;
-import org.lcsim.event.base.BaseReconstructedParticle;
import org.lcsim.spacegeom.CartesianPoint;
import org.lcsim.spacegeom.SpacePoint;
lcsim/src/org/lcsim/mc/fast/tracking
diff -u -r1.2 -r1.3
--- TrackResolutionTables.java 15 Jul 2006 09:35:59 -0000 1.2
+++ TrackResolutionTables.java 18 Jul 2006 13:20:44 -0000 1.3
@@ -42,12 +42,12 @@
return PolarInner;
}
- double getPolarOuter()
+ public double getPolarOuter()
{
return PolarOuter;
}
- double getPtMin()
+ public double getPtMin()
{
return PtMin;
}
CVSspam 0.2.8