lcsim/src/org/lcsim/recon/ztracking
diff -N FoundTrack.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ FoundTrack.java 2 Aug 2005 23:51:17 -0000 1.1
@@ -0,0 +1,58 @@
+/* FoundTrack.java
+
+ Found track used in constructing cheater and reconstructed tracks.
+
+ Created by Mike Ronan July '00
+ Modified by
+
+ */
+
+package org.lcsim.recon.ztracking;
+
+import org.lcsim.event.MCParticle;
+import org.lcsim.event.SimTrackerHit;
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class FoundTrack
+// public class FoundTrack extends AbstractTrack
+{
+ List list = new ArrayList();
+ double p = 0., px = 0., py = 0., pz = 0.;
+ double[] momentum;
+ int charge = 0;
+
+ MCParticle mcParticle;
+
+ /** */
+ public FoundTrack()
+ {
+ }
+
+ /** Found with associated Monte Carlo particle. */
+ public FoundTrack(MCParticle mcParticle)
+ {
+ charge = (int) mcParticle.getCharge();
+ px = mcParticle.getPX();
+ py = mcParticle.getPY();
+ pz = mcParticle.getPZ();
+ p = Math.sqrt(px*px + py*py + pz*pz);
+ momentum = new double[] {px, py, pz};
+
+ this.mcParticle = mcParticle;
+ }
+
+ public void addHit(SimTrackerHit hit) { list.add(hit); }
+ public int getNPoints() { return list.size(); }
+
+ public double getPX() { return px; }
+ public double getPY() { return py; }
+ public double getPZ() { return pz; }
+ public double[] getMomentum() { return momentum; }
+
+ public MCParticle getMCParticle()
+ {
+ return mcParticle;
+ }
+}