The fully automated DQM is located here.

The new DQM files are located in the following directory:


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:


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


The instructions below are outdated.

Instructions on how to make DQM plots while on shift

Log into the machine with the lariat account.

ssh -X

And then:

source /home/nfs/johnnyho/setup_dqm
cd dqm
python [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 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 machine with the lariat account.

ssh -X

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):


Plotting from ROOT files

The DQM plotting scripts are located in the following directory:


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 $DQM_FILES/dqm_run_[RUN].root         # for plotting the trigger times of the different devices
python $DQM_FILES/dqm_run_[RUN].root  # Same plot, but with primary hits in green and cross talk in purple
python $DQM_FILES/dqm_run_[RUN].root              # for plotting the time of flight
python $DQM_FILES/dqm_run_[RUN].root   # for plotting the distribution of hits from the V1751 board used for TOF
python $DQM_FILES/dqm_run_[RUN].root  # for plotting the pedestals of each channel the V1751 boards

For playtime:

python $DQM_FILES/dqm_run_[RUN].root      # for plotting the relative timing distributions of MWPC TDC hits
python $DQM_FILES/dqm_run_[RUN].root  # for plotting the TDC channel occupancies of the MWPCs
python $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

Some of the other scripts shouldn’t be used, like the 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
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!