5 modified files
java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots
--- java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalDaqPlots.java 2014-04-30 02:40:51 UTC (rev 533)
+++ java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalDaqPlots.java 2014-04-30 08:11:05 UTC (rev 534)
@@ -6,6 +6,7 @@
import hep.aida.IPlotterStyle;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import org.hps.util.Resettable;
@@ -21,9 +22,9 @@
import org.hps.conditions.DefaultTestSetup;
import org.hps.conditions.ecal.EcalChannel;
import org.hps.conditions.ecal.EcalChannelConstants;
+import org.lcsim.detector.converter.compact.EcalCrystal;
-
/**
* The driver <code>EcalDaqPlots</code> implements the histogram shown to the user
* in the fourth tab of the Monitoring Application, when using the Ecal monitoring lcsim file.
@@ -32,8 +33,8 @@
* These plots are updated continuosly.
* @author Andrea Celentano
* @TODO: integrate with the new conditions system.
- *
- */
+ *
+ * */
public class EcalDaqPlots extends Driver implements Resettable {
@@ -43,8 +44,9 @@
private AIDA aida;
private Detector detector;
private List<IHistogram1D> plots;
- private static final short[] slots = {10, 13, 9, 14, 8, 15, 7, 16, 6, 17, 5, 18, 4, 19};
-
+
+ private List<Integer> slotsT,slotsB,crates;
+
private EcalChannel.EcalChannelCollection channels;
//private DatabaseConditionsManager manager;
private ConditionsManager manager;
@@ -64,37 +66,82 @@
public void detectorChanged(Detector detector) {
-
-
-
-
+ if (subdetectorName == null) {
+ throw new RuntimeException("The subdetectorName parameter was not set.");
+ }
+
+ if (inputCollection == null) {
+ throw new RuntimeException("The inputCollection parameter was not set.");
+ }
+
this.detector = detector;
+
+ Subdetector subdetector = detector.getSubdetector(subdetectorName);
+
+
/*Setup the conditions system*/
// Get the channel information from the database.
channels = manager.getCachedConditions(EcalChannel.EcalChannelCollection.class, "ecal_channels").getCachedData();
+
+ List<EcalCrystal> crystals = detector.getDetectorElement().findDescendants(EcalCrystal.class);
+ /*I do not want the ECAL Crates and Slots to be hard-coded.
+ * It is fine to assume that the channels are from 0 to 15:
+ * This is determined by JLAB FADC architecture
+ * It is also fine to say that there are 14 slots occupied by FADCs in each crate: 14*16=224, number of channel in each ecal sector (a part from the hole)
+ * *
+ */
+
+ slotsT=new ArrayList<Integer>();
+ slotsB=new ArrayList<Integer>();
+ crates=new ArrayList<Integer>();
+
+ // Loop over crystals and get the list of slots-crates
+ for (EcalCrystal crystal : crystals) {
+
+ //y>0 means TOP, y<0 means BOTTOM
+ int y = crystal.getY();
+ int slot = crystal.getSlot();
+ int crate = crystal.getCrate();
+
+ if (y>0){
+ if (!slotsT.contains(slot)) slotsT.add(slot);
+ }
+ else {
+ if (!slotsB.contains(slot)) slotsB.add(slot);
+ }
+ if (!crates.contains(crate)) crates.add(crate);
+ }
+
+ System.out.println("These DAQ slots found:");
+ /*Order the slots in increasing order*/
+ Collections.sort(slotsB);
+ Collections.sort(slotsT);
- if (subdetectorName == null) {
- throw new RuntimeException("The subdetectorName parameter was not set.");
+ System.out.println("TOP: ");
+ for (int slot : slotsT){
+ System.out.println(slot);
}
-
- if (inputCollection == null) {
- throw new RuntimeException("The inputCollection parameter was not set.");
+ System.out.println("BOTTOM: ");
+ for (int slot : slotsT){
+ System.out.println(slot);
}
-
- Subdetector subdetector = detector.getSubdetector(subdetectorName);
+
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));
- }
+
+ for (int j = 0; j < 14; j++) { // TOP slot
+ plots.add(aida.histogram1D("ECAL: Top Crate Slot " + slotsT.get(j), 16, 0, 16));
}
+
+ for (int j = 0; j < 14; j++) { // BOTTOM slot
+ plots.add(aida.histogram1D("ECAL: Bottom Crate Slot " + slotsB.get(j), 16, 0, 16));
+ }
IPlotterFactory factory= aida.analysisFactory().createPlotterFactory("ECAL DAQ Plots");
plotter =factory.create("DAQ Plots");
@@ -105,16 +152,15 @@
plotter.createRegions(7, 4);
int id,plot_id;
- for (int i = 1; i < 3; i++) { // crate
+ for (int i = 0; i < 2; i++) { // crate
for (int j = 0; j < 14; j++) { // slot
- //System.out.println("creating plot: " + "ECAL: Crate " + j + "; Slot " + i + " in region " + region);
- id = (i-1)*14+(j);
- plot_id = 0;
- if (i==1){
+ id=i*14+j;
+ plot_id = 0;
+ if (i==0){
if (j%2==0) plot_id=j*2;
else plot_id=(j-1)*2+1;
}
- else if (i==2){
+ else if (i==1){
if (j%2==0) plot_id=j*2+2;
else plot_id=(j-1)*2+3;
}
@@ -124,7 +170,7 @@
}
plotter.show();
}
-
+
@Override
public void reset() {
if (plotter != null) {
@@ -139,41 +185,35 @@
List<CalorimeterHit> hits = event.get(CalorimeterHit.class, inputCollection);
for (CalorimeterHit hit : hits) {
-
-
- // Make an ID to find.
- // EcalChannel daq = new EcalChannel.DaqId();
+ // Make an ID to find.
+ // EcalChannel daq = new EcalChannel.DaqId();
// daq.crate = 1;
// daq.slot = 2;
- // daq.channel = 3;
+ // daq.channel = 3;
// Find the matching channel.
- //EcalChannel.GeometryId geomID = new EcalChannel.GeometryId();
- //geomID.x=hit.getIdentifierFieldValue("ix");
- //geomID.y=hit.getIdentifierFieldValue("iy");
- //EcalChannel channel=channels.findChannel(geomID);
-
- //int crateN=channel.getCrate();
- //int slotN=channel.getSlot();
- //int channelN=channel.getChannel();
+ /*
+ EcalChannel.GeometryId geomID=new EcalChannel.GeometryId();
+ geomID.x=hit.getIdentifierFieldValue("ix");
+ geomID.y=hit.getIdentifierFieldValue("iy");
+ EcalChannel channel=channels.findChannel(geomID);
- //System.out.println("found channel at " + geomID.x + " " + geomID.y + " corresponding to DAQ crate/slot/channel " + crateN + " "+slotN+" "+channelN);
- }
+ int crateN=channel.getCrate();
+ int slotN=channel.getSlot();
+ int channelN=channel.getChannel();
+
+ System.out.println("found channel at " + geomID.x + " " + geomID.y + " corresponding to DAQ crate/slot/channel " + crateN + " "+slotN+" "+channelN);
+
+ //Top CRATE
+ if (geomID.y>0){
+ int index = slotsT.indexOf(slotN);
+ plots.get(index).fill(channelN);
+ }
+ else if (geomID.y<0){
+ int index = slotsB.indexOf(slotN);
+ plots.get(index+14).fill(channelN);
+ } */
+ }
}
- }
-
-
-
- public int getSlotIndex(int slot){
- int ret=-1;
- for (int ii=0;ii<14;ii++){
- if (slots[ii]==slot) ret=ii;
- }
- return ret;
- }
-
-
-
-
-
+ }
}
java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots
--- java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalEventDisplay.java 2014-04-30 02:40:51 UTC (rev 533)
+++ java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalEventDisplay.java 2014-04-30 08:11:05 UTC (rev 534)
@@ -8,14 +8,16 @@
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.util.ArrayList;
import java.util.List;
+import org.hps.util.Resettable;
import org.hps.monitoring.ecal.event.Cluster;
import org.hps.monitoring.ecal.event.EcalHit;
-//import org.lcsim.hps.users.celentan.EcalEventDisplayListener;
import org.hps.monitoring.ecal.ui.PEventViewer;
import org.hps.monitoring.ecal.util.CrystalEvent;
import org.hps.monitoring.ecal.util.CrystalListener;
+import org.hps.recon.ecal.ECalUtils;
import org.hps.recon.ecal.HPSEcalCluster;
import org.lcsim.event.CalorimeterHit;
import org.lcsim.event.EventHeader;
@@ -36,7 +38,7 @@
* *
*/
-public class EcalEventDisplay extends Driver implements CrystalListener,ActionListener {
+public class EcalEventDisplay extends Driver implements CrystalListener,ActionListener,Resettable {
String inputCollection = "EcalCalHits";
@@ -50,13 +52,24 @@
int ix,iy,id;
private PEventViewer viewer; //this is the Kyle event viewer.
- IHistogram1D hEnergy,hEnergyDraw,hTime,hTimeDraw;
- IHistogram2D hTimeVsEnergy,hTimeVsEnergyDraw;
+ IHistogram1D hEnergyDraw,hTimeDraw;
+ IHistogram2D hTimeVsEnergyDraw;
+
+ ArrayList<IHistogram1D> channelEnergyPlot;
+ ArrayList<IHistogram1D> channelTimePlot;
+ ArrayList<IHistogram2D> channelTimeVsEnergyPlot;
+
+ double maxEch = 2500 * ECalUtils.MeV;
+
public EcalEventDisplay() {
}
+ public void setMaxEch(double maxEch) {
+ this.maxEch = maxEch;
+ }
+
public void setInputCollection(String inputCollection) {
this.inputCollection = inputCollection;
}
@@ -73,28 +86,41 @@
aida.tree().cd("/");
- id=0;
+
+
+ channelEnergyPlot=new ArrayList<IHistogram1D>();
+ channelTimePlot=new ArrayList<IHistogram1D>();
+ channelTimeVsEnergyPlot=new ArrayList<IHistogram2D>();
+ //create the histograms for single channel energy and time distribution.
+ //these are NOT shown in this plotter, but are used in the event display.
+ for(int ii = 0; ii < (47*11); ii = ii +1){
+ int row=EcalMonitoringUtils.getRowFromHistoID(ii);
+ int column=EcalMonitoringUtils.getColumnFromHistoID(ii);
+ channelEnergyPlot.add(aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Energy : " + (row) + " "+ (column)+ ": "+ii, 100, -0.1, maxEch));
+ channelTimePlot.add(aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time : " + (row) + " "+ (column)+ ": "+ii, 100, 0, 400));
+ channelTimeVsEnergyPlot.add(aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time Vs Energy : " + (row) + " "+ (column)+ ": "+ii, 100, 0, 400,100, -0.1, maxEch));
+ }
+ id=0;
iy=EcalMonitoringUtils.getRowFromHistoID(id);
- ix=EcalMonitoringUtils.getColumnFromHistoID(id);
-
- hEnergy = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Energy : " + (iy) + " "+ (ix)+ ": "+id);
- hTime = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time : " + (iy) + " "+ (ix)+ ": "+id);
- hTimeVsEnergy = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time Vs Energy : " + (iy) + " "+ (ix)+ ": "+id);
-
+ ix=EcalMonitoringUtils.getColumnFromHistoID(id);
+
+
+
- hEnergyDraw=aida.histogram1D("hEnergy",hEnergy.axis().bins(),hEnergy.axis().lowerEdge(),hEnergy.axis().upperEdge());
- hTimeDraw=aida.histogram1D("hTime",hTime.axis().bins(),hTime.axis().lowerEdge(),hTime.axis().upperEdge());
- hTimeVsEnergyDraw=aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time Vs Energy : " + (iy) + " "+ (ix)+ ": "+id,hTimeVsEnergy.xAxis().bins(),hTimeVsEnergy.xAxis().lowerEdge(),hTimeVsEnergy.xAxis().upperEdge(),hTimeVsEnergy.yAxis().bins(),hTimeVsEnergy.yAxis().lowerEdge(),hTimeVsEnergy.yAxis().upperEdge());
+ hEnergyDraw=aida.histogram1D("Energy",channelEnergyPlot.get(0).axis().bins(), channelEnergyPlot.get(0).axis().lowerEdge(),channelEnergyPlot.get(0).axis().upperEdge());
+ hTimeDraw=aida.histogram1D("Time", channelTimePlot.get(0).axis().bins(),channelTimePlot.get(0).axis().lowerEdge(),channelTimePlot.get(0).axis().upperEdge());
+ //hTimeVsEnergyDraw=aida.histogram2D("Hit Time Vs Energy" ,channelTimeVsEnergyPlot.get(0).xAxis().bins(),channelTimeVsEnergyPlot.get(0).xAxis().lowerEdge(),channelTimeVsEnergyPlot.get(0).xAxis().upperEdge(),channelTimeVsEnergyPlot.get(0).yAxis().bins(),channelTimeVsEnergyPlot.get(0).yAxis().lowerEdge(),channelTimeVsEnergyPlot.get(0).yAxis().upperEdge());
+ hTimeVsEnergyDraw=aida.histogram2D("Time Vs Energy",100,0,400,100,-0.1,maxEch);
-
plotterFactory = aida.analysisFactory().createPlotterFactory("Ecal single channel plots");
plotter = plotterFactory.create("Single hits");
plotter.setTitle("");
+ plotter.style().dataStyle().fillStyle().setParameter("showZeroHeightBins",Boolean.FALSE.toString());
plotter.style().dataStyle().errorBarStyle().setVisible(false);
plotter.createRegions(2,2);
plotter.region(0).plot(hEnergyDraw);
@@ -130,63 +156,87 @@
@Override
public void process(EventHeader event) {
- if (++eventn % eventRefreshRate != 0) {
- return;
+ int ii;
+ int row = 0;
+ int column = 0;
+
+ boolean do_update=false;
+ if (++eventn % eventRefreshRate == 0) {
+ do_update=true;
}
- viewer.resetDisplay();
- viewer.updateDisplay();
-
+ if (do_update){
+ viewer.resetDisplay();
+ viewer.updateDisplay();
+ }
Cluster the_cluster;
if (event.hasCollection(CalorimeterHit.class, inputCollection)) {
List<CalorimeterHit> hits = event.get(CalorimeterHit.class, inputCollection);
for (CalorimeterHit hit : hits) {
- viewer.addHit(new EcalHit(hit.getIdentifierFieldValue("ix"), hit.getIdentifierFieldValue("iy"), hit.getRawEnergy()));
+ row=hit.getIdentifierFieldValue("iy");
+ column=hit.getIdentifierFieldValue("ix");
+ if (do_update) viewer.addHit(new EcalHit(column,row, hit.getRawEnergy()));
+ if ((row!=0)&&(column!=0)){
+ ii = EcalMonitoringUtils.getHistoIDFromRowColumn(row,column);
+ channelEnergyPlot.get(ii).fill(hit.getCorrectedEnergy());
+ channelTimePlot.get(ii).fill(hit.getTime());
+ channelTimeVsEnergyPlot.get(ii).fill(hit.getTime(),hit.getRawEnergy());
+ }
}
}
if (event.hasCollection(HPSEcalCluster.class, clusterCollection)) {
List<HPSEcalCluster> clusters = event.get(HPSEcalCluster.class, clusterCollection);
for (HPSEcalCluster cluster : clusters) {
CalorimeterHit seedHit = cluster.getSeedHit();
+ if (do_update){
the_cluster=new Cluster(seedHit.getIdentifierFieldValue("ix"), seedHit.getIdentifierFieldValue("iy"), cluster.getEnergy());
for (CalorimeterHit hit : cluster.getCalorimeterHits()) {
if (hit.getRawEnergy() != 0)
- the_cluster.addComponentHit(hit.getIdentifierFieldValue("ix"),hit.getIdentifierFieldValue("iy"));
+ column=hit.getIdentifierFieldValue("ix");
+ row=hit.getIdentifierFieldValue("iy");
+ the_cluster.addComponentHit(hit.getIdentifierFieldValue("ix"),hit.getIdentifierFieldValue("iy"));
}
viewer.addCluster(the_cluster);
+ }
}
}
-
+ if (do_update){
viewer.updateDisplay();
//need also to update single-hit histograms, since they're just a drawing copy!
//get the new histograms
- hEnergy = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Energy : " + (iy) + " "+ (ix)+ ": "+id);
+
//clone hEnergyDraw
hEnergyDraw.reset();
- hEnergyDraw.setTitle(hEnergy.title());
- hEnergyDraw.add(hEnergy);
+ hEnergyDraw.setTitle(channelEnergyPlot.get(id).title());
+ hEnergyDraw.add(channelEnergyPlot.get(id));
- hTime = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time : " + (iy) + " "+ (ix)+ ": "+id);
+
hTimeDraw.reset();
- hTimeDraw.setTitle(hTime.title());
- hTimeDraw.add(hTime);
+ hTimeDraw.setTitle(channelTimePlot.get(id).title());
+ hTimeDraw.add(channelTimePlot.get(id));
- hTimeVsEnergy = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time Vs Energy : " + (iy) + " "+ (ix)+ ": "+id);
+
hTimeVsEnergyDraw.reset();
- hTimeVsEnergyDraw.setTitle(hTimeVsEnergy.title());
- hTimeVsEnergyDraw.add(hTimeVsEnergy);
-
+ hTimeVsEnergyDraw.setTitle(channelTimeVsEnergyPlot.get(id).title());
+ hTimeVsEnergyDraw.add(channelTimeVsEnergyPlot.get(id));
+ }
}
-
-
@Override
+ public void reset(){
+ for(int ii = 0; ii < (47*11); ii = ii +1){
+ channelEnergyPlot.get(ii).reset();
+ channelTimePlot.get(ii).reset();
+ channelTimeVsEnergyPlot.get(ii).reset();
+ }
+ }
+ @Override
public void actionPerformed(ActionEvent ae) {
}
@@ -230,24 +280,24 @@
// plotter.hide();
//get the new histograms
- hEnergy = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Energy : " + (iy) + " "+ (ix)+ ": "+id);
+
//clone hEnergyDraw
hEnergyDraw.reset();
- plotter.region(0).setTitle(hEnergy.title());
- hEnergyDraw.setTitle(hEnergy.title());
- hEnergyDraw.add(hEnergy);
+ plotter.region(0).setTitle(channelEnergyPlot.get(id).title());
+ hEnergyDraw.setTitle(channelEnergyPlot.get(id).title());
+ hEnergyDraw.add(channelEnergyPlot.get(id));
- hTime = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time : " + (iy) + " "+ (ix)+ ": "+id);
+
hTimeDraw.reset();
- plotter.region(1).setTitle(hTime.title());
- hTimeDraw.setTitle(hTime.title());
- hTimeDraw.add(hTime);
+ plotter.region(1).setTitle(channelTimePlot.get(id).title());
+ hTimeDraw.setTitle(channelTimePlot.get(id).title());
+ hTimeDraw.add(channelTimePlot.get(id));
- hTimeVsEnergy = aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time Vs Energy : " + (iy) + " "+ (ix)+ ": "+id);
+
hTimeVsEnergyDraw.reset();
- plotter.region(2).setTitle(hTimeVsEnergy.title());
- hTimeVsEnergyDraw.setTitle(hTimeVsEnergy.title());
- hTimeVsEnergyDraw.add(hTimeVsEnergy);
+ plotter.region(2).setTitle(channelTimeVsEnergyPlot.get(id).title());
+ hTimeVsEnergyDraw.setTitle(channelTimeVsEnergyPlot.get(id).title());
+ hTimeVsEnergyDraw.add(channelTimeVsEnergyPlot.get(id));
}
}
java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots
--- java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalHitPlots.java 2014-04-30 02:40:51 UTC (rev 533)
+++ java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalHitPlots.java 2014-04-30 08:11:05 UTC (rev 534)
@@ -30,11 +30,7 @@
* - Second sub-tab shows the energy distribution of the hits (Histogram1D), and the maximum energy in each event (Histogram1D)
* - Third sub-tab shows the time distribution of the first hit per event, for the Ecal top (Histogram1D), for the Ecal bottom (Histogram1D), for both for the Ecal top (Histogram1D).
*
- * Histograms are updated continously, expect those marked with *, that are updated regularly depending on the event refresh rate configured in the <code> EcalMonitoringPlots </code> driver
- *
- * This driver also creates histogram with the energy distribution and the time distribution for each channel.
- * These are not shown here, but are used in the <code>EcalEventDisplay</code> driver.
- * However, it seemed to me this is the best place where to put them.
+ * Histograms are updated continously, expect those marked with *, that are updated regularly depending on the event refresh rate configured in the <code> EcalMonitoringPlots </code> driver
* @author Andrea Celentano
*
*/
@@ -58,15 +54,12 @@
- ArrayList<IHistogram1D> channelEnergyPlot;
- ArrayList<IHistogram1D> channelTimePlot;
- ArrayList<IHistogram2D> channelTimeVsEnergyPlot;
int eventn = 0;
int eventRefreshRate = 1;
int dummy = 0;
double maxE = 5000 * ECalUtils.MeV;
- double maxEch = 2500 * ECalUtils.MeV;
+
boolean logScale = false;
boolean hide = false;
@@ -78,9 +71,7 @@
this.maxE = maxE;
}
- public void setMaxEch(double maxEch) {
- this.maxEch = maxEch;
- }
+
public void setLogScale(boolean logScale) {
this.logScale = logScale;
@@ -119,18 +110,7 @@
hitMaxEnergyPlot = aida.histogram1D(detector.getDetectorName() + " : " + inputCollection + " : Maximum Hit Energy In Event", 1000, -0.1, maxE);
- channelEnergyPlot=new ArrayList<IHistogram1D>();
- channelTimePlot=new ArrayList<IHistogram1D>();
- channelTimeVsEnergyPlot=new ArrayList<IHistogram2D>();
- //create the histograms for single channel energy and time distribution.
- //these are NOT shown in this plotter, but are used in the event display.
- for(int id = 0; id < (47*11); id = id +1){
- int row=EcalMonitoringUtils.getRowFromHistoID(id);
- int column=EcalMonitoringUtils.getColumnFromHistoID(id);
- 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));
- channelTimeVsEnergyPlot.add(aida.histogram2D(detector.getDetectorName() + " : " + inputCollection + " : Hit Time Vs Energy : " + (row) + " "+ (column)+ ": "+id, 100, 0, 400,100, -0.1, maxEch));
- }
+
// Create the plotter regions.
@@ -260,14 +240,7 @@
hitTimePlot.fill(hit.getTime());
- column=hit.getIdentifierFieldValue("ix");
- row=hit.getIdentifierFieldValue("iy");
- if ((hit.getIdentifierFieldValue("ix")!=0)&&(hit.getIdentifierFieldValue("iy")!=0)){
- id = EcalMonitoringUtils.getHistoIDFromRowColumn(row,column);
- channelEnergyPlot.get(id).fill(hit.getCorrectedEnergy());
- channelTimePlot.get(id).fill(hit.getTime());
- channelTimeVsEnergyPlot.get(id).fill(hit.getTime(),hit.getRawEnergy());
- }
+
if (hit.getTime() < orTime) {
orTime = hit.getTime();
@@ -325,10 +298,6 @@
hitTimePlot.reset();
hitEnergyPlot.reset();
hitMaxEnergyPlot.reset();
- for(int id = 0; id < (47*11); id = id +1){
- channelEnergyPlot.get(id).reset();
- channelTimePlot.get(id).reset();
- }
}
@Override
java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots
--- java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalMonitoringPlots.java 2014-04-30 02:40:51 UTC (rev 533)
+++ java/trunk/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalMonitoringPlots.java 2014-04-30 08:11:05 UTC (rev 534)
@@ -100,14 +100,17 @@
IPlotterStyle style = plotter.region(0).style();
style.setParameter("hist2DStyle", "colorMap");
style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow");
+ style.dataStyle().fillStyle().setParameter("showZeroHeightBins",Boolean.FALSE.toString());
plotter.region(0).plot(hitCountDrawPlot);
style = plotter.region(1).style();
style.setParameter("hist2DStyle", "colorMap");
style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow");
+ style.dataStyle().fillStyle().setParameter("showZeroHeightBins",Boolean.FALSE.toString());
plotter.region(1).plot(clusterCountDrawPlot);
style = plotter.region(2).style();
style.setParameter("hist2DStyle", "colorMap");
style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow");
+ style.dataStyle().fillStyle().setParameter("showZeroHeightBins",Boolean.FALSE.toString());
style.zAxisStyle().setParameter("scale", "log");
plotter.region(2).plot(occupancyDrawPlot);
java/trunk/steering-files/src/main/resources/org/hps/steering/monitoring
--- java/trunk/steering-files/src/main/resources/org/hps/steering/monitoring/EcalMonitoringCelentan.lcsim 2014-04-30 02:40:51 UTC (rev 533)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/monitoring/EcalMonitoringCelentan.lcsim 2014-04-30 08:11:05 UTC (rev 534)
@@ -72,10 +72,12 @@
</driver>
<driver name="EcalDaqPlots" type="org.hps.monitoring.ecal.plots.EcalDaqPlots">
+ <inputCollection>EcalCalHits</inputCollection>
</driver>
<driver name="EcalEventDisplay" type="org.hps.monitoring.ecal.plots.EcalEventDisplay">
<inputCollection>EcalCalHits</inputCollection>
+ <maxEch>2.0</maxEch>
<eventRefreshRate>100</eventRefreshRate>
</driver>
SVNspam 0.1