Print

Print


Commit in lcsim/src/org/lcsim/mc/fast/reconstructedparticle on MAIN
MCFastParticleID.java+60added 1.1
Implementation of ParticleID for MCFast applications.

lcsim/src/org/lcsim/mc/fast/reconstructedparticle
MCFastParticleID.java added at 1.1
diff -N MCFastParticleID.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ MCFastParticleID.java	2 Jul 2005 06:42:49 -0000	1.1
@@ -0,0 +1,60 @@
+package org.lcsim.mc.fast.reconstructedparticle;
+
+import org.lcsim.event.ParticleID;
+import org.lcsim.particle.ParticleType;
+
+/**
+ * An implementation of ParticleID appropriate for the fast Monte Carlo
+ * @author ngraf
+ */
+public class MCFastParticleID implements ParticleID
+{
+    private ParticleType _type;
+    /** Creates a new instance of MCFastParticleID */
+    public MCFastParticleID(ParticleType type)
+    {
+        _type = type;
+    }
+    
+    /** Type - defined to be the pdgId.
+     */
+    public int getType()
+    {
+        return _type.pdgId();
+    }
+    
+    /** The PDG code of this id - UnknownPDG ( 999999 ) if unknown.
+     */
+    public int getPDG()
+    {
+        return _type.pdgId();
+    }
+    
+    /**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];
+    }
+    
+    /** Constant to be used if the PDG code is not known or undefined.
+     */
+    public final static int UnknownPDG = 999999;
+    
+}
CVSspam 0.2.8