Commit in lcsim/src/org/lcsim/contrib/uiowa on MAIN
MIPReassignmentAlgorithm.java+10-111.4 -> 1.5
Null point error fixed

lcsim/src/org/lcsim/contrib/uiowa
MIPReassignmentAlgorithm.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- MIPReassignmentAlgorithm.java	10 Jul 2008 20:35:54 -0000	1.4
+++ MIPReassignmentAlgorithm.java	11 Jul 2008 16:41:52 -0000	1.5
@@ -74,17 +74,6 @@
 
 		BasicCluster newmip = m_newMapMIP.get(tr);
 		List<Hep3Vector> lastTwoPositions = new ArrayList<Hep3Vector>();
-        for(int i=0; i<2 ; i++){
-		    CalorimeterHit hit = newmip.getCalorimeterHits().get(newmip.getCalorimeterHits().size()-1-i);
-			IDDecoder id = hit.getIDDecoder();
-        	id.setID(hit.getCellID());
-        	double x = id.getPosition()[0];
-        	double y = id.getPosition()[1];
-        	double z = id.getPosition()[2];
-        	Hep3Vector v = new BasicHep3Vector(x,y,z);
-			lastTwoPositions.add(v);
-		}
-		
 
 		if(newmip.getCalorimeterHits().size() < 5 || newmip == null){ //These is no mip close to track.
     		if (interceptPoint != null) {
@@ -95,6 +84,16 @@
 				displacementUnit = VecOp.unit(displacement);
 			}
 		}else{ //There is a mip attached to track.
+			for(int i=0; i<2 ; i++){
+				CalorimeterHit hit = newmip.getCalorimeterHits().get(newmip.getCalorimeterHits().size()-1-i);
+				IDDecoder id = hit.getIDDecoder();
+				id.setID(hit.getCellID());
+				double x = id.getPosition()[0];
+				double y = id.getPosition()[1];
+				double z = id.getPosition()[2];
+				Hep3Vector v = new BasicHep3Vector(x,y,z);
+				lastTwoPositions.add(v);
+			}
 			Hep3Vector last0pos =  lastTwoPositions.get(0);
 			Hep3Vector last1pos =  lastTwoPositions.get(1);
 		
CVSspam 0.2.8