lcsim/src/org/lcsim/util/lcio
diff -u -r1.4 -r1.5
--- SIOSimCalorimeterHit.java 2 Aug 2005 17:18:06 -0000 1.4
+++ SIOSimCalorimeterHit.java 20 Jan 2006 23:45:23 -0000 1.5
@@ -14,16 +14,33 @@
/**
*
* @author Tony Johnson
- * @version $Id: SIOSimCalorimeterHit.java,v 1.4 2005/08/02 17:18:06 tonyj Exp $
+ * @version $Id: SIOSimCalorimeterHit.java,v 1.5 2006/01/20 23:45:23 lima Exp $
*/
-class SIOSimCalorimeterHit extends BaseCalorimeterHit implements SimCalorimeterHit
+public class SIOSimCalorimeterHit extends BaseCalorimeterHit implements SimCalorimeterHit
{
- private int nContributions;
- private Object[] particle;
- private float[] energyContrib;
- private float[] time;
- private int[] pdg;
-
+ protected int nContributions;
+ protected Object[] particle;
+ protected float[] energyContrib;
+ protected float[] time;
+ protected int[] pdg;
+
+ // useful constructor for new SimCalHits
+ public SIOSimCalorimeterHit(long _id, double _rawE, double _time, Object[] mcparts, float[] energies, float[] times, int[] pdgs)
+ {
+ nContributions = mcparts.length;
+ particle = mcparts;
+ energyContrib = energies;
+ time = times;
+ pdg = pdgs;
+
+ // update fields from base class
+ super.id = _id;
+ super.rawEnergy = _rawE;
+ super.time = _time;
+ super.position = null;
+ }
+
+ // constructor from LCIO data file
SIOSimCalorimeterHit(SIOInputStream in, int flags, int version, LCMetaData meta) throws IOException
{
this.data = meta;