Commit in lcsim/src/org/lcsim/fit/helicaltrack on MAIN
HelixParamCalculator.java+16-41.3 -> 1.4
Added new constructor

lcsim/src/org/lcsim/fit/helicaltrack
HelixParamCalculator.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- HelixParamCalculator.java	10 Jul 2008 17:17:06 -0000	1.3
+++ HelixParamCalculator.java	17 Jul 2008 17:26:51 -0000	1.4
@@ -19,7 +19,6 @@
 public class HelixParamCalculator  {
 
     MCParticle mcp;
-    EventHeader event;
     private double R,BField,theta,arclength;
     //Some varibles are usesd in other calculations, thus they are global
     /*
@@ -31,14 +30,18 @@
     */
     private double xc,yc,mcdca,mcphi0,tanL;
     private double x0,y0;
-    public HelixParamCalculator(MCParticle mcpc,EventHeader eventc)
+    /**
+     * Constructor that is fed a magnetic field and MCPARTICLE
+     * @param mcpc
+     * @param cBField
+     */
+    public HelixParamCalculator(MCParticle mcpc,double cBField)
     {
         //mc and event global varibles used for calculation
         mcp=mcpc;
-        event = eventc;
         
         //Returns the MagneticField at point (0,0,0), assumes constant magfield
-        BField = event.getDetector().getFieldMap().getField(new BasicHep3Vector(0.,0.,0.)).z();
+        BField = cBField;
         
         //Calculate theta, the of the helix projected into an SZ plane, from the z axis
         double px = mcp.getPX();
@@ -82,6 +85,15 @@
     
     }
     /**
+     * Calculates the B-Field from event
+     * @param mcpc
+     * @param eventc
+     */
+    public HelixParamCalculator(MCParticle mcpc,EventHeader eventc)
+    {
+        this(mcpc,eventc.getDetector().getFieldMap().getField(new BasicHep3Vector(0.,0.,0.)).z());
+    }
+    /**
      * Return the magneticfield at point 0,0,0
      * @return double BField
      */
CVSspam 0.2.8