Barrel Calorimeter

From GlueXWiki
Jump to: navigation, search

Updated DAQ Instructions:

Starting The Processes

Obtain the DAQ software

This will check out a completely new installation of the DAQ environment.


After installing fresh DAQ software, the runnumber will be 1 and needs to be changed to a different value to fit in with the scheme.

Starting DAQ

  1. Open a terminal
    >ssh hdbcalops@gluon105
    >pass: GlueX_2come
    >cd daq_dev_vers/work
    >source online_setup.cshrc
    At this point, a bunch of green crate windows should pop up, along with RCM RUN CONF. To open the "Gui," click on the DAQ:START button near the bottom of the window. Ensure, before you click start, that you have selected the correct setup, trigger and run from the three drop-down menus.

To exit the DAQ, simply click DAQ:STOP.

Starting CSS for monitoring and control

  1. Get a different terminal open, and then:
    >ssh hdops@gluon49 (gluon29 is fine as well)
    >pass: GlueX_2come
  2. A box called "Select Workspace" will pop up on the large monitor; select either BCAL or Default
  3. Get open the BCAL LED Pulser in addition to the BCAL_Voltages window that should open. You may have to click around a bit if all the options are not available right away. One of the buttons at the top, called "Open Top OPIs in Run Mode" should bring up the sidebar, which has all the options including the LED Pulser and BCAL_Voltages.

Taking Data

On the gui: > control > connect > first button(configure) > second button(download) > third button(prestart)

At this point, there are three ways you can operate - a Custom LED pattern, a bias voltage script, or with cosmic rays:

Custom LED pattern

Press whatever LEDs you want on in the LED Pulser window, and set their pulse rate and whatnot. Once you want to start taking data, press play on the Gui, and then start the pulsers. Stop the Gui when the pulsing is done, or you have sufficient data.

LED Script to test individual SiPM and LED combinations

Open the voltage GUI in CSS as instructed above and turn off all the BCAL bias voltages first.

Open a terminal and login to hdbcalops@gluon105 (It may not matter where you login but this should work)

> cd /gluonfs1/home/hdbcalops/daq_dev_vers/daq/tools/bcal_pulse_sequence
> –s D –q 1

Here, the –s can have either a D or a U following it, for up or downstream LEDs to fire. The –q indicates which quadrant you wish to select. Also, by having a 1 or a 10 after a –n you can select either 1 or 10 pulses per configuration (default is 1). The command –h will bring up a help menu. You can run multiple trials in the same data set; just enter new commands and keep the Gui running. For example, to run both north side quadrants you would use –q 1 and then –q 4.

For example, to run the south side, upstream LED pulser, 10 pulses per setting and (large) bias of 7 V (nominal setting to check status):

> -s U -q 2,3 -n 10 -b 7

Same for north side, upstream LED pulser, 10 pulses per setting and (large) bias of 7 V:

> -s U -q 1,4 -n 10 -b 7

LED Script to scan signal size over individual SiPMs

Use the tool, which has syntax like the tool.

> cd daq_dev_vers/daq/tools/bcal_pulse_sequence
> –s D –q 1,4 -n 10

Cosmic Rays

Provided the triggers are correctly enabled, all you need to do is press start (the play button) on the Gui. The events should start counting up at a rate a little less than 1 Hz.


Root Analysis

Create a Root file

Now, you are ready to write the file. It helps to keep things organized if you open another terminal for this; using hdops@gluon105 should work.

Make sure to keep a note of the run number, to use in your file. To get into the directory of your .coda file:

> cd /gluex/Subsystems/BCAL/data

There are a few ways you can write the file, depending what you wish to accomplish.

For looking at individual events in dump_tree_waveform_dalton.C, use the following command:

> hd_root -PPLUGINS=DAQ,DAQTree,TTab,BCAL_online datafile –o /gluex/Subsystems/BCAL/rootfiles/newfilename

Where datafile is the original file created from the run (which can be found on the gui under "Output File") and new filename is what you want to call the root file. For example:

> hd_root –PPLUGINS=DAQ,DAQTree,TTab,BCAL_online bcal_3049.0.coda –o /gluex/Subsystems/BCAL/rootfiles/bcal_3049.root

Here, the 3049 is an example run number. Use whatever run number you have. You may need to use different plugins (like DAQ, DAQTree, etc.) depending on what you want in your root file.

For the SiPM_Tester, the command is:

> hd_root -PPLUGINS=DAQ,DAQTreeBCAL,TTab,BCAL_online datafile –o /gluex/Subsystems/BCAL/rootfiles/newfilename

The filenames should follow a pattern. For dump_tree_waveform_dalton.C+,


For SiPM_Tester,


You can look at other files in .../data for comparison.

Analyzing Data

We are now ready to run the file in root!

> root

Then, for dump_tree_waveform_dalton.C,

> .L /gluex/Subsystems/BCAL/scripts/dump_tree_waveform_dalton.C+
> dump_tree_waveform_dalton(“filename”)
And you can press enter to page through the events.

OR, for SiPM_Tester,

> .L /gluex/Subsystems/BCAL/scripts/SiPM_Test.C+
> SiPM_Tester(“filename”)
The return key will page through events, and pressing e will take you to the end.

Note: You may have to use the full path length name for any files or macros you interact with if you are not in their directory when entering commands.

Note 2: The tab key will be very useful in both speeding up the command process and ensuring you (and I) have written things correctly in the terminal. Use it as often as you can.

For crate/slot/channel translation to module/channel see Translation Table

Beam Data

You can analyze like this:

> hd_root -PPLUGINS=DAQ,TTab,DAQ_online,BCAL_online /gluonraid1/rawdata/volatile/RunPeriod-2014-10/rawdata/Run000954/hd_raw_000954_000.evio -o /gluex/Subsystems/BCAL/rootfiles/bcal_954.root

Make the plots:

> root -l -b -q "/gluex/Subsystems/BCAL/scripts/plotOnlineHistograms.C+(954)"

View the plots:

> gthumb /gluonraid1/rawdata/active/RunPeriod000/BCAL/plots/online/954

Event Display

To view events with the event display

> hdview2 -DDBCALHit -PPLUGINS=TTab,DAQ -PEVENTS_TO_SKIP=100 /gluex/Subsystems/BCAL/data/bcal_combined_n3133_s3132.coda


So you've diligently followed the steps above, and something still isn't right. What gives? Here are some things to watch out for:

  • Ensure you are running the DAQ from the proper machine and account. hdbcalops@gluon105 should definitely work, but not all machines and accounts are properly configured for it.
  • The voltages of one or more modules may be inhibited or otherwise refusing to cooperate. Open up CSS and make sure they can all turn on. If they are inhibited, you can reset them all by clicking ALL U/D BIAS > Reset and turn OFF Bias channels. You can do one module at a time by clicking on that particular module, then menu > show bias channels > clear events and turn off
  • You may also need to reset the physical fADC crates down in the hall. You may want to get someone to show you how to do this part properly, but effectively you turn off the crate(the green I/O switch), unplug it at the bottom (the big plug with the orange cord), wait a few seconds, plug it back in, and turn it back on.
  • Make sure your triggers are enabled correctly (ie that you have the cosmic trigger enabled for taking cosmic data, etc). The trigger configurations can be found in the log book.
  • Ensure that you are using the right config file. The file is daq_pro_vers/daq/config/bcal/bcal.conf and it should say either cosmic or pulser, depending what you want to trigger on.
  • Check that the rocbcal#_pulser.cnf and rocbcal#_cosmic.cnf files have the correct offset values. They should match the values in the tempconfigs directory for whatever you are trying to trigger with (if you are using the DS pulsers, for example, make sure that the rocbcal#_pulser.cnf files in daq_pro_vers/daq/config/bcal have the same offset values as the rocbcal#_pulserDS.cnf files in daq_pro_vers/daq/config/bcal/tempconfigs).
  • You may sometimes get the error "Maximum number of clients reached" or something similar, and some or all of the windows you need will not pop up. This effectively means that there are too many windows open on the particular account/computer you are using, so to fix this one can either close unnecessary windows, or switch to a different account/computer to solve the problem.

This list is far from extensive - feel free to add to it!

Old Instructions

An example of how to start DAQ for the stand alone BCAL (four north or south crates) with the external pulser connected to the master TI.

  1. Login to gluon49 under hdops
    ssh hdops@gluon49
  2. Load the environment
    source /gluex/Subsystems/BCAL/setupcoda3
  3. Start DAQ for 4 north or south crates:
    bcal_N4_start or
    note that the command to terminate all DAQ processes is for example
  4. Choose configuration: Configurations-->Coda Config-->bcal_s4 (or bcal_n4)
  5. Settings in the Run Control (you have to set these variables once if you edit coda configuration with jcedit)
    Set User --> Runtime Variables --> Config File to /gluex/Subsystems/BCAL/bcal_pulser_ti/pulse
    Set User --> Runtime Variables --> List --> %(CODA_ROL) to /gluex/release/0.1/src/rol/bcal_base_ti
  6. FADC250 configuration files are located in /gluex/Subsystems/BCAL/bcal_pulser_ti
  7. Data output: /gluex/Subsystems/BCAL/data/south4
    /gluex/Subsystems/BCAL/data/north4 (default)
  8. Due to some glitches in the firmware you have to start run first before enabling external triggers (will be fixed)