Print

Print


Commit in lcsim/src/org/lcsim/recon/pfa/identifier on MAIN
LocalHelixExtrapolator.java+201.3 -> 1.4
MJC: One more routine for HCAL extrapolation

lcsim/src/org/lcsim/recon/pfa/identifier
LocalHelixExtrapolator.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- LocalHelixExtrapolator.java	20 Jun 2008 18:53:10 -0000	1.3
+++ LocalHelixExtrapolator.java	20 Jun 2008 18:59:02 -0000	1.4
@@ -347,6 +347,26 @@
 	}
     }
 
+    public Long extendToHCALLayerAndFindCell(int layer) {
+	Hep3Vector point = extendToHCALLayer(layer);
+	IDDecoder id = null;
+	if (m_barrelValid) {
+	    id = m_event.getDetector().getDecoder("HcalBarrHits");
+	    if (id == null) { throw new AssertionError("Failed to find barrel ID"); }
+	} else if (m_endcapValid) {
+	    id = m_event.getDetector().getDecoder("HcalEndcapHits");
+	    if (id == null) { throw new AssertionError("Failed to find endcap ID"); }
+	}
+	if (id != null) {
+	    long cell = id.findCellContainingXYZ(point);
+	    id.setID(cell);
+	    Hep3Vector cellCenter = id.getPositionVector();
+	    return new Long(cell);
+	} else {
+	    return null;
+	}
+    }
+
     /** Assumes extrapolation has already been done. */
     public Hep3Vector getTangent() {
 	double dphi = 0.01;
CVSspam 0.2.8