Project

General

Profile

DQM plots » History » Version 35

« Previous - Version 35/69 (diff) - Next » - Current version
Edward Kearns, 03/06/2015 09:41 PM


NOTE

HEY. Please note that a fully automated DQM will be implemented in following week so that people don’t have to suffer through this. :(
THIS IS ONLY TEMPORARY.

Contact information if there are problems:

Email/Google chat:  johnnyho@uchicago.edu
Cell/text:          +1 714 213 0793
Skype:              johnnyho1@outlook.com

Instructions on how to make DQM plots

The ArtDAQ data files are being written to the /daqdata directory on the lariat-daq01 machine. Log in to lariat-daq01.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!

Do not log in as lariat, log in with your user account. The lariat user sets up evnironment variables that will cause trouble.

Run by settng up lariatsoft and set location of dataquality (beginners)

First we will set up the environment

source /grid/fermiapp/lariat/setup_lariat.sh

now, setup lariatsoft:

setup lariatsoft v01_00_06 -q e6:prof

We made a directory to store the DQM files:

/lariat/data/users/DQM_files/

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/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

Now, if you don't want to muck in compiling code
GOTO Python:

Quick LArSoft setup guide

The first thing we must do is setup lariatsoft. First we will set up the environment

source /grid/fermiapp/lariat/setup_lariat.sh

this sets up the required products like git, gitflow, mrb

At the time of writing this, we are using using v03_08_02 of larsoft with lariatsoft

If you're running for the first time, or the larsoft release has changed

setup larsoft v03_08_02 -q e6:prof

The next thing we will do is create a directory for your larsoft release

cd /path/to/larsoft/dir
mkdir v03_08_02
cd v03_08_02

create a new larsoft release

mrb newDev 

and then tell mrb that you will be running from this directory

source localProducts_larsoft_v03_08_02_e6_prof/setup

To set up lariatsoft with your larsoft release

cd $MRB_SOURCE
mrb g lariatsoft

Now it is time to build your release and then tell larsoft to use your locally built libraries

cd $MRB_BUILDDIR
mrbsetenv
mrb i -j 4
cd $MRB_TOP
mrbslp

If you already set up your directory, and the release has not changed:

cd /path/to/larsoft/dir
cd v03_08_02
source localProducts_larsoft_v03_08_02_e6_prof/setup
mrbslp

Now you are ready to produce some ROOT files to make plots with.

Producing ROOT-readable files from ArtDAQ files

I suggest that you wait until a run is complete before running over the ArtDAQ files (please note that this will change when the next iteration of the DQM is implemented). To produce some ROOT-readable files from the ArtDAQ files, do

lar -c data_quality.fcl -s  /daqdata/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

Plotting from ROOT files

Python:

Set up Python and Python modules for plotting

source /home/nfs/andrzejs/DQM_test/setup  # on lariat-daq01.fnal.gov

Git clone the data quality plotting scripts into your desired directory

git clone ssh://p-lardbt@cdcvs.fnal.gov/cvs/projects/lardbt-koala-tea ~/data-quality
cd ~/data-quality

If you are getting permission errors, make sure you are listed as a developer to the lardbt redmine: https://cdcvs.fnal.gov/redmine/projects/lardbt
If you are not a developer, ask someone to add you.

IMPORTANT: To update your local copy of the repository with the latest scripts, run git pull inside your local repository directory.

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

python plot_triggers.py /lariat/data/users/DQM_files/dqm_run_[RUN].root         # for plotting the trigger times of the different devices
python plot_mwpc_timing.py /lariat/data/users/DQM_files/dqm_run_[RUN].root      # for plotting the relative timing distributions of MWPC TDC hits
python plot_tof.py /lariat/data/users/DQM_files/dqm_run_[RUN].root              # for plotting the time of flight
python plot_v1751_waveforms.py /lariat/data/users/DQM_files/dqm_run_[RUN].root  # for plotting waveforms from each channel of v1751 boards
python fragment_correlation.py /lariat/data/users/DQM_files/dqm_run_[RUN].root  # timing drift between MWPCs and V1751 board 1 (CAEN boardId 8)

Plots can be saved using the display interface (see attached file)

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.