Commit in SlicDiagnostics/src/org/lcsim/slic/diagnostics on MAIN
CalorimeterHitPlots.java+26-61.15 -> 1.16
Added two new cheater cluster plots: # hits in cluster and maxHitE / clusterE

SlicDiagnostics/src/org/lcsim/slic/diagnostics
CalorimeterHitPlots.java 1.15 -> 1.16
diff -u -r1.15 -r1.16
--- CalorimeterHitPlots.java	29 Sep 2005 21:43:31 -0000	1.15
+++ CalorimeterHitPlots.java	6 Oct 2005 01:42:36 -0000	1.16
@@ -9,6 +9,7 @@
 import java.util.Map;
 import hep.aida.ICloud1D;
 import hep.aida.ICloud2D;
+import org.lcsim.event.CalorimeterHit;
 import org.lcsim.event.EventHeader;
 import org.lcsim.event.EventHeader.LCMetaData;
 import org.lcsim.event.SimCalorimeterHit;
@@ -40,6 +41,8 @@
     ICloud2D hitRawVsCorrectedEnergy;
     ICloud1D mcpMissing;
     ICloud2D mcpCluster;
+    ICloud1D clusterHitCount;
+    ICloud1D clusterHitMaxE;
     
     String collName;
     
@@ -126,6 +129,8 @@
         hitRawVsCorrectedEnergy = aida.cloud2D(makePlotName("Hit Raw vs Corrected Energy"));
         mcpMissing              = aida.cloud1D(makePlotName("Missing MCParticle Contribution"));
         mcpCluster              = aida.cloud2D(makePlotName("Particle Kinetic Energy vs CheatCluster Energy"));
+        clusterHitCount         = aida.cloud1D(makePlotName("Hit Count in a Single Cluster"));
+        clusterHitMaxE          = aida.cloud1D(makePlotName("Maximum Single Cell Energy in a Cluster Divided by Total Cluster Energy"));
     }
     
     protected void fill(EventHeader event)
@@ -200,16 +205,31 @@
             /* cheated clusters */
             if ( haveSF )
             {
-                if (clusterCount < 9000)
+                Map<MCParticle, CheatCluster> cheatClusters = clusterer.findClusters(hits);
+                for( MCParticle particle : cheatClusters.keySet() )
                 {
-                    Map<MCParticle, CheatCluster> cheatClusters = clusterer.findClusters(hits);
-                    for( MCParticle particle : cheatClusters.keySet() )
+                    CheatCluster cluster = cheatClusters.get(particle);
+                    double kE = particle.getEnergy() - particle.getMass();
+                    if (clusterCount < 9000)
                     {
-                        CheatCluster cluster = cheatClusters.get(particle);
-                        double kE = particle.getEnergy() - particle.getMass();
-                        mcpCluster.fill(kE, cluster.getEnergy());
+                        mcpCluster.fill(kE, cluster.getEnergy());                    
                         clusterCount += 1;
                     }
+                    
+                    /* cluster hit count */
+                    clusterHitCount.fill(cluster.getCalorimeterHits().size());
+                    
+                    /* max cell E / cluster E */
+                    double maxCellE = 0;                    
+                    for (CalorimeterHit chit : cluster.getCalorimeterHits() )
+                    {
+                        SimCalorimeterHit simHit = (SimCalorimeterHit)chit;
+                        if ( simHit.getCorrectedEnergy() > maxCellE )
+                        {
+                            maxCellE = simHit.getCorrectedEnergy();
+                        }
+                    }
+                    clusterHitMaxE.fill(maxCellE / cluster.getEnergy());
                 }
             }
         }
CVSspam 0.2.8