Print

Print


Commit in lcsim/src/org/lcsim/event/util on MAIN
CheatParticleID.java+65added 1.1
UnknownParticleID.java+66added 1.1
+131
2 added files
Simple implementations of ParticleID to allow ReconstructedParticle work

lcsim/src/org/lcsim/event/util
CheatParticleID.java added at 1.1
diff -N CheatParticleID.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CheatParticleID.java	11 Feb 2007 13:01:55 -0000	1.1
@@ -0,0 +1,65 @@
+/*
+ * CheatParticleID.java
+ *
+ * Created on May 9, 2006, 9:04 AM
+ *
+ * To change this template, choose Tools | Options and locate the template under
+ * the Source Creation and Management node. Right-click the template and choose
+ * Open. You can then make changes to the template in the Source Editor.
+ */
+
+package org.lcsim.event.util;
+
+/**
+ *
+ * @author cassell
+ */
+import org.lcsim.event.ParticleID;
+public class CheatParticleID implements ParticleID
+{
+    int pdg;
+    /** Creates a new instance of CheatParticleID */
+    public CheatParticleID(int id)
+    {
+        pdg = id;
+    }
+   /** Type - userdefined.
+    */
+   public int getType()
+   {
+        return 0;
+   }
+   
+   /** The PDG code of this id - UnknownPDG ( 999999 ) if unknown.
+    */
+   public int getPDG()
+   {
+       return pdg;
+   }
+   
+   /**The likelihood  of this hypothesis - in a user defined normalization.
+    */
+   public double getLikelihood()
+   {
+       return 0.;
+   }
+   
+   /** 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()
+   {
+       double[] result = new double[1];
+       result[0] = 0.;
+       return result;
+   }
+    
+}

lcsim/src/org/lcsim/event/util
UnknownParticleID.java added at 1.1
diff -N UnknownParticleID.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ UnknownParticleID.java	11 Feb 2007 13:01:55 -0000	1.1
@@ -0,0 +1,66 @@
+/*
+ * UnknownParticleID.java
+ *
+ * Created on May 8, 2006, 8:00 AM
+ *
+ * To change this template, choose Tools | Options and locate the template under
+ * the Source Creation and Management node. Right-click the template and choose
+ * Open. You can then make changes to the template in the Source Editor.
+ */
+
+package org.lcsim.event.util;
+
+/**
+ *
+ * @author cassell
+ */
+import org.lcsim.event.ParticleID;
+public class UnknownParticleID implements ParticleID
+{
+    int pdg;
+    
+    /** Creates a new instance of UnknownParticleID */
+    public UnknownParticleID()
+    {
+        pdg = ParticleID.UnknownPDG;
+    }
+   /** Type - userdefined.
+    */
+   public int getType()
+   {
+        return 0;
+   }
+   
+   /** The PDG code of this id - UnknownPDG ( 999999 ) if unknown.
+    */
+   public int getPDG()
+   {
+       return pdg;
+   }
+   
+   /**The likelihood  of this hypothesis - in a user defined normalization.
+    */
+   public double getLikelihood()
+   {
+       return 0.;
+   }
+   
+   /** 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()
+   {
+       double[] result = new double[1];
+       result[0] = 0.;
+       return result;
+   }
+    
+}
CVSspam 0.2.8