Commit in lcsim/src/org/lcsim/event/util on MAIN
CreateFinalStateMCParticleList.java+27-51.6 -> 1.7
Add logic to let stdhep files work correctly

lcsim/src/org/lcsim/event/util
CreateFinalStateMCParticleList.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- CreateFinalStateMCParticleList.java	8 Nov 2007 23:17:33 -0000	1.6
+++ CreateFinalStateMCParticleList.java	8 Oct 2008 18:36:39 -0000	1.7
@@ -16,7 +16,7 @@
  * interactions beyond a radius or z position can be ignored by using the setRadiusCut and setZCut
  * methods. The collection name of the final state particles can also be set.
  * @author Ron Cassell
- * @version $Id: CreateFinalStateMCParticleList.java,v 1.6 2007/11/08 23:17:33 cassell Exp $
+ * @version $Id: CreateFinalStateMCParticleList.java,v 1.7 2008/10/08 18:36:39 cassell Exp $
  */
 public class CreateFinalStateMCParticleList extends Driver
 {
@@ -131,12 +131,34 @@
 //
         if(itype == 0)
         {
+            boolean simulated = false;
             for(MCParticle p:all)
             {
-                if(cl.getClassification(p) == fs)
-                {
-                    fslist.add(p);
-                }
+               if(p.getSimulatorStatus().isDecayedInTracker() ||
+                  p.getSimulatorStatus().isDecayedInCalorimeter() ||
+                  p.getSimulatorStatus().hasLeftDetector() ||
+                  p.getSimulatorStatus().isStopped())
+               {
+                  simulated = true;
+                  continue;
+               }
+            }
+            if(!simulated)
+            {
+               for(MCParticle p:all)
+               {
+                  if(p.getGeneratorStatus() == MCParticle.FINAL_STATE)fslist.add(p);
+               }
+            }
+            else
+            {
+               for(MCParticle p:all)
+               {
+                   if(cl.getClassification(p) == fs)
+                   {
+                       fslist.add(p);
+                   }
+               }
             }
         }
 //
CVSspam 0.2.8