Skip to content

FT COSMIC Calibration tutorial

Robert Behary edited this page Jul 2, 2019 · 17 revisions

This tutorial explains the functionalities of the FT COSMIC calibration suite


How to run the program
To download, compile and run the program, refer to the following instructions:

  • get a recent version of coatjava from the distribution site at http://clasweb.jlab.org/clas12offline/distribution/coatjava/ or from https://github.com/JeffersonLab/clas12-offline-software/releases and point the COATJAVA environment variable to it:

    wget http://clasweb.jlab.org/clas12offline/distribution/coatjava/coatjava-6x.x.x.tar.gz

    tar xvfz coatjava-6x.x.x.tar.gz

    setenv COATJAVA $PWD/coatjava

  • get the calibration code from the git repository:

    git clone https://github.com/JeffersonLab/clas12calibration-ft

  • compile the calibration code:

    cd clas12calibration-ft

    ./build.sh

  • jar files for each of the FT calibration projects will be built and saved in the lib folder

  • launch the cosmic calibration code as follow:

    ./bin/ftCalCosmic

The main panel will show up:

FTCalLedAndCosmic main panel

Clicking on the button located on the bottom of the right panel, you can:

  • E: open an evio file
  • ET: connect to the ET ring (if running on-line)

or, using the menu File on the left top corner of the left panel you can:

  • Load files: download multiple files for the analysis;
  • Open histogram file: download a file containing results of a previous analysis (if you want to adjust fits after). The Summary table is updated with values from the file. To update the values, you need to update the table under the tab (Table -> Update table).

It is also possible to download a set of histograms to be used as a 'reference' and compare to current analysis (File -> Load reference). In this case no adjustment on the fits is possible and previous values are not uploaded into the Summary table.

Results of the analysis can be saved as a table (Table -> Save table) or as a full set of histograms (File -> Save histograms).

Cosmic selection criteria
Cosmic muons are selected by imposing the following cuts on the neighboring crystals of the one under analysis:

  • only vertical tracks (all crystals have to be aligned in a column), to avoid a spread due to skewed tracks;
  • minimal number of crystals (Min) used to define a 'good' cosmic track;
  • number of crystals used to check if the minimal number of crystals is reached (Tot);
  • threshold, in fADC counts, (Thr) to consider a waveform produced by a 'signal'.
    Some parameters in the analysis can be changed using the menu Settings -> Set analysis parameters ...

By default the analysis parameters are fixed as follow:

  • Min=4
  • Tot=5
  • Thr=7
    The analysis results (summarized in the Summary table do change based on the analysis parameters. The user can run an analysis with a set of parameters, save histos in a file (File -> Save histograms), reset table and histos (Table -> Clear Table and Reset button on the bottom right corner), change parameters, run again and compare new/previous results loading the 'reference histos (File -> Open histograms file).

Processing a single evio file interactively
After selecting the file (using E) and clicking on it, wait for the big arrows on the low-left panel to become active. You can now process the events with the standard settings clicking on the 'play-like' arrow, stop the processing ('pause like'button'), move to the next event ('light-right-arrow'). Be patient: after clicking pause, it takes a while to really pause and let you work interactively (event-by-event).

Processing a single or multiple files on batch
After selecting a file or a list of files (using Load files), the program will run over all events in the file(s). The app is not responsive during the data analysis. Wait till the end to see the results of the analysis. The Terminal window will show the number of events processed so far. When finished you will see the last event processed on the calorimeter (crystal) view.

The calorimeter (crystal) view
The left panel shows the calorimeter view (from downstream) where each square represents a crystal. For each event firing channels are shown in magenta. Click on a square (crystal) and the corresponding information will be shown on the right panel. The selected crystal is shown in red. The default view, labeled as Event report information event-by-event. The other possible views correspond to cumulated information.
It is suggested to look at these views only after processing a significant statistics or the whole file(s)

  • Status: channel working properly are shown in green, problematic channels in orange, severely problematic channels in blue, and dead-channels in grey.
  • Pedestals: mean value of the pedestal of each channel (in fADC channels).
  • Pedestals RMS: RMS of the pedestal distribution for each channel (in fADC channels).
  • Noise: mean value of the noise recorded for each channel (in mV).
  • Occupancy: shows how each channel has been populated (this may depends on the selection applied!)
  • Charge: mean value of the integrated charge (in a certain range and pedestal-subtracted) recorded for each channel (in pC).
  • Charge Sigma: sigma of the integrated charge distribution recorded for each channel (in pC).
  • Amplitude: value of the amplitude at the peak (in mV) recorded for each channel (TO BE ADDED).

The EVENT VIEWER tab

The crystal identifier (component and X,Y coordinates) is shown on top of the wave form sampled for the current event.

The wave form shows some markers (black dots) and area in different colors that corresponds (from left to right) to: - the range used to evaluate the pedestal; - the NSB range; - the threshold (over the pedestal) for pulse detection; - the position where time is calculated (dynamically set to 1/2 of the maximum amplitude, corresponding to a CF discriminator); - the maximum amplitude (dynamically determined); the NSA range. Values currently used are shown in the left-bottom panel. Predefined values are downloaded as default and can be modified if the User button is active (otherwise, if CCDB button is selected, the default values are used).

The Mode 1 (selected by default) mimics the fADC Mode 1 data recording. With Mode 1 selected

The user can chose: - the pedestal range (first and last ADC channel); the pulse length (first and last ADC channel); - the threshold for pulse detection.

To enter a new set point, after typing, be sure you press the RETURN/ENTER key. The new value will be used starting form the next event.

The NOISE tab
The NOISE view allows to analyze data to obtain pedestal and noise value per each channel.

The upper panels show the pedestal mean value (in counts) and the noise (in mV) for all crystals while the lower panels show pedestal and noise distributions for the selected crystal on the left Event panel (on the left). A pedestal and noise value equals to 0 means the channel has not been recorded by the DAQ.

The ENERGY tab
The ENERGY view allows to analyze the energy (charge) deposited on each crystal.

All quantities displayed in this view are relative to a specific crystal (selected on the left Event panel). The top-left shows the waveform pedestal-subtracted averaged over all collected events. The top-right panel shows the wave form, pedestal subtracted, averaged over all events used in the analysis (matching the cosmic analysis criteria). The bottom-left panel shows the maximum signal amplitude distribution (in mV) while the bottom-right shows the charge (in pC) distribution. The MIP peak is being fitted with an exponential + Landau distribution. The fit can be adjusted and repeated by opening the Fit panel.

The mean value, the sigma of the charge distribution and the Chi2 will enter in the summary table reported at the end. In case of manual adjustment of the fit, the new parameters are automatically uploaded into the table.

The COMPARISON tab
The COMPARISON view allows to compare amplitude and charge histograms from the current analysis to some reference.

The reference histograms can be uploaded by using the File -> Load reference menu. Current analysis histograms are shown in the upper part of the canvas while the reference are shown at the bottom. The reference file can be loaded either before or after the file that is going to be used for the current analysis. Using the Fit -> Adjust fit menu fits (for the current analysis ONLY) can be adjusted. reference fits cannot be modified. If fits are adjusted, new parameters are automatically uploaded in the Summary table. To see the changes in the summary table, you need to use the Table -> Update table command.

The SUMMARY tab
The SUMMARY view report the summary of the values obtained in the analysis for each crystal.

Crystals are labeled according the Component number reporting: status (0 means ok while -1 indicates some problems), pedestal value and RMS (in counts), noise (in mV), Occupancy (number of counts in the MIP peak ??) mean value of the charge (in pC), sigma of the charge distribution (in pC), and Chi2 of the exp+Landau fit. Any anomalies (values outside some predefined limits) are highlighted in red. The bottom menu has features not yet implemented in the program and can be ignored. At the end of the analysis the table can be saved as a .txt file using the menu on the top-left corner of the left panel or cleared for a fresh start with a new file/ET data.

What to expect from the analysis