Print

Print


Commit in lcsim/src/org/lcsim/mc/fast/tracking on MAIN
DocaTrackParameters.java+8-71.3 -> 1.4
MCFastTracking.java-11.6 -> 1.7
+8-8
2 modified files
Correct fast mc tracking to use mm instead of cm.
Note: We need to check if smearing parameters generated by Bruce Schumm are dimensionless. I suspect not, in which case the smearing is probably all wrong.

lcsim/src/org/lcsim/mc/fast/tracking
DocaTrackParameters.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- DocaTrackParameters.java	14 Mar 2005 16:11:32 -0000	1.3
+++ DocaTrackParameters.java	20 Aug 2005 19:15:03 -0000	1.4
@@ -7,6 +7,7 @@
 import hep.physics.vec.BasicHep3Vector;
 import hep.physics.vec.Hep3Vector;
 import hep.physics.vec.VecOp;
+import org.lcsim.constants.Constants;
 
 
 /**
@@ -14,7 +15,7 @@
  * with a MC truth particle. <br>
  *
  * @author  Tony Johnson, Wolfgang Walkowiak
- * @version $Id: DocaTrackParameters.java,v 1.3 2005/03/14 16:11:32 tonyj Exp $
+ * @version $Id: DocaTrackParameters.java,v 1.4 2005/08/20 19:15:03 tonyj Exp $
  */
 class DocaTrackParameters implements TrackParameters
 {
@@ -428,7 +429,7 @@
       int iq = getUnitCharge();
 
       double phi = phi0 + (omega * l);
-      double pt = (-iq * m_Bz) / (333.567 * omega);
+      double pt = Constants.fieldConversion * iq * m_Bz / omega;
 
       double px = pt * Math.cos(phi);
       double py = pt * Math.sin(phi);
@@ -478,7 +479,7 @@
       double z0 = m_parm[3];
       double tanl = m_parm[4];
 
-      double phi = phi0 + (omega * l);
+      double phi = phi0 + omega;
       double rho = 1 / omega;
 
       double x = (rho * Math.sin(phi)) - ((rho + d0) * Math.sin(phi0));
@@ -495,7 +496,7 @@
    {
       if (m_parm[2] != 0.)
       {
-         return Math.abs(m_Bz / (333.567 * m_parm[2]));
+         return Math.abs(Constants.fieldConversion * m_Bz / m_parm[2]);
       }
       else
       {
@@ -521,7 +522,7 @@
       double rho = 1. / getOmega();
       double phi = getPhi0() + (getOmega() * l);
       double tanl = getTanL();
-      double c = Math.abs(m_Bz) / 333.567;
+      double c = Constants.fieldConversion * Math.abs(m_Bz);
       double sphi = Math.sin(phi);
       double cphi = Math.cos(phi);
 
@@ -634,7 +635,7 @@
          phi0 += (2 * Math.PI);
       }
 
-      double omega = (-iq * m_Bz) / (333.567 * pt);
+      double omega = Constants.fieldConversion * iq * m_Bz / pt;
       double tanl = pdoca.z() / pt;
       double z0 = xdoca.z();
 
@@ -670,7 +671,7 @@
       int iq = (int) (charge / Math.abs(charge));
       double pt = Math.sqrt((momentum.x() * momentum.x()) + (momentum.y() * momentum.y()));
       double tanl = momentum.z() / pt;
-      double rho = (333.567 * pt) / m_Bz;
+      double rho = pt / (m_Bz * Constants.fieldConversion);
 
       BasicHep3Vector xdoca;
       Hep3Vector pdoca;

lcsim/src/org/lcsim/mc/fast/tracking
MCFastTracking.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- MCFastTracking.java	9 Aug 2005 18:34:45 -0000	1.6
+++ MCFastTracking.java	20 Aug 2005 19:15:03 -0000	1.7
@@ -102,7 +102,6 @@
          }
          
          double[] momentum = p.getMomentum().v();
-         double E = p.getEnergy();
          double pt2 = (momentum[0] * momentum[0]) + (momentum[1] * momentum[1]);
          double pt = Math.sqrt(pt2);
          double ptot = Math.sqrt(pt2 + (momentum[2] * momentum[2]));
CVSspam 0.2.8