lcsim/src/org/lcsim/recon/pfa/identifier
diff -u -r1.7 -r1.8
--- LocalHelixExtrapolator.java 25 Jul 2008 23:00:21 -0000 1.7
+++ LocalHelixExtrapolator.java 27 Jul 2008 05:59:52 -0000 1.8
@@ -382,21 +382,26 @@
double x0 = v.x();
double y0 = v.y();
- double phi0 = Math.atan2(y0-m_trackParam_xc, x0-m_trackParam_yc); // in the range -pi through +pi
-
- boolean _debug =false;
+ double z0 = v.z();
+
+ double phi0 = Math.atan2(y0-m_trackParam_yc, x0-m_trackParam_xc); // in the range -pi through +pi
+
+ boolean _debug = true;
if(_debug){
Hep3Vector P = new BasicHep3Vector(tr.getMomentum());
+ System.out.println("Center of radius= " + m_trackParam_xc + " " + m_trackParam_yc);
+ System.out.println("This position= " + x0 + " " + y0 + " " + z0);
+ System.out.println("phi at this point= " + phi0);
Double pT = Math.sqrt(P.x()*P.x()+P.y()*P.y());
- Hep3Vector ip = new BasicHep3Vector();
double zField = m_event.getDetector().getFieldMap().getField(P).z();
double r = 1000*pT/(0.3*zField);
-
System.out.println("R from track = " + m_trackParam_radius);
System.out.println("R from p/0.3B= " + r + " magnetic field= " + zField);
- System.out.println("Charge: " + tr.getCharge());
- if(m_track_dphi_negative) System.out.println("T");
- else System.out.println("F");
+ }
+
+ if(m_track_dphi_negative && tr.getCharge() < 0) {
+ System.out.println("Error: rotational direction is wrong");
+ System.out.println("Charge is negative but it is determined to turn clockwise");
}
double dphi = 0.01;