Commit in java/trunk/users/src/main/java/org/lcsim/hps/users/celentan on MAIN
EcalClusterPlots.java+14-10301 -> 302
EcalDaqPlots.java+29-12301 -> 302
EcalHitPlots.java+29-24301 -> 302
EcalMonitoringPlots.java+4-17301 -> 302
+76-63
4 modified files
Working on the ECAL monitoring.
Coded histograms in a more reasonable place.

java/trunk/users/src/main/java/org/lcsim/hps/users/celentan
EcalClusterPlots.java 301 -> 302
--- java/trunk/users/src/main/java/org/lcsim/hps/users/celentan/EcalClusterPlots.java	2014-03-14 23:53:48 UTC (rev 301)
+++ java/trunk/users/src/main/java/org/lcsim/hps/users/celentan/EcalClusterPlots.java	2014-03-17 17:45:19 UTC (rev 302)
@@ -69,13 +69,20 @@
         aida.tree().cd("/");
         clusterCountPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Cluster Count per Event", 10, -0.5, 9.5);
         clusterSizePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Cluster Size", 10, -0.5, 9.5);
-
+        clusterEnergyPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Cluster Energy", 1000, -0.1, maxE);
+        clusterMaxEnergyPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Maximum Cluster Energy In Event", 1000, -0.1, maxE);      
+        edgePlot = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Cluster center from hits", 93, -23.25, 23.25, 21, -5.25, 5.25);
+        clusterTimes = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Cluster Time Mean", 400, 0, 4.0 * 100);
+        clusterTimeSigma = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Cluster Time Sigma", 100, 0, 40);
+        
+        
         // Create the plotter regions.
-        plotter1.createRegions(1, 2);
+        plotter1.createRegions(2, 2);
         plotter1.region(0).plot(clusterCountPlot);
         plotter1.region(1).plot(clusterSizePlot);
+        plotter1.region(2).plot(edgePlot);
+        plotter1.region(3).plot(clusterMaxEnergyPlot);
 
-
         // Setup the plotter.
         plotter2 = plotterFactory.create("Cluster Energies");
         plotter2.setTitle("Cluster Energies");
@@ -86,10 +93,8 @@
             plotter2.style().yAxisStyle().setParameter("scale", "log");
         }
 
-        clusterEnergyPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Cluster Energy", 1000, -0.1, maxE);
-        clusterMaxEnergyPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Maximum Cluster Energy In Event", 1000, -0.1, maxE);
+     
 
-
         // Create the plotter regions.
         plotter2.createRegions(1, 2);
         plotter2.region(0).plot(clusterEnergyPlot);
@@ -102,8 +107,7 @@
         plotter3.createRegions(1, 2);
         plotter3.style().yAxisStyle().setParameter("scale", "log");
 
-        clusterTimes = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Cluster Time Mean", 400, 0, 4.0 * 100);
-        clusterTimeSigma = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Cluster Time Sigma", 100, 0, 40);
+      
         plotter3.region(0).plot(clusterTimes);
         plotter3.region(1).plot(clusterTimeSigma);
 
@@ -115,8 +119,8 @@
         plotter4.style().zAxisStyle().setParameter("scale", "log");
         plotter4.createRegion();
 
-        edgePlot = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Cluster center from hits", 93, -23.25, 23.25, 21, -5.25, 5.25);
-        plotter4.region(0).plot(edgePlot);
+       
+      
 
         //plotterFrame.setVisible(true);
         //plotterFrame.pack();

java/trunk/users/src/main/java/org/lcsim/hps/users/celentan
EcalDaqPlots.java 301 -> 302
--- java/trunk/users/src/main/java/org/lcsim/hps/users/celentan/EcalDaqPlots.java	2014-03-14 23:53:48 UTC (rev 301)
+++ java/trunk/users/src/main/java/org/lcsim/hps/users/celentan/EcalDaqPlots.java	2014-03-17 17:45:19 UTC (rev 302)
@@ -54,10 +54,18 @@
 		}
 
 		Subdetector subdetector = detector.getSubdetector(subdetectorName);
-
-		plots = new ArrayList<IHistogram1D>();
+		
 		aida = AIDA.defaultInstance();
 		aida.tree().cd("/");
+		plots = new ArrayList<IHistogram1D>();
+		
+		
+		for (int i = 1; i < 3; i++) { // crate
+			for (int j = 0; j < 14; j++) { // slot           
+				plots.add(aida.histogram1D("ECAL: Crate " + i + "; Slot " + slots[j], 16, 0, 16));
+			}
+		}
+
 		IPlotterFactory factory= aida.analysisFactory().createPlotterFactory("ECAL DAQ Plots");
 		plotter =factory.create("DAQ Plots");
 		IPlotterStyle pstyle = plotter.style();
@@ -65,18 +73,27 @@
 		pstyle.dataStyle().markerStyle().setColor("orange");
 		pstyle.dataStyle().errorBarStyle().setVisible(false);
 		plotter.createRegions(7, 4);
-		int region = 0;
-		for (int i = 0; i < 14; i++) { // slot
-			for (int j = 1; j < 3; j++) { // crate               
+		
+		int id,plot_id;
+		for (int i = 1; i < 3; i++) { // crate
+			for (int j = 0; j < 14; j++) { // slot               
 				//System.out.println("creating plot: " + "ECAL: Crate " + j + "; Slot " + i + " in region " + region);
-				int id = (i)*2+(j-1);
-				plots.add(aida.histogram1D("ECAL: Crate " + j + "; Slot " + slots[i], 16, 0, 16));
-				plotter.region(region).plot(plots.get(id));
+				id = (i-1)*14+(j);
+				plot_id = 0;
+				if (i==1){
+					if (j%2==0) plot_id=j*2;
+					else plot_id=(j-1)*2+1;
+				}
+				else if (i==2){
+					if (j%2==0) plot_id=j*2+2;
+					else plot_id=(j-1)*2+3;
+				}
+						
+				plotter.region(plot_id).plot(plots.get(id));
 				/*JASHist jhist = ((PlotterRegion) plotter.region(region)).getPlot();
 				jhist.setAllowUserInteraction(false);
 				jhist.setAllowPopupMenus(false);
 				*/
-				region++;
 			}
 		}
 		plotter.show();
@@ -107,10 +124,10 @@
 				int crate = EcalConditions.getCrate(daqId);
 				int slot = EcalConditions.getSlot(daqId);
 				int channel = EcalConditions.getChannel(daqId);
-				int id = getSlotIndex(slot)*2+(crate-1);
+				int id = getSlotIndex(slot)+(crate-1)*14;
 				
 				//System.out.println("crate="+crate+"; slot="+slot+"; channel="+channel);
-				System.out.println("filling plot: " + "ECAL: Crate " + crate + "; Slot " + slot+ "(" + getSlotIndex(slot)+ ")"+" id: "+id );	
+				//System.out.println("filling plot: " + "ECAL: Crate " + crate + "; Slot " + slot+ "(" + getSlotIndex(slot)+ ")"+" id: "+id );	
 				plots.get(id).fill(channel);
 			}
 		}
@@ -123,7 +140,7 @@
 				int channel = EcalConditions.getChannel(daqId);
 				//System.out.println("crate="+crate+"; slot="+slot+"; channel="+channel);
 				//System.out.println("filling plot: " + "ECAL: Crate " + crate + "; Slot " + slot);
-				int id = getSlotIndex(slot)*2+(crate-1);
+				int id = getSlotIndex(slot)+(crate-1)*14;
 				plots.get(id).fill(channel);
 			}
 		}

java/trunk/users/src/main/java/org/lcsim/hps/users/celentan
EcalHitPlots.java 301 -> 302
--- java/trunk/users/src/main/java/org/lcsim/hps/users/celentan/EcalHitPlots.java	2014-03-14 23:53:48 UTC (rev 301)
+++ java/trunk/users/src/main/java/org/lcsim/hps/users/celentan/EcalHitPlots.java	2014-03-17 17:45:19 UTC (rev 302)
@@ -100,7 +100,33 @@
         hitTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time", 100, 0 * 4.0, 100 * 4.0);
         hitNumberPlot = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Count");        
         occupancyPlot = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Occupancy");
+        topTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : First Hit Time, Top", 100, 0, 100 * 4.0);
+        botTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : First Hit Time, Bottom", 100, 0, 100 * 4.0);
+        orTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : First Hit Time, Or", 100, 0, 100 * 4.0);
+
+        topTrigTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Trigger Time, Top", 32, 0, 32);
+        botTrigTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Trigger Time, Bottom", 32, 0, 32);
+        orTrigTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Trigger Time, Or", 32, 0, 32);
+
+        topTimePlot2D = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time vs. Trig Time, Top", 100, 0, 100 * 4.0, 32, 0, 32);
+        botTimePlot2D = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time vs. Trig Time, Bottom", 100, 0, 100 * 4.0, 32, 0, 32);
+        orTimePlot2D = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time vs. Trig Time, Or", 100, 0, 100 * 4.0, 32, 0, 32);
+
+        hitEnergyPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Energy", 1000, -0.1, maxE);
+        hitMaxEnergyPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Maximum Hit Energy In Event", 1000, -0.1, maxE);
+
         
+        channelEnergyPlot=new ArrayList<IHistogram1D>();
+        channelTimePlot=new ArrayList<IHistogram1D>();
+        for(int id = 0; id < (47*11); id = id +1){
+        	  int row=EcalMonitoringUtils.getRowFromHistoID(id);
+        	  int column=EcalMonitoringUtils.getColumnFromHistoID(id);      
+        	  //create the histograms
+        	  channelEnergyPlot.add(aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Energy : " + (row) + " "+ (column)+ ": "+id, 1000, -0.1, maxEch));  
+        	  channelTimePlot.add(aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time : " + (row) + " "+ (column)+ ": "+id, 100, 0, 400));     
+        }
+        
+        
         // Create the plotter regions.
         plotter.createRegions(2, 2);
         plotter.region(3).plot(hitCountPlot);
@@ -119,9 +145,7 @@
      //   plotterFrame.addPlotter(plotter2);
         plotter2.style().dataStyle().errorBarStyle().setVisible(false);
 
-        hitEnergyPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Energy", 1000, -0.1, maxE);
-        hitMaxEnergyPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Maximum Hit Energy In Event", 1000, -0.1, maxE);
-
+  
 //        hitEnergyPlot.addMouseListener(this);
         
         if (logScale) {
@@ -136,15 +160,7 @@
     
   
       
-        channelEnergyPlot=new ArrayList<IHistogram1D>();
-        channelTimePlot=new ArrayList<IHistogram1D>();
-        for(int id = 0; id < (47*11); id = id +1){
-        	  int row=EcalMonitoringUtils.getRowFromHistoID(id);
-        	  int column=EcalMonitoringUtils.getColumnFromHistoID(id);      
-        	  //create the histograms
-        	  channelEnergyPlot.add(aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Energy : " + (row) + " "+ (column)+ ": "+id, 1000, -0.1, maxEch));  
-        	  channelTimePlot.add(aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time : " + (row) + " "+ (column)+ ": "+id, 100, 0, 400));     
-        }
+     
          
         
         
@@ -155,18 +171,7 @@
         plotter3.style().dataStyle().errorBarStyle().setVisible(false);
         plotter3.createRegions(3, 3);
 
-        topTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : First Hit Time, Top", 100, 0, 100 * 4.0);
-        botTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : First Hit Time, Bottom", 100, 0, 100 * 4.0);
-        orTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : First Hit Time, Or", 100, 0, 100 * 4.0);
-
-        topTrigTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Trigger Time, Top", 32, 0, 32);
-        botTrigTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Trigger Time, Bottom", 32, 0, 32);
-        orTrigTimePlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Trigger Time, Or", 32, 0, 32);
-
-        topTimePlot2D = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time vs. Trig Time, Top", 100, 0, 100 * 4.0, 32, 0, 32);
-        botTimePlot2D = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time vs. Trig Time, Bottom", 100, 0, 100 * 4.0, 32, 0, 32);
-        orTimePlot2D = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time vs. Trig Time, Or", 100, 0, 100 * 4.0, 32, 0, 32);
-
+      
         // Create the plotter regions.
         plotter3.region(0).plot(topTimePlot);
         plotter3.region(1).plot(botTimePlot);

java/trunk/users/src/main/java/org/lcsim/hps/users/celentan
EcalMonitoringPlots.java 301 -> 302
--- java/trunk/users/src/main/java/org/lcsim/hps/users/celentan/EcalMonitoringPlots.java	2014-03-14 23:53:48 UTC (rev 301)
+++ java/trunk/users/src/main/java/org/lcsim/hps/users/celentan/EcalMonitoringPlots.java	2014-03-17 17:45:19 UTC (rev 302)
@@ -134,26 +134,13 @@
         
         
         
-      
+  	  if (nhits>0) {
         for (int ii=0;ii<(11*47);ii++){
-        		  if (nhits>0) occupancyPlots.get(ii).fill(chits[ii]*1./(nhits ));               
-        		  else occupancyPlots.get(ii).fill(0); 
+        	occupancyPlots.get(ii).fill(chits[ii]*1./(nhits ));                
         }
+  	  }        
         
-     
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
+            
         if (event.hasCollection(HPSEcalCluster.class, clusterCollection)) {
             List<HPSEcalCluster> clusters = event.get(HPSEcalCluster.class, clusterCollection);
 //if (clusters.size()>1)            
SVNspam 0.1