Commit in SlicDiagnostics/src/org/lcsim/slic/diagnostics on MAIN
CalorimeterHitPlots.java+60-591.26 -> 1.27
GenericHitPlots.java+57-141.32 -> 1.33
+117-73
2 modified files
JM: Change log10 plots back to regular scale

SlicDiagnostics/src/org/lcsim/slic/diagnostics
CalorimeterHitPlots.java 1.26 -> 1.27
diff -u -r1.26 -r1.27
--- CalorimeterHitPlots.java	21 Feb 2006 23:19:32 -0000	1.26
+++ CalorimeterHitPlots.java	16 Mar 2006 02:36:26 -0000	1.27
@@ -23,11 +23,11 @@
 import org.lcsim.geometry.subdetector.CylindricalEndcapCalorimeter;
 
 /**
- * A set of plots for SimCalorimeterHit collections.  
- * NOTE: Most plots on collections of SimCalorimeterHits are done by GenericHitPlots. 
- * 
+ * A set of plots for SimCalorimeterHit collections.
+ * NOTE: Most plots on collections of SimCalorimeterHits are done by GenericHitPlots.
+ *
  * @author jeremym
- * @version $Id: CalorimeterHitPlots.java,v 1.26 2006/02/21 23:19:32 jeremy Exp $
+ * @version $Id: CalorimeterHitPlots.java,v 1.27 2006/03/16 02:36:26 jeremy Exp $
  */
 class CalorimeterHitPlots extends AbstractPlots
 {
@@ -37,20 +37,20 @@
     ICloud1D _mcpSingleContribPDG;
     ICloud1D _hitCorrectedEnergy;
     ICloud2D _hitRawVsCorrectedEnergy;
-    ICloud1D _mcpMissing;    
-    
+    ICloud1D _mcpMissing;
+
     // Type of segmentation
     SegmentationType _segmentationType = SegmentationType.NONE;
-    
+
     // SegmentationPlots
     SegmentationPlots _segmentationPlots;
-    
+
     /** An enumerated type representing the possible readout segmentations for a CalorimeterHit collection. */
     enum SegmentationType
     {
         NONE, PRJ_CYL, PRJ_Z, NP_CYL, GRID_XY, GRID_XZ
     };
-        
+
     public CalorimeterHitPlots(LCMetaData meta)
     {
         super("CalorimeterHits", meta);
@@ -58,60 +58,60 @@
         setSegmentationType(meta);
         setupSegmentationPlots();
     }
-    
+
     protected void definePlots()
     {
         super.definePlots();
-        
+
         _mcpCountPerHit = aida().cloud1D("MCParticle: Number of MCParticle Contributions per Hit");
         _mcpCountPerHit.annotation().addItem("xAxisLabel","Number of MCParticle Contributions");
         _mcpCountPerHit.annotation().addItem("yAxisLabel","Number of Hits");
-        
+
         _mcpPDG = aida().cloud1D("MCParticle: PDGID");
         _mcpPDG.annotation().addItem("xAxisLabel","PDGID of MCParticle Contribution");
         _mcpPDG.annotation().addItem("yAxisLabel","Number of Hits");
-        
+
         _mcpSingleContribPDG     = aida().cloud1D("MCParticle: Single Contribution PDGID");
         _mcpSingleContribPDG.annotation().addItem("xAxisLabel","PDGID of Single MCParticle Contribution");
         _mcpSingleContribPDG.annotation().addItem("yAxisLabel","Number of Hits");
-        
+
         _hitCorrectedEnergy = aida().cloud1D("Hit: Corrected Energy");
-        _hitCorrectedEnergy.annotation().addItem("xAxisLabel","Corrected Energy (log10(GeV))");
-        _hitCorrectedEnergy.annotation().addItem("yAxisLabel","Number of Hits");        
-        
+        _hitCorrectedEnergy.annotation().addItem("xAxisLabel","Corrected Energy (GeV)");
+        _hitCorrectedEnergy.annotation().addItem("yAxisLabel","Number of Hits");
+
         _hitRawVsCorrectedEnergy = aida().cloud2D("Hit: Raw vs Corrected Energy");
         _hitRawVsCorrectedEnergy.annotation().addItem("xAxisLabel","Raw Energy (GeV)");
-        _hitRawVsCorrectedEnergy.annotation().addItem("yAxisLabel","Corrected Energy (GeV)");        
-        
+        _hitRawVsCorrectedEnergy.annotation().addItem("yAxisLabel","Corrected Energy (GeV)");
+
         _mcpMissing = aida().cloud1D("MCParticle: Contribution Missing");
         _mcpMissing.annotation().addItem("xAxisLabel","Number of Hits Missing an MCParticle Contribution per Event");
         _mcpMissing.annotation().addItem("yAxisLabel","Number of Events");
     }
-    
+
     /** Set the segmentation type based on the LCMetaData. */
     private void setSegmentationType(LCMetaData meta)
     {
         IDDecoder decoder = meta.getIDDecoder();
         SegmentationBase segmentation = (SegmentationBase)decoder;
-        Subdetector detector = decoder.getSubdetector();        
-        
+        Subdetector detector = decoder.getSubdetector();
+
         if ( segmentation != null && detector != null )
         {
             if ( segmentation instanceof ProjectiveCylinder )
             {
                 _segmentationType = SegmentationType.PRJ_CYL;
             }
-            
+
             if ( segmentation instanceof ProjectiveZPlane )
             {
                 _segmentationType = SegmentationType.PRJ_Z;
             }
-            
+
             if ( segmentation instanceof NonprojectiveCylinder )
             {
                 _segmentationType = SegmentationType.NP_CYL;
             }
-            
+
             if ( segmentation instanceof GridXYZ )
             {
                 if ( detector instanceof AbstractTestBeam || detector instanceof CylindricalEndcapCalorimeter )
@@ -121,7 +121,7 @@
             }
         }
     }
-    
+
     private void setupSegmentationPlots()
     {
         if ( _segmentationType == SegmentationType.PRJ_CYL || _segmentationType == SegmentationType.PRJ_Z )
@@ -141,13 +141,13 @@
             _segmentationPlots = new GridXZPlots(this);
         }
     }
-        
+
     protected void fill(EventHeader event)
     {
         super.fill(event);
         fill(event.get(SimCalorimeterHit.class, getCollectionName() ));
     }
-    
+
     private void fill(List<SimCalorimeterHit> hits)
     {
         // Get corrected energy
@@ -160,7 +160,7 @@
         {
             haveSF = false;
         }
-        
+
         if ( hits.size() > 0 )
         {
             CalorimeterIDDecoder segmentation = (CalorimeterIDDecoder)getEventHeader().getMetaData(hits).getIDDecoder();
@@ -168,54 +168,55 @@
             for ( SimCalorimeterHit hit : hits)
             {
                 segmentation.setID(hit.getCellID());
-                
+
                 // Count number of hits missing an MCParticle contribution
                 if ( hit.getMCParticleCount() ==  0 )
                 {
                     mcpMissingCount += 1;
                 }
-                
+
                 // Plot the segmentation plots
                 if ( _segmentationPlots != null )
                 {
                     _segmentationPlots.fill(segmentation);
                 }
-                
+
 
                 if (haveSF)
                 {
                     // Plot corrected E
-                    _hitCorrectedEnergy.fill(log10(hit.getCorrectedEnergy()));
-                    
+                    //_hitCorrectedEnergy.fill(log10(hit.getCorrectedEnergy()));
+		    _hitCorrectedEnergy.fill(log10(hit.getCorrectedEnergy()));
+
                     // Plot raw vs corrected E
                     _hitRawVsCorrectedEnergy.fill(hit.getRawEnergy(), hit.getCorrectedEnergy());
                 }
-                
+
                 // MCParticle Plots
                 int nmcp = hit.getMCParticleCount();
                 _mcpCountPerHit.fill(nmcp);
-                
+
                 for ( int i=0; i < nmcp; i++)
                 {
                     MCParticle mcp = hit.getMCParticle(i);
                     int pdg = mcp.getPDGID();
-                    
+
                     // Plot MCParticle PDGID
                     _mcpPDG.fill(pdg);
                 }
-                
+
                 if (nmcp == 1)
                 {
                     // Plot PDGID of Single Contribution hit
                     _mcpSingleContribPDG.fill(hit.getMCParticle(0).getPDGID());
                 }
             }
-            
+
             // Plot missing MCParticle contribution count
-            _mcpMissing.fill(mcpMissingCount);            
+            _mcpMissing.fill(mcpMissingCount);
         }
     }
-    
+
     public abstract class SegmentationPlots
     {
         protected CalorimeterHitPlots plots;
@@ -225,30 +226,30 @@
         }
         abstract public void fill(CalorimeterIDDecoder segmentation);
     }
-    
+
     public class ProjectivePlots extends SegmentationPlots
     {
         ProjectivePlots(CalorimeterHitPlots plots)
         {
             super(plots);
         }
-        
+
         public void fill(CalorimeterIDDecoder segmentation)
         {
             cd();
-            
+
             // Plot phi vs phi bin
             aida().cloud2D("Hit: Phi vs Phi Bin").fill(
                     segmentation.getPhi(),
                     (double)segmentation.getValue("phi")
                     );
-            
+
             // Plot theta vs theta bin
             aida().cloud2D("Hit: Theta vs Theta Bin").fill(
                     segmentation.getTheta(),
                     (double)segmentation.getValue("theta")
                     );
-            
+
             // Plot phi bin vs theta bin
             aida().cloud2D("Hit: Phi Bin vs Theta Bin").fill(
                     (double)segmentation.getValue("phi"),
@@ -256,17 +257,17 @@
                     );
         }
     }
-    
+
     public class NonprojectiveCylinderPlots extends SegmentationPlots
     {
         NonprojectiveCylinderPlots(CalorimeterHitPlots plots)
         {
             super(plots);
         }
-        
+
         public void fill(CalorimeterIDDecoder segmentation)
         {
-            
+
             // Plot phi vs phi bin
             aida().cloud2D("Hit: Phi vs Phi Bin").fill(
                     segmentation.getPhi(),
@@ -278,7 +279,7 @@
                     segmentation.getZ(),
                     (double)segmentation.getValue("z")
                     );
-            
+
             // Plot phi bin vs Z bin
             aida().cloud2D("Hit: Phi Bin vs Z Bin").fill(
                     (double)segmentation.getValue("phi"),
@@ -286,14 +287,14 @@
                     );
         }
     }
-    
+
     public class GridXYPlots extends SegmentationPlots
     {
         GridXYPlots(CalorimeterHitPlots plots)
         {
             super(plots);
         }
-        
+
         public void fill(CalorimeterIDDecoder segmentation)
         {
             // Plot X vs X bin
@@ -307,7 +308,7 @@
                     segmentation.getZ(),
                     (double)segmentation.getValue("y")
                     );
-            
+
             // Plot X bin vs Y bin
             aida().cloud2D("Hit: X Bin vs Y Bin").fill(
                     (double)segmentation.getValue("x"),
@@ -315,14 +316,14 @@
                     );
         }
     }
-    
+
     public class GridXZPlots extends SegmentationPlots
     {
         GridXZPlots(CalorimeterHitPlots plots)
         {
             super(plots);
         }
-        
+
         public void fill(CalorimeterIDDecoder segmentation)
         {
             // Plot X vs X bin
@@ -330,18 +331,18 @@
                     segmentation.getX(),
                     (double)segmentation.getValue("x")
                     );
-            
+
             // Plot Z vs Z bin
             aida().cloud2D("Hit: Z vs Z Bin").fill(
                     segmentation.getZ(),
                     (double)segmentation.getValue("z")
                     );
-            
+
             // Plot X bin vs Z bin
             aida().cloud2D("Hit: X Bin vs Z Bin").fill(
                     (double)segmentation.getValue("x"),
                     (double)segmentation.getValue("z")
                     );
         }
-    }    
-}
\ No newline at end of file
+    }
+}

SlicDiagnostics/src/org/lcsim/slic/diagnostics
GenericHitPlots.java 1.32 -> 1.33
diff -u -r1.32 -r1.33
--- GenericHitPlots.java	21 Feb 2006 23:19:32 -0000	1.32
+++ GenericHitPlots.java	16 Mar 2006 02:36:26 -0000	1.33
@@ -23,7 +23,7 @@
  * subdetector.
  * 
  * @author jeremym
- * @version $Id: GenericHitPlots.java,v 1.32 2006/02/21 23:19:32 jeremy Exp $
+ * @version $Id: GenericHitPlots.java,v 1.33 2006/03/16 02:36:26 jeremy Exp $
  */
 class GenericHitPlots extends AbstractPlots
 {
@@ -77,6 +77,8 @@
     IHistogram1D _layerCumE;
     IHistogram1D _layerCumNHits;
     ICloud1D _hitDepth;
+    ICloud1D _maxTime;
+    ICloud1D _minTime;
     
     Subdetector _detector;
 
@@ -85,7 +87,8 @@
         super.definePlots();
 
         _energy = aida().cloud1D("Hit: Energy");
-        _energy.annotation().addItem("xAxisLabel", "Energy (log10(GeV))");
+        //_energy.annotation().addItem("xAxisLabel", "Energy (log10(GeV))");
+        _energy.annotation().addItem("xAxisLabel", "Energy (GeV)");
         _energy.annotation().addItem("yAxisLabel", "Number of Hits");
 
         _hitAvgEnergy = aida().cloud1D("Hit: Average Energy by Event");
@@ -93,15 +96,18 @@
         _hitAvgEnergy.annotation().addItem("yAxisLabel", "Number of Events");
                 
         _time = aida().cloud1D("Hit: Time");
-        _time.annotation().addItem("xAxisLabel", "Time (log10(seconds))");
+        //_time.annotation().addItem("xAxisLabel", "Time (log10(seconds))");
+        _time.annotation().addItem("xAxisLabel", "Time (nanoseconds)");
         _time.annotation().addItem("yAxisLabel", "Number of Hits");
 
         _timeAvg = aida().cloud1D("Hit: Time Average");
-        _timeAvg.annotation().addItem("xAxisLabel", "Average Time (log10(seconds))");
+        //_timeAvg.annotation().addItem("xAxisLabel", "Average Time (log10(seconds))");
+        _timeAvg.annotation().addItem("xAxisLabel", "Average Time (nanoseconds)");
         _timeAvg.annotation().addItem("yAxisLabel", "Number of Events");
 
-        _timeVsSphR = aida().cloud2D("Hit: Time (log10) vs Spherical R");
-        _timeVsSphR.annotation().addItem("xAxisLabel", "Time ( log10(seconds))");
+        _timeVsSphR = aida().cloud2D("Hit: Time vs Spherical R");
+        //_timeVsSphR.annotation().addItem("xAxisLabel", "Time ( log10(seconds))");
+        _timeVsSphR.annotation().addItem("xAxisLabel", "Time (nanoseconds)");
         _timeVsSphR.annotation().addItem("yAxisLabel", "Spherical Radius (mm)");
 
         _thetaPhi = aida().cloud2D("Hit: Theta vs Phi");
@@ -279,6 +285,14 @@
         _hitDepth = aida().cloud1D("Hit: Depth into Sensitive Layer");
         _hitDepth.annotation().addItem("xAxisLabel", "Depth into Sensor (mm)");
         _hitDepth.annotation().addItem("yAxisLabel", "Number of Hits");               
+        
+        _minTime = aida().cloud1D("Hit: Min Time");
+        _minTime.annotation().addItem("xAxisLabel", "Time (nanoseconds)");
+        _minTime.annotation().addItem("yAxisLabel", "Number of Events");
+        
+        _maxTime = aida().cloud1D("Hit: Max Time");
+        _maxTime.annotation().addItem("xAxisLabel", "Time (nanoseconds)");
+        _maxTime.annotation().addItem("yAxisLabel", "Number of Events");
     }
 
     private void makeLayers()
@@ -339,11 +353,13 @@
             plot.annotation().addItem("yAxisLabel", "Number of Events");
 
             plot = aida().cloud1D(layerName + ": Hit Energy");
-            plot.annotation().addItem("xAxisLabel", "Hit Energy (log10(GeV))");
+            //plot.annotation().addItem("xAxisLabel", "Hit Energy (log10(GeV))");
+            plot.annotation().addItem("xAxisLabel", "Hit Energy (GeV)");
             plot.annotation().addItem("yAxisLabel", "Number of Hits");
 
             plot = aida().cloud1D(layerName + ": Hit Time");
-            plot.annotation().addItem("xAxisLabel", "Time (log10(seconds))");
+            //plot.annotation().addItem("xAxisLabel", "Time (log10(seconds))");
+            plot.annotation().addItem("xAxisLabel", "Time (nanoseconds)");
             plot.annotation().addItem("yAxisLabel", "Number of Hits");
             
             plot = aida().cloud1D(layerName + ": Cumulative Energy");
@@ -446,6 +462,8 @@
         double minZ = 999999;
         double minR = 999999;
         double maxR = 0;
+        double minTime = 9999.0;
+        double maxTime = 0;
                 
         // Loop over hits
         for (GenericHit hit : hits)
@@ -470,13 +488,16 @@
             _hitDepth.fill(cylR - layerInfo.getSensorInnerRadius());
                         
             // Fill hit energy
-            _energy.fill(log10(energy));
+            //_energy.fill(log10(energy));
+            _energy.fill(energy);
 
             // Fill hit time
-            _time.fill(timelog10);
+            //_time.fill(timelog10);
+            _time.fill(time);
 
             // Fill time vs spherical R
-            _timeVsSphR.fill(timelog10, sphR);
+            //_timeVsSphR.fill(timelog10, sphR);
+            _timeVsSphR.fill(time, sphR);
 
             // Fill hit theta vs. phi
             _thetaPhi.fill(theta, phi);
@@ -508,13 +529,15 @@
             String layerName = layerInfo.getTitleName();
 
             // Fill layer hit energy
-            aida().cloud1D(layerName + ": Hit Energy").fill(log10(energy));
+            //aida().cloud1D(layerName + ": Hit Energy").fill(log10(energy));
+            aida().cloud1D(layerName + ": Hit Energy").fill(energy);
 
             // Fill layer hit XY
             aida().cloud2D(layerName + ": Hit XY").fill(x, y);
 
             // Fill layer time
-            aida().cloud1D(layerName + ": Hit Time").fill(log10(time));
+            //aida().cloud1D(layerName + ": Hit Time").fill(log10(time));
+            aida().cloud1D(layerName + ": Hit Time").fill(time);
 
             // Leave layer dir
             cd();
@@ -576,6 +599,18 @@
                 minE = energy;
             }
             
+            // Update min time
+            if (time < minTime)
+            {
+                minTime = time;
+            }
+            
+            // Update max time
+            if (time > maxTime)
+            {
+                maxTime = time;
+            }
+            
             // Add this time to time sum
             totTime += time;
 
@@ -606,7 +641,9 @@
         _hitMaxEOverTotE.fill(maxE / eventTotE);
 
         // Fill average time
-        _timeAvg.fill(log10(totTime));
+        //_timeAvg.fill(log10(totTime));
+        double avgTime = totTime / nhits;
+        _timeAvg.fill(avgTime);
 
         // Fill event energy
         _energyEvent.fill(eventTotE);
@@ -777,6 +814,12 @@
 
         // Fill minLayerNHits / nhits
         _layerMinNHitsOverTot.fill(minLayerNHits / ((double) nhits));
+        
+        // Fill max time
+        _maxTime.fill(maxTime);
+        
+        // Fill min time
+        _minTime.fill(minTime);
 
         // Increment total energy
         _totalAvgEnergy += eventTotE;
CVSspam 0.2.8