Difference between revisions of "HOWTO documentation"

From GlueXWiki
Jump to: navigation, search
(HOWTO Do a Quick Analysis)
(HOWTO Run the Software to Change the Angle on the BCAL Cart)
Line 236: Line 236:
 
# '''Other ROOT helpful commands:'''<br>c1->Divide(1,3); divides canvas in a zone 1 3 manner<br>c1_1->cd(); makes panel (1,1) the current pad<br>you can then draw a plot in it using the TBrowser b; graphical interface
 
# '''Other ROOT helpful commands:'''<br>c1->Divide(1,3); divides canvas in a zone 1 3 manner<br>c1_1->cd(); makes panel (1,1) the current pad<br>you can then draw a plot in it using the TBrowser b; graphical interface
  
==HOWTO Run the Software to Change the Angle on the BCAL Cart==
+
==HOWTO Change the BCAL Cart Angle==
  
 
# Open the cameras
 
# Open the cameras

Revision as of 04:21, 26 September 2006

HOWTO Use the DAQ System

The DAQ system is generally kept running on the clon03 display(s) in the Hall-B counting house. Check first if it is there before restarting it so you don't accidentally kill a run in progress.

Killing the current DAQ processes:

To kill the current DAQ processes, ssh into the halldrun account on clonxt2 and type "kill_daq". This will kill most of the DAQ processes, but not all (e.g. the mini-SQL server is not killed).


Starting the DAQ from scratch: To start the DAQ from scratch, ssh into the halldrun account on clonxt2 and type "start_daq". (Note that this will automatically run the kill_daq script first in order to remove any stray processes before starting fresh ones.) A number of new windows will open including: RunControl Server xterm (rcServer), Event Builder xterm (coda_eb), Event Recorder xterm (coda_er), CMLOG message browser, and RunControl GUI.

After the RunControl GUI window comes up:

  1. click on "Connect"
  2. click on "Configure"
  3. select the appropriate configuration and click "OK"
  4. click "Download"
  5. click "Start Run"
  6. click "End Run" whenever you are ready to end the run.

Repeat steps 5 and 6 as needed.

If you need to change the run type, end any current run and hit "Abort". Then you will see the "Configure" button and can repeat steps 2-6.

If you have problems with the DAQ that you can't solve, then page the DAQ person on-call whose number should be written on the white board in the counting house.

HOWTO Configure the Trigger

The Trigger Supervisor module can be configured remotely from the counting house. The most common changes shift workers will need to make will be to change which triggers are enabled and what their prescale values are. This can be done using the trigConf program.

To start trigConf, log into clonxt2 under the halldrun account and type "start_trigConf". The following window will appear.

TrigConf.gif

From the File menu, select open and the choose the file corresponding to the run type you desire. For example, to edit the trigger configuration for the COSMIC runs, select COSMIC.trig.

Edit the trigger settings. The triggers are defined as follows (updated on Sept.22 at 17:30, see e-Log 36):

  1. MOR
  2. BCAL N OR S
  3. BCAL N AND S
  4. MOR AND (BCAL N OR S)
  5. MOR AND (BCAL N AND S)
  6. Cosmic coincidence
  7. Pulser
  8. Bit 5 delayed by 16ns
  9. Bit 5 delayed by 32ns
  10. VETO
  11. BCAL S
  12. BCAL N

Prescale Values: The prescale value should be interpreted as the number of triggers that should be skipped between accepted triggers. For instance, when the prescale is set to "0", then every trigger is accepted. When the prescale is set to "1", then every other trigger is read. When the prescale is set to "2", then every 3rd event is read.

Trigger enable: When the checkbox is red and pushed in, then the that trigger is enabled. When it is up and grey, then that trigger is disabled.

Select Save from the "File" menu to save your changes.

Changes will take affect during the pre-start of the next run. This essentially means that if you save your changes when you can see the "Go" button on the RunControl window, you will need to "Abort" and then either "Prestart" or "Start Run" if you want the changes to take affect for the next run.

HOWTO Modify High Voltage

Log into the clasrun account on clon10.jlab.org and run tsconnect gluex_hv.

This should establish a serial connection to the HV crate. The state of the serial connection will depend on how it was left the last time someone used it.

If the HV crate has just been rebooted you may see a message about typing "1450" whenever you hit return. In this case, type in "1450" and hit return.

If you see the "127/EDIT/1450>" prompt whenever you hit return, then type "vt100" to get into the control interface which should look something like this:

LRS1450.gif

Use the menu on the left of the control interface to modify the settings.

The notaion used by the interface is slot.channel where slot is a number ranging from 0 to 4 and channel ranges from 0 to 11.

Here are the channel assignments:

Slot 0   Slot 1   Slot 2   Slot 3   Slot 4   
.0 N1    .0 N13   .0 S5    .0 S17   .0 COSMIC1
.1 N2    .1 N14   .1 S6    .1 S18   .1 COSMIC2
.2 N3    .2 N15   .2 S7    .2 S19
.3 N4    .3 N16   .3 S8    .3 S20
.4 N5    .4 N17   .4 S9
.5 N6    .5 N18   .5 S10
.6 N7    .6 N19   .6 S11
.7 N8    .7 N20   .7 S12
.8 N9    .8 S1    .8 S13
.9 N10   .9 S2    .9 S14
.10 N11  .10 S3   .10 S15
.11 N12  .11 S4   .11 S16

When you are done you may wish to log out. First, exit vt100 mode by hitting "q". Then type the following sequence to exit the serial session:

Return ~ q

<NOTE: WE NEED TO ESTABLISH A METHOD OF RECORDING THE HV VALUES IN CASE OF EQUIPMENT FAILURE! DOCUMENT RECOVERY PROCEDURE HERE!>

HOWTO Make a logbook Entry

Look here.

HOWTO Access Online Histograms

HOWTO Move the BCAL

HOWTO Check the Beam

HOWTO Analyze Data Offline

At this point in time, we plan to create ROOT trees with the data for general ease of use. The format of the trees has not been defined nor any specific code written. This document should be updated when that is done.

One can also analyze the raw data directly using the JANA framework. It can be used to create ROOT files with customized histograms or trees. That method is described below.

To analyze raw data offline, you will need 2 things:

  1. JANA - the generic reconstruction framework
  2. bcal06 - source code specific to the BCAL beam test of 2006

Getting JANA

If you are working on the JLab CUE system, you can simply set the following environment variables:

  • setenv JLAB_HOME /group/12gev_phys/builds/latest
  • setenv PATH ${PATH}:${JLAB_HOME}/bin/${OSNAME}

where presumably, OSNAME is set to something like "Linux".

If you are going to do analysis offsite you have 2 options. This first is to just download the JANA source code which already has Linux and Darwin(PPC) binaries from the web here. Just unpack this anywhere on your system and set your JLAB_HOME environment variable to point to it.

The second option for installing JANA offsite is to checkout the source from the subversion repository and build it yourself. Here's how:

>mkdir JANA

>cd JANA

>setenv JLAB_HOME $PWD

>svn co https://phys12svn.jlab.org/repos/trunk/src

>cd src/JANA

>make install

>cd ${JLAB_HOME}/src/janadump

>make install

Make sure to set JLAB_HOME in your .cshrc file as well as PATH so you don't have to set them everytime you log in.

Getting bcal06

This you will need to checkout from the Hall-D subversion repository. Here are the steps:

>mkdir bcal06 (this can be anywhere you want)

>cd bcal06

>setenv JLAB_MY $PWD

>svn co https://halldsvn.jlab.org/repos/beam_tests/bcal06/src (Note: some of the source that gets checked out is only useful for online.)

>cd src/plugins

>make install

>setenv JANA_PLUGIN_DIR ${JLAB_MY}/lib/${OSNAME}

The JANA_PLUGIN_DIR environment variable is used to tell JANA a directory in which to look for plugins. At this point, you should be able to run the janadump program using a raw data file as input like this:

>janadump gluex01234_COSMIC.dat.00

Run janadump with no arguments to get a list of options. (The most useful will be the -D option.)

Writing your own analysis program

Two skelton programs exist to help you get started on processing events with JANA. For creating ROOT files, look at ${JLAB_MY}/src/bcal_root. For a more generic example that does not use ROOT, look at ${JLAB_MY}/src/bcal_ana.

HOWTO Use the Event Viewer

To use the event viewer online (i.e. to look at events as that are read by the DAQ system):

  1. Log into the halldrun account on clonxt2.jlab.org
  2. run bcal_view like this:

>bcal_view ET:bcaltest

To use the viewer with a file, just give it the file name as its only argument:

>bcal_view gluex01234_COSMIC.dat.00

Note: If the program exits on the first event with a message about "NO MORE SOURCES" then check that your JANA_PLUGIN_DIR environment variable is set and points to a directory containing the DEventSourceET.so (or similar) file.

If all goes well, you should be able to hit the "Cont" button to display continuous events which will look something like this:

Bcalview.gif

NOTES:

  • The viewer knows nothing about the position or orientation of the beam wrt the module. The "beam" indicator is only meant to show the side of the module on which the beam enters.
  • There are a fixed number of "dots" drawn that represent the last several events. These are only meant to give some indication of where along the module the beam is hitting. The colors represent only the current event.
  • There grey dots are supposed to be on the other side of the middle set of boxes(left half of module) and are meant to give the illusion that you are seeing them through the semi-transparent plane. The black dots are either on the right half of the module, or are not obscured by the middle set of boxes.
  • The middle set of boxes are the geometric means of the values on either end.

HOWTO Report ABUs

Running under Hall B, run the 'account' Beam Time Accounting (BTA) program to enter ABU's (beam available and in use). The beam usage must be recorded hourly by the shift expert and reported to MCC prior to the end of each shift. For a test run, beam usage can be interpreted fairly liberally even when studies are underway that do not result in recordable data. The crew chief will call to ask for the numbers, which are summarized using the 'get info to MCC' button. There is a 'Help' buttom at the bottom of the page with instructions on the use of the program.

HOWTO Make a Hall Access

  1. Call MCC (7050 or 7048) and request a 'Controlled Access' for your work.
  2. Go down to the Hall-B entrance under the 'buddy system'.
  3. Call 7050 from the first phone a state the request for entrance. The MCC will switch from 'Beam Permit' to 'Controlled Access' and unlock the door.
  4. The crew should scan their user badges and then enter the lock.
  5. Pull the master key out, place in key release lock and twist. Remove keys as necessary, one per crew member.
  6. Call 7050 and give names, key numbers, show badges to camera and declare ODH status (must be current).
  7. Once inside, wear a hard hat.
  8. Work of duration 1 hour or less at the alcove can be done without a Rad Con sweep and we have unlimited duration access to the PIE tower (electronics area).

HOWTO Do a Quick Analysis

  1. ssh halldrun@clonxt2
    password d1tocome
  2. Data are stored at /mnt/raid1/halld
    cd to this directory
    data files have names like gluex-----_PRODUCTION.dat.00 and gluex-----_COSMIC.dat.00 depending on the run configuration, where ----- is the run number.
  3. There are three root analyzers available
    • bcal_mon is the "up to date" analyzer producing energy and ADC histograms for the N,S sides, trigger bits, etc.
    • bcal_dst produces trees filled with raw ADC and TDC information.
    • bcal_mon_channel produces additional energy histograms for each BCAL PMT.
      typing:
      bcal_mon_channel ../gluex02301_PRODUCTION.dat.00
      (if you do this from /mnt/raid1/halld/rootfiles/ ) will produce root file "bcal_mon02301.root"
      • note: you can stop an analyser by pressing Crtl-C after any amount of events (preferably 100K or so) instead of waiting for the full data file to be analysed.
    • it is best to move this file to your own computer of choice, where ROOT exists, other than clonxt2 by typing
      " scp halldrun@clonxt2:/mnt/raid1/halld/rootfiles/bcal_mon02301.root . " from your desired computer
  4. Useful ROOT commands for the novice
    start ROOT by typing " root bcal_mon2301.root ".
    Bring up the tree browser by typing " TBrowser b; "
    You can create more than one graphics window from File->Open Canvas
    Switch the active graphics window (e.g. c1) by typing: c1->cd();
  5. Cell configuration
    1-6 is the top row from front to back
    7-12 is the middle row
    13-18 is the bottom row
  6. Other ROOT helpful commands:
    c1->Divide(1,3); divides canvas in a zone 1 3 manner
    c1_1->cd(); makes panel (1,1) the current pad
    you can then draw a plot in it using the TBrowser b; graphical interface

HOWTO Change the BCAL Cart Angle

  1. Open the cameras
    1. Front of the Detector: http://cctvpt1
    2. Back of the Detector: http://cctvpt2
  2. Run the Motion Software
    1. ssh halldrun@gluex_sc
      password d1tocome
    2. Type BGV_Cart_Motion
    3. Enter an angle between the limits provided by the software
    4. Enter the carriage position
    5. Wait for the software to finish
    6. Record the data file name printed in the logbook