lcsim/src/org/lcsim/event/base
diff -u -r1.9 -r1.10
--- BaseCalorimeterHit.java 4 May 2010 17:48:24 -0000 1.9
+++ BaseCalorimeterHit.java 5 May 2010 15:53:07 -0000 1.10
@@ -15,7 +15,7 @@
*/
public abstract class BaseCalorimeterHit extends BaseHitWithPosition implements CalorimeterHit
{
- protected double rawEnergy;
+ protected double rawEnergy = UNSET_CORRECTED_ENERGY;
protected double corrEnergy = UNSET_CORRECTED_ENERGY;
protected double[] position;
protected Hep3Vector positionVec;
@@ -37,6 +37,10 @@
public double getRawEnergy()
{
+ if( rawEnergy == UNSET_CORRECTED_ENERGY)
+ {
+ throw new RuntimeException("No raw energy available for CalorimeterHit");
+ }
return rawEnergy;
}