Project

General

Profile

DQM plots » History » Version 35

Version 34 (Johnny Ho, 03/06/2015 08:57 PM) → Version 35/69 (Edward Kearns, 03/06/2015 09:41 PM)

h1. 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:
<pre>
Email/Google chat: johnnyho@uchicago.edu
Cell/text: +1 714 213 0793
Skype: johnnyho1@outlook.com
</pre>

h1. 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.*

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

First we will set up the environment

<pre>
source /grid/fermiapp/lariat/setup_lariat.sh
</pre>

now, setup lariatsoft:
<pre>
setup lariatsoft v01_00_06 -q e6:prof
</pre>

We made a directory to store the DQM files:
<pre>
/lariat/data/users/DQM_files/
</pre>

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

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

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

h2. Quick LArSoft setup guide

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

<pre>
source /grid/fermiapp/lariat/setup_lariat.sh
</pre>

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

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

<pre>
setup larsoft v03_08_02 -q e6:prof
</pre>

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

<pre>
cd /path/to/larsoft/dir
mkdir v03_08_02
cd v03_08_02
</pre>

create a new larsoft release

<pre>
mrb newDev
</pre>

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

<pre>
source localProducts_larsoft_v03_08_02_e6_prof/setup
</pre>

To set up lariatsoft with your larsoft release

<pre>
cd $MRB_SOURCE
mrb g lariatsoft
</pre>

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

<pre>
cd $MRB_BUILDDIR
mrbsetenv
mrb i -j 4
cd $MRB_TOP
mrbslp
</pre>

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

<pre>
cd /path/to/larsoft/dir
cd v03_08_02
source localProducts_larsoft_v03_08_02_e6_prof/setup
mrbslp
</pre>

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

h2. 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

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

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@

h2. Plotting from ROOT files

*Python:*

Set up Python and Python modules for plotting

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

Git clone the data quality plotting scripts into your desired directory

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

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:

<pre>
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)
</pre>
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.