Commit in lcsim/src/org/lcsim/recon/pfa/identifier on MAIN
CheatHelixTrackClusterMatcher.java+46added 1.1
CheatHelixTrackMIPClusterMatcher.java+34added 1.1
+80
2 added files
MJC: Slightly different ways to do track extrapolation

lcsim/src/org/lcsim/recon/pfa/identifier
CheatHelixTrackClusterMatcher.java added at 1.1
diff -N CheatHelixTrackClusterMatcher.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CheatHelixTrackClusterMatcher.java	12 Oct 2007 22:06:57 -0000	1.1
@@ -0,0 +1,46 @@
+package org.lcsim.recon.pfa.identifier;
+
+import org.lcsim.util.swim.HelixSwimmer;
+import org.lcsim.event.Track;
+import org.lcsim.event.MCParticle;
+import hep.physics.particle.Particle;
+
+/**
+ * Attempt to match a Track to a Cluster, based on the intercept point
+ * on the ECAL inner surface.
+ *
+ * Works the same as SimpleTrackClusterMatcher, except that helix
+ * extrapolation uses truth information instead of track parameters.
+ *
+ * @version $Id: CheatHelixTrackClusterMatcher.java,v 1.1 2007/10/12 22:06:57 mcharles Exp $
+ */
+
+public class CheatHelixTrackClusterMatcher extends SimpleTrackClusterMatcher
+{
+    /** Simple constructor. */
+    public CheatHelixTrackClusterMatcher() {
+	super();
+    }
+    /**
+     * Simple constructor, setting minimum distance from track
+     * intecept point to cluster.
+     */
+    public CheatHelixTrackClusterMatcher(double cut) {
+	super(cut);
+    }
+
+    protected HelixSwimmer createSwimmer(Track tr) {
+	// Use same method as Steve, taking info from MC truth.
+	Particle particle = null;
+	if (tr instanceof org.lcsim.mc.fast.tracking.ReconTrack) {
+	    particle = ((org.lcsim.mc.fast.tracking.ReconTrack)(tr)).getMCParticle();
+	}
+	if (tr instanceof org.lcsim.event.base.BaseTrackMC) {
+	    particle = ((org.lcsim.event.base.BaseTrackMC)(tr)).getMCParticle();
+	}
+	// ... then feeding it into the swimmer:
+	HelixSwimmer swimmer = new HelixSwimmer(m_fieldStrength[2]);
+	swimmer.setTrack(particle.getMomentum(), particle.getOrigin(), ((int)(particle.getCharge())));
+	return swimmer;
+    }
+}

lcsim/src/org/lcsim/recon/pfa/identifier
CheatHelixTrackMIPClusterMatcher.java added at 1.1
diff -N CheatHelixTrackMIPClusterMatcher.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CheatHelixTrackMIPClusterMatcher.java	12 Oct 2007 22:06:57 -0000	1.1
@@ -0,0 +1,34 @@
+package org.lcsim.recon.pfa.identifier;
+
+import org.lcsim.util.swim.HelixSwimmer;
+import org.lcsim.event.MCParticle;
+import hep.physics.particle.Particle;
+import org.lcsim.event.Track;
+
+/**
+ * Attempt to match a Track to a Cluster, based on the intercept point
+ * on the ECAL inner surface.
+ *
+ * Works the same as SimpleTrackMIPClusterMatcher, except that helix
+ * extrapolation uses truth information instead of track parameters.
+ *
+ * @version $Id: CheatHelixTrackMIPClusterMatcher.java,v 1.1 2007/10/12 22:06:57 mcharles Exp $
+ */
+
+public class CheatHelixTrackMIPClusterMatcher extends SimpleTrackMIPClusterMatcher
+{
+    protected HelixSwimmer createSwimmer(Track tr) {
+	// Use same method as Steve, taking info from MC truth.
+	Particle particle = null;
+	if (tr instanceof org.lcsim.mc.fast.tracking.ReconTrack) {
+	    particle = ((org.lcsim.mc.fast.tracking.ReconTrack)(tr)).getMCParticle();
+	}
+	if (tr instanceof org.lcsim.event.base.BaseTrackMC) {
+	    particle = ((org.lcsim.event.base.BaseTrackMC)(tr)).getMCParticle();
+	}
+	// ... then feeding it into the swimmer:
+	HelixSwimmer swimmer = new HelixSwimmer(m_fieldStrength[2]);
+	swimmer.setTrack(particle.getMomentum(), particle.getOrigin(), ((int)(particle.getCharge())));
+	return swimmer;
+    }
+}
CVSspam 0.2.8