Commit in lcsim/src/org/lcsim/recon/cheater on MAIN
CheatParticleID.java+59added 1.1
Initial

lcsim/src/org/lcsim/recon/cheater
CheatParticleID.java added at 1.1
diff -N CheatParticleID.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CheatParticleID.java	26 Sep 2005 22:47:02 -0000	1.1
@@ -0,0 +1,59 @@
+/* CheatParticleID.java
+ *
+ */
+
+package org.lcsim.recon.cheater;
+
+import hep.physics.particle.properties.ParticleType;
+import org.lcsim.event.ParticleID;
+
+/**
+ * An implementation of ParticleID appropriate for Cheater event reconstruction.
+ * @author M.Ronan
+ */
+public class CheatParticleID implements ParticleID
+{
+    private ParticleType _type;
+    /** Creates a new instance of CheatParticleID */
+    public CheatParticleID(ParticleType type)
+    {
+        _type = type;
+    }
+    
+    /** Type - defined to be the pdgId.
+     */
+    public int getType()
+    {
+        return _type.getPDGID();
+    }
+    
+    /** The PDG code of this id - UnknownPDG ( 999999 ) if unknown.
+     */
+    public int getPDG()
+    {
+        return _type.getPDGID();
+    }
+    
+    /**The likelihood  of this hypothesis - in a user defined normalization.
+     */
+    public double getLikelihood()
+    {
+        return 1.;
+    }
+    
+    /** Type of the algorithm/module that created this hypothesis.
+     * Check/set collection parameters PIDAlgorithmTypeName and PIDAlgorithmTypeID.
+     */
+    public int getAlgorithmType()
+    {
+        return 0;
+    }
+    
+    /** Parameters associated with this hypothesis.
+     * Check/set collection paramter PIDParameterNames for decoding the indices.
+     */
+    public double[] getParameters()
+    {
+        return new double[1];
+    }
+}
CVSspam 0.2.8