Print

Print


Commit in lcsim/src/org/lcsim/fit/helicaltrack on MAIN
HelixParamCalculator.java+24-91.2 -> 1.3
Added a method to return x0,y0 and corrected some comments on specifcally what the method returned

lcsim/src/org/lcsim/fit/helicaltrack
HelixParamCalculator.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- HelixParamCalculator.java	7 Jul 2008 23:03:55 -0000	1.2
+++ HelixParamCalculator.java	10 Jul 2008 17:17:06 -0000	1.3
@@ -20,17 +20,17 @@
 
     MCParticle mcp;
     EventHeader event;
-    private double R,BField,theta;
+    private double R,BField,theta,arclength;
     //Some varibles are usesd in other calculations, thus they are global
     /*
     xc, yc --coordinates
     mcdca -- MC distance of closest approach 
     mcphi0 --azimuthal angle
     tanL -- Slope SZ plane ds/dz
-    arclength --arclength of he helix 
+    x0,y0 are the position of the particle at the dca
     */
-    private double xc,yc,mcdca,mcphi0,tanL,arclength;
-    
+    private double xc,yc,mcdca,mcphi0,tanL;
+    private double x0,y0;
     public HelixParamCalculator(MCParticle mcpc,EventHeader eventc)
     {
         //mc and event global varibles used for calculation
@@ -76,8 +76,8 @@
                 mcphi0 += 2*Math.PI;
             }
         //z0 Calculation, z position of the particle at dca
-        double x0 = -mcdca*Math.sin(mcphi0);
-        double y0 = mcdca*Math.sin(mcphi0);
+        x0 = -mcdca*Math.sin(mcphi0);
+        y0 = mcdca*Math.sin(mcphi0);
         arclength  = (((mcp.getOriginX()-x0)*Math.cos(mcphi0))+((mcp.getOriginY()-y0)*Math.sin(mcphi0)));
     
     }
@@ -90,7 +90,7 @@
         return BField;
     }
     /**
-     * Return the radius of the track
+     * Return the radius of the Helix track
      * @return double R
      */
     public double getRadius()
@@ -166,13 +166,28 @@
         return mcp.getOriginZ()-(s*tanL);
     }
     /**
-     * Return the arclength of the helix
+     * Return the arclength of the helix from the ORIGIN TO THE DCA
      * @return double arclength
      */
     public double getArcLength()
     {
         return arclength;
     }
-   
+    /**
+     * Return the x position of the particle when at the dca
+     * @return double arclength
+     */
+    public double getX0()
+    {
+        return x0;
+    }
+    /**
+     * Return the y position of the particle at the dca
+     * @return double arclength
+     */
+    public double getY0()
+    {
+        return y0;
+    }
     
 }
CVSspam 0.2.8