lcsim/src/org/lcsim/fit/helicaltrack
diff -u -r1.1 -r1.2
--- HelixParamCalculator.java 7 Jul 2008 18:44:21 -0000 1.1
+++ HelixParamCalculator.java 7 Jul 2008 23:03:55 -0000 1.2
@@ -27,8 +27,9 @@
mcdca -- MC distance of closest approach
mcphi0 --azimuthal angle
tanL -- Slope SZ plane ds/dz
+ arclength --arclength of he helix
*/
- private double xc,yc,mcdca,mcphi0,tanL;
+ private double xc,yc,mcdca,mcphi0,tanL,arclength;
public HelixParamCalculator(MCParticle mcpc,EventHeader eventc)
{
@@ -74,6 +75,11 @@
{
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);
+ arclength = (((mcp.getOriginX()-x0)*Math.cos(mcphi0))+((mcp.getOriginY()-y0)*Math.sin(mcphi0)));
+
}
/**
* Return the magneticfield at point 0,0,0
@@ -159,6 +165,14 @@
double s = (((mcp.getOriginX()-x0)*Math.cos(mcphi0))+((mcp.getOriginY()-y0)*Math.sin(mcphi0)));
return mcp.getOriginZ()-(s*tanL);
}
+ /**
+ * Return the arclength of the helix
+ * @return double arclength
+ */
+ public double getArcLength()
+ {
+ return arclength;
+ }
}