Print

Print


Commit in lcsim/src/org/lcsim/mc/fast/cluster/ronan on MAIN
MCFastRonan.java+25-31.13 -> 1.14
Allow setting of FS particle list

lcsim/src/org/lcsim/mc/fast/cluster/ronan
MCFastRonan.java 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- MCFastRonan.java	30 Aug 2007 19:40:22 -0000	1.13
+++ MCFastRonan.java	8 Oct 2008 18:38:05 -0000	1.14
@@ -35,12 +35,31 @@
     private final static int Neutralino2 = 1000023;
     private final static int Neutralino3 = 1000025;
     private final static int Neutralino4 = 1000035;
+    private boolean defaultMC = true;
+    private String fsname;
     
 
     private ClusterResolutionTables clusterParm;
+   public void setFSList(String fslist)
+   {
+       fsname = fslist;
+       defaultMC = false;
+   }
     
     protected void process(EventHeader event)
     {
+      if(defaultMC)
+      {
+          fsname = "MCParticle";
+      }
+      else
+      {
+          if(!event.hasCollection(MCParticle.class,fsname))
+          {
+              System.err.println("Collection "+fsname+" not found. Default Final State particles being used");
+              fsname = "MCParticle";
+          }
+      }
         if (clusterParm == null)
         {
             ConditionsSet conditions = getConditionsManager().getConditions("ClusterParameters");
@@ -52,14 +71,17 @@
 
         boolean hist = getHistogramLevel() > 0;
         
-        List<MCParticle> particles = event.getMCParticles();
+        List<MCParticle> particles = event.get(MCParticle.class,fsname);
         for (MCParticle p : particles)
         {
             
             // filter for FINALSTATE
-            if (p.getGeneratorStatus() != p.FINAL_STATE)
+            if(defaultMC)
             {
-                continue;
+               if (p.getGeneratorStatus() != p.FINAL_STATE)
+               {
+                   continue;
+               }
             }
             
             int PDGID = p.getPDGID();
CVSspam 0.2.8