Skip to content

ECMon.java

Cole Smith edited this page Apr 24, 2017 · 162 revisions

ECMon.java

ECMon (**E**lectromagnetic **C**alorimeter **Mon**itor)


Contributors: Cole Smith (UVA), Nick Compton (Ohio U), Taya Chetry (Ohio U).#

Purpose: Display and monitor raw and calibrated data from the Electromagnetic Calorimeters.

Usage: ECMon.sh

Status: Both PCAL and EC Electromagnetic Calorimeters currently implemented.

Description of Classes (COATJAVA 3.0 version)

ECMon extends abstract class DetectorMonitor which provides the abstract methods init(),analyze() and close() and implements the COATJAVA 3.0 interfaces IDataEventListener (which provides the EVIO event to ECMon) and DetectorListener (which passes to ECMon the detector shape entered by the mouse for updating the shape color map.)

The graphical context of ECMon is provided by the MonitorApp class, which also handles EVIO I/O from either a disk file or the ET ring. MonitorApp displays a detector panel at top left, a set of control panels at bottom left and a monitor panel at right.

Detector Panel

The detector elements are built from DetectorShape2D objects and displayed inside DetectorPane2D panels which are organized as layers in ECMon using DetectorView2D. Detector layers representing PCAL, ECinner and ECouter are accessible via buttons PC, ECi and ECo at the bottom of the detector panel. Readout layers within each detector are displayed using buttons at the strip level (U,V,W) or pixel level (PIX). Finally at the top of the detector panel are buttons for selecting the color map, where readout layer elements are weighted with events (EVT), events normalized to readout area (NEVT) or raw energy (ADC U, ADC V, ADC W, ADC U+V+W).

Mouseover callback capability was introduced by adding detectorListeners to the callbackMouseCoordinates method using a private copy of the DetectorView2D class. When streaming data the entire GUI is updated whenever mouse motion occurs over a detector element, or from a Timer function available in the Control Panel.

Control Panel

The control panel implements three customized classes (EventControl, DisplayControl and Mode7Emulation).

EventControl displays buttons for streaming EVIO data (>>), pausing the stream (||) and single-stepping forward (>) or backward (<) through the data stream. Duration of delay between event display updates in single event mode is available at right.

DisplayControl uses a slider (FPS) to control the refresh rate (frames/second) of the GUI in the absence of mouse motion. The ZMIN,ZMAX sliders control the min,max setting of the colormap to enhance contrast and also affect some histogram plots. The OPACITY slide blends different detector layers together.

Mode7Emulation panel sets parameters used in peak detection and integration of raw ADC samples when streaming MODE 1 FADC data. The custom class FADCFitter is used. Parameters may be set either manually (User button) or from CCDB. If the RefPeds box is checked CCDB loaded pedestals are used, otherwise pedestals are subtracted event-by-event.

Monitor Panel

The monitor panel uses a JTabbedPane with each tab containing a single or multiple instances of EmbeddedCanvas to display a group of user-defined monitored objects (Histos,graphs,tables). Typically these monitored objects are updated according to the detector element identified by the mouse in the detector view. Basically the framework provides the callback from the detector object mouseover to the EmbeddedCanvas and it is up to the user to decide how to map that connection to the desired monitored or calibrated object.

Each tabbed pane represents a separate class EC*app.java used to manage the organization, function and display of the monitoring task. Currently implemented are the tabs shown below. These will be described in detail further down in the Wiki.

At the bottom of the monitor panel are buttons to Clear, Save or Load datasets (mainly Histograms). A run number entry box (Run:) is provided at right. Other buttons may appear depending on the monitoring app chosen.

ECPixels

The class ECPixels is used to store data structures shared by the EC*app classes displayed in the monitor panel tabs. A number of convenience classes are instantiated and filled in ECPixels. Detector shapes for strips and pixels are derived from CCDB using the CalDrawDB class written by Nick Compton. Vertex coordinates for pixels are found from all possible U,V,W strip overlaps using Polygon2D* methods from the javaGeom package. Utility classes Pixel.java and Strip.java are used to store relevant information needed for strip PCAL and EC PMT gain and attenuation calibrations. Histograms used for raw and reconstructed quantities as well as Detector colormaps are stored in the DetectorCollection class. Calibrated EC or PCAL strips are stored as DetectorCollection objects using the CalibrationData class.

Canvas Tab Application Classes
Required txt files:
  • /etc/bankdefs/clas12/*.xml (standard component of COATJAVA distribution)
JAR files

These JAR files should supersede any pre-existing copies in the lib/clas/* or lib/plugins/* path of COATJAVA directory:

Sample input EVIO files:
  • /work/clas/clas12/lcsmith/clas12/forcar/gemc/fc-muon-500k-s2.evio
  • /work/clas/clas12/lcsmith/clas12/forcar/data/sector2_000251_mode7.evio.0

GUI Mainframe

STRIP VIEW

PIXEL VIEW

ANIMATED VIEW