Print

Print


Commit in hps-java/src/main/java/org/lcsim/hps/monitoring/svt on MAIN
SVTEventInfo.java+13-11.3 -> 1.4
SVTHitReconstructionPlots.java+14-21.3 -> 1.4
SVTHitPulsePlots.java+14-41.6 -> 1.7
+41-7
3 modified files
Make these monitoring plots resettable

hps-java/src/main/java/org/lcsim/hps/monitoring/svt
SVTEventInfo.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- SVTEventInfo.java	2 May 2012 19:36:23 -0000	1.3
+++ SVTEventInfo.java	3 May 2012 13:50:36 -0000	1.4
@@ -10,6 +10,7 @@
 import org.lcsim.event.EventHeader;
 import org.lcsim.event.RawTrackerHit;
 import org.lcsim.geometry.Detector;
+import org.lcsim.hps.monitoring.Resettable;
 import org.lcsim.util.Driver;
 import org.lcsim.util.aida.AIDA;
 
@@ -17,7 +18,7 @@
  *
  * @author mgraham
  */
-public class SVTEventInfo extends Driver {
+public class SVTEventInfo extends Driver implements Resettable {
 
     private List<IPlotter> plotters = new ArrayList<IPlotter>();
     private AIDA aida = AIDA.defaultInstance();
@@ -155,4 +156,15 @@
             return false;
         return true;
     }
+
+    @Override
+    public void reset() {
+        aida.histogram1D("Total Number of Raw Hits in Top Half").reset();
+        aida.histogram1D("Total Number of Raw Hits in Bottom Half").reset();
+        aida.histogram1D("Number of Layers Hit in Top Half").reset();
+        aida.profile1D("Number of Hits per layer in Top Half").reset();
+        aida.histogram1D("Number of Layers Hit in Bottom Half").reset();
+        aida.profile1D("Number of Hits per layer in Top Half").reset();
+        aida.profile1D("Number of Hits per layer in Bottom Half").reset();
+    }
 }

hps-java/src/main/java/org/lcsim/hps/monitoring/svt
SVTHitReconstructionPlots.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- SVTHitReconstructionPlots.java	2 May 2012 19:36:23 -0000	1.3
+++ SVTHitReconstructionPlots.java	3 May 2012 13:50:36 -0000	1.4
@@ -9,6 +9,7 @@
 import org.lcsim.event.EventHeader;
 import org.lcsim.event.RawTrackerHit;
 import org.lcsim.geometry.Detector;
+import org.lcsim.hps.monitoring.Resettable;
 import org.lcsim.hps.recon.tracking.HPSFittedRawTrackerHit;
 import org.lcsim.hps.recon.tracking.HPSSVTCalibrationConstants;
 import org.lcsim.recon.tracking.digitization.sisim.SiTrackerHitStrip1D;
@@ -19,7 +20,7 @@
  *
  * @author mgraham
  */
-public class SVTHitReconstructionPlots extends Driver {
+public class SVTHitReconstructionPlots extends Driver implements Resettable {
 
     private List<IPlotter> plotters = new ArrayList<IPlotter>();
     private AIDA aida = AIDA.defaultInstance();
@@ -75,7 +76,7 @@
 
         int ns = sensors.size();
         for (int i = 0; i < ns; i++) {
-            IHistogram1D timingPlot = aida.histogram1D(sensors.get(i).getName() + "_timing", 60, -10, 50);
+            IHistogram1D timingPlot = aida.histogram1D(sensors.get(i).getName() + "_timing", 50, 0, 148);
             IHistogram1D amplitudePlot = aida.histogram1D(sensors.get(i).getName() + "_amplitude", 50, 0, 2000.0);
 
             IHistogram1D nrawPlot = aida.histogram1D(sensors.get(i).getName() + "_raw_hits", 10, 0, 9.0);
@@ -149,4 +150,15 @@
         }
 
     }
+
+    @Override
+    public void reset() {
+        int ns = sensors.size();
+        for (int i = 0; i < ns; i++) {
+            aida.histogram1D(sensors.get(i).getName() + "_timing").reset();
+            aida.histogram1D(sensors.get(i).getName() + "_amplitude").reset();
+            aida.histogram1D(sensors.get(i).getName() + "_raw_hits").reset();
+            aida.histogram1D(sensors.get(i).getName() + "_reco_hits").reset();
+        }
+    }
 }

hps-java/src/main/java/org/lcsim/hps/monitoring/svt
SVTHitPulsePlots.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- SVTHitPulsePlots.java	2 May 2012 19:36:23 -0000	1.6
+++ SVTHitPulsePlots.java	3 May 2012 13:50:36 -0000	1.7
@@ -7,6 +7,7 @@
 import org.lcsim.event.EventHeader;
 import org.lcsim.event.RawTrackerHit;
 import org.lcsim.geometry.Detector;
+import org.lcsim.hps.monitoring.Resettable;
 import org.lcsim.hps.recon.tracking.HPSSVTCalibrationConstants;
 import org.lcsim.util.Driver;
 import org.lcsim.util.aida.AIDA;
@@ -15,7 +16,7 @@
  *
  * @author mgraham
  */
-public class SVTHitPulsePlots extends Driver {
+public class SVTHitPulsePlots extends Driver implements Resettable{
 
     private List<IPlotter> plotters = new ArrayList<IPlotter>();
     private AIDA aida = AIDA.defaultInstance();
@@ -25,13 +26,14 @@
     private Detector detector = null;
     private IPlotter plotter3;
     private IPlotter plotter2;
+    private List<SiSensor> sensors;
 
     protected void detectorChanged(Detector detector) {
         this.detector = detector;
         aida.tree().cd("/");
 
 
-        List<SiSensor> sensors = detector.getSubdetector(trackerName).getDetectorElement().findDescendants(SiSensor.class);
+        sensors = detector.getSubdetector(trackerName).getDetectorElement().findDescendants(SiSensor.class);
 
 
         IAnalysisFactory fac = aida.analysisFactory();
@@ -94,8 +96,7 @@
         int strip = hit.getIdentifierFieldValue("strip");
         short[] adcVal = hit.getADCValues();
         double ped = HPSSVTCalibrationConstants.getPedestal(sensor, strip);
-        double noise = HPSSVTCalibrationConstants.getNoise(sensor, strip);
-        boolean hitok = true;
+        double noise = HPSSVTCalibrationConstants.getNoise(sensor, strip);        
         for (int i = 0; i < 6; i++) {
             double pedSub = (adcVal[i] - ped);
             aida.histogram2D(sensorName + "_AdcVsChan").fill(pedSub, strip);
@@ -130,4 +131,13 @@
 
         return false;
     }
+
+    @Override
+    public void reset() {
+           int ns = sensors.size();
+        for (int i = 0; i < ns; i++) {
+            aida.histogram2D(sensors.get(i).getName() + "_AdcVsChan").reset();
+            aida.profile1D(sensors.get(i).getName() + "_pulse").reset();
+        }
+    }
 }
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1