lcsim/src/org/lcsim/event/base
diff -u -r1.2 -r1.3
--- BaseSimTrackerHit.java 15 May 2008 01:41:56 -0000 1.2
+++ BaseSimTrackerHit.java 15 May 2008 01:45:29 -0000 1.3
@@ -64,6 +64,8 @@
{
if (position == null)
throw new IllegalArgumentException("The position points to null!");
+ if (position.length != 3)
+ throw new IllegalArgumentException("The position array is of the wrong size!");
for (int i=0, n=this.position.length; i < n; i++)
{
this.position[i] = position[i];
@@ -71,6 +73,8 @@
if (momentum == null)
throw new IllegalArgumentException("The momentum points to null!");
+ if (momentum.length != 3)
+ throw new IllegalArgumentException("The momentum array is of the wrong size!");
for (int i=0, n=this.momentum.length; i < n; i++)
{
this.momentum[i] = momentum[i];