if ((flag & (1 << LCIOConstants.CLBIT_HITS)) != 0)
{
List<CalorimeterHit> calorimeterHits = cluster.getCalorimeterHits();
double[] hitContributions = cluster.getHitContributions();
out.writeInt(calorimeterHits.size());
int ii = 0;
for (CalorimeterHit hit : calorimeterHits)
{
out.writePntr(hit);
out.writeFloat((float) hitContributions[ii++]); <——— this is where it breaks
}
}
The problem seems to be that the cluster.getHitContributions() has fewer entries than the cluster.getCalorimeterHits() for IC clusters;