Project

General

Profile

NOTE

The fully automated DQM is located here.

The new DQM files are located in the following directory:

/lariat/data/users/lariatdqm/dqm-v2/files/

The individual sub-run files are organized by their run and sub-run numbers. For run AABBCC, sub-run DDEE, the file would be located at:

/lariat/data/users/lariatdqm/dqm-v2/files/AA/BB/CC/DD/dqm_rAABBCC_srDDEE.root

For example, the DQM file for run 8504, sub-run 137 is located at:

/lariat/data/users/lariatdqm/dqm-v2/files/00/85/04/01/dqm_r008504_sr0137.root

The instructions below are outdated.

Instructions on how to make DQM plots while on shift

Log into the lariat-gateway.fnal.gov machine with the lariat account.

ssh -X lariat@lariat-gateway.fnal.gov

And then:

source /home/nfs/johnnyho/setup_dqm
cd dqm
python make_shift_plots.py [run]

where run is the either the current run or the run that just finished. To print the plots to files to upload into the ECL, follow the instructions below.

More General Instructions on how to make DQM plots

Log in to lariat-gateway.fnal.gov to perform all the steps listed below. If you don't have access, please ask someone who does have access to log in for you! You can use the DQM on an active run. Please do so to ensure that you are taking quality data!

Run by setting up lariatsoft and DQM

Log into the lariat-gateway.fnal.gov machine with the lariat account.

ssh -X lariat@lariat-gateway.fnal.gov

Set up the environment for the DQM:

source /home/nfs/johnnyho/setup_dqm

We made a directory to store the DQM files (environment variable for this directory: $DQM_FILES):

/lariat/data/users/lariatdqm/dqm/

Plotting from ROOT files

The DQM plotting scripts are located in the following directory:

/home/nfs/lariat/dqm/

Inside the directory, you will find various scripts for plotting:

In case you need to make the file for yourself (hopefully not needed regularly)

to convert you need the data_quality.fcl file - it should automatically be in your path (because you set up lariatsoft).

lar -c data_quality.fcl -s /daqdata/dropbox/lariat_r[RUN]_sr*.root -T /lariat/data/users/DQM_files/dqm_run_[RUN].root

where [RUN] is the run number (always 6 digits, so you have to pad it with zeros - xxxx->00xxxx). MAKE SURE THE FILE FORMAT IS dqm_run_[RUN].root!

Output: dqm_run_[RUN].root

For shifters (every 100 spills, and at the end of the run):

python plot_triggers.py $DQM_FILES/dqm_run_[RUN].root         # for plotting the trigger times of the different devices
python mwpc_noise_hit_separation.py $DQM_FILES/dqm_run_[RUN].root  # Same plot, but with primary hits in green and cross talk in purple
python plot_tof.py $DQM_FILES/dqm_run_[RUN].root              # for plotting the time of flight
python plot_v1751_tof_hits.py $DQM_FILES/dqm_run_[RUN].root   # for plotting the distribution of hits from the V1751 board used for TOF
python plot_v1751_pedestals.py $DQM_FILES/dqm_run_[RUN].root  # for plotting the pedestals of each channel the V1751 boards

For playtime:

python plot_mwpc_timing.py $DQM_FILES/dqm_run_[RUN].root      # for plotting the relative timing distributions of MWPC TDC hits
python plot_mwpc_channel_occupancy.py $DQM_FILES/dqm_run_[RUN].root  # for plotting the TDC channel occupancies of the MWPCs
python plot_v1751_waveforms.py $DQM_FILES/dqm_run_[RUN].root  # for plotting waveforms from each channel of V1751 boards

Saving plots

Plots can be saved using the display interface (see attached file). Unfortunately, the save function can only save files to the lariat-gateway machine (because you are running the plot maker on lariat-gateway), so you'll have to scp the plots from lariat-gateway to the machine you are using. Taking a screenshot of the plot window will also work. Please resize or maximize the plot window for all the tick labels to be displayed correctly. It would also be helpful to get the number of triggers of each device in the e-log using plot_triggers.py.

Some of the other scripts shouldn’t be used, like the plot_reco_pz.py script, because we need the new survey data before we can reconstruct the momentum.

If you edit a script, make a plot with the edited script, and then post it to the e-log, please make a note in the e-log with the details of what you did. I’m constantly combing through the e-log, and if I see a plot—with no captions or context—that is doing what it is not supposed to be doing, my first reaction will be thinking that there is a bug in the script.

Quick start

Below are the commands if you want to get started quickly or if you've done this before and need a quick reference.

ssh -X lariat@lariat-gateway.fnal.gov
source /home/nfs/johnnyho/setup_dqm
lar -c data_quality.fcl -s /daqdata/dropbox/lariat_r[RUN]_sr*.root -T /lariat/data/users/DQM_files/dqm_run_[RUN].root
cd ~/dqm
# make plots!