lcsim/src/org/lcsim/util/heprep
diff -u -r1.6 -r1.7
--- ReconstructedParticleConverterNew.java 13 Apr 2010 20:23:41 -0000 1.6
+++ ReconstructedParticleConverterNew.java 2 Jul 2012 20:35:43 -0000 1.7
@@ -110,20 +110,25 @@
for (Cluster cluster : collection)
{
- hits.addAll(cluster.getCalorimeterHits());
+ if (cluster.getCalorimeterHits().size() != 0) {
+ hits.addAll(cluster.getCalorimeterHits());
+ }
}
if (hits != null)
{
for (CalorimeterHit hit : hits)
{
- double[] pos = hit.getPosition();
- HepRepInstance instanceX = factory.createHepRepInstance(instanceC, type);
- instanceX.addAttValue("MarkSize", 5);
- instanceX.addAttValue("color", clusterColor);
- instanceX.addAttValue("showparentattributes", true);
- instanceX.addAttValue("pickparent", true);
- HepRepPoint pp = factory.createHepRepPoint(instanceX, pos[0], pos[1], pos[2]);
+ if (hit != null) {
+ double[] pos = hit.getPosition();
+ HepRepInstance instanceX = factory.createHepRepInstance(instanceC, type);
+ instanceX.addAttValue("MarkSize", 5);
+ instanceX.addAttValue("color", clusterColor);
+ instanceX.addAttValue("showparentattributes", true);
+ instanceX.addAttValue("pickparent", true);
+ //HepRepPoint pp =
+ factory.createHepRepPoint(instanceX, pos[0], pos[1], pos[2]);
+ }
}
}
}