lcsim/src/org/lcsim/event/base
diff -N BaseVertex.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ BaseVertex.java 25 Sep 2007 18:58:16 -0000 1.1
@@ -0,0 +1,134 @@
+/*
+ * BaseVertex.java
+ *
+ * Created on September 20, 2007, 6:32 AM
+ *
+ * $Id: BaseVertex.java,v 1.1 2007/09/25 18:58:16 ngraf Exp $
+ */
+
+package org.lcsim.event.base;
+
+import hep.physics.matrix.SymmetricMatrix;
+import hep.physics.vec.BasicHep3Vector;
+import hep.physics.vec.Hep3Vector;
+import java.util.Map;
+import org.lcsim.event.ReconstructedParticle;
+import org.lcsim.event.Vertex;
+
+/**
+ *
+ * @author Norman Graf
+ */
+public class BaseVertex implements Vertex
+{
+ protected boolean _isPrimary ;
+ protected String _type ;
+ protected double _chi2 ;
+ protected double _probability ;
+ protected SymmetricMatrix _covarianceMatrix;
+ protected Hep3Vector _position;
+ protected ReconstructedParticle _aParticle ;
+
+
+ /** Creates a new instance of BaseVertex */
+ // TODO decide whether to allow default constructor and setters, or limit to a fully qualified constructor.
+// public BaseVertex()
+// {
+// }
+//
+ public BaseVertex(boolean isPrimary, String type, double chi2, double prob, SymmetricMatrix cov, Hep3Vector pos, ReconstructedParticle rp)
+ {
+ _isPrimary = isPrimary;
+ _type = type;
+ _chi2 = chi2;
+ _probability = prob;
+ _covarianceMatrix = cov;
+ _position = pos;
+ _aParticle = rp;
+ }
+
+ public double getProbability()
+ {
+ return _probability;
+ }
+
+ public ReconstructedParticle getAssociatedParticle()
+ {
+ return _aParticle;
+ }
+
+ public Map<String, Double> getParameters()
+ {
+ return null;
+ }
+
+ public Hep3Vector getPosition()
+ {
+ return _position;
+ }
+
+ public String getAlgorithmType()
+ {
+ return _type;
+ }
+
+ public String toString()
+ {
+ String retValue;
+
+ retValue = super.toString();
+ return retValue;
+ }
+
+ public SymmetricMatrix getCovMatrix()
+ {
+ return _covarianceMatrix;
+ }
+
+ public boolean isPrimary()
+ {
+ return _isPrimary;
+ }
+
+ public double getChi2()
+ {
+ return _chi2;
+ }
+
+ // setters
+ // TODO decide whether to allow separate setters.
+// public void setPrimary( boolean primary )
+// {
+// _isPrimary = primary;
+// }
+// //public void setAlgorithmType( int type ) ;
+// public void setAlgorithmType( String type )
+// {
+// _type = type;
+// }
+// public void setChi2( double chi2 )
+// {
+// _chi2 = chi2;
+// }
+// public void setProbability( double probability )
+// {
+// _probability = probability;
+// }
+// public void setPosition( Hep3Vector position )
+// {
+// _position = position;
+// }
+// public void setPosition( double x, double y, double z )
+// {
+// _position = new BasicHep3Vector(x, y, z);
+// }
+// public void setCovMatrix( SymmetricMatrix cov )
+// {
+// _covarianceMatrix = cov;
+// }
+//
+// public void setAssociatedParticle( ReconstructedParticle rp )
+// {
+// _aParticle = rp;
+// }
+}
\ No newline at end of file