lcsim/src/org/lcsim/event/base
diff -u -r1.3 -r1.4
--- BaseSimCalorimeterHit.java 23 May 2008 06:53:35 -0000 1.3
+++ BaseSimCalorimeterHit.java 23 May 2008 22:34:49 -0000 1.4
@@ -1,5 +1,7 @@
package org.lcsim.event.base;
+import hep.io.sio.SIORef;
+
import org.lcsim.event.MCParticle;
import org.lcsim.event.SimCalorimeterHit;
@@ -56,14 +58,13 @@
return t;
}
-
- // FIXME: This is included so that this class can be instantiated and so that
- // it has no dependency on the SIO package. But it is actually implemented
- // elsewhere (e.g. SIOSimCalorimeterHit).
+
public MCParticle getMCParticle(int index)
{
- throw new UnsupportedOperationException("This should be implemented elsewhere!");
- }
+ Object p = particle[index];
+ if (p instanceof SIORef) p = ((SIORef) p).getObject();
+ return (MCParticle) p;
+ }
public double getContributedEnergy(int index)
{