-
Notifications
You must be signed in to change notification settings - Fork 0
Installation and examples
- In
CMSSW_10_2_18/src
, clone the Submission repository:
git clone https://github.com/VandyHEP/NanoAOD_Submission.git
-
The script that we use to submit jobs to the cluster is
remote_nano.py
. It will take as an input a text file which contains the list of samples you wish to analyze. -
Before you submit jobs, execute the following:
./make_tester.sh
- Establish your analysis directory by setting the environment variable
ANALYSISDIR
:
export ANALYSISDIR=/uscms/home/<username>/nobackup/CMSSW_10_2_18/src/NanoAOD_Analyzer
To avoid doing this every time you log into a new session, you can add this line to your ~/.bashrc
file.
When it comes to creating lists of samples over which to run, we have options:
- I created a file that has a list of pertinent 2016 MC samples over which you can run:
Nano_SAMPLE_MC22_2016.txt
. Have a look. - A few things to note:
- My preference is to run with the Submission framework over the data separately. To do this, you will execute the same set of instructions for Submission listed here but with
Nano_SAMPLE_data3_2016.txt
replacingNano_SAMPLE_MC22_2016.txt
. - You can search for the samples via the CMS Data Aggregation System or DAS (see below).
- This list of samples is for the purposes of this exercise and IS NOT the most recent data or MC to use. When the time comes, ask a friend (You’ve got a friend in me...) which data/MC version to use depending on what’s available or check the information of the official Run II analysis recipe here.
- You can use DAS to make your own sample list.
- My preference is to run with the Submission framework over the data separately. To do this, you will execute the same set of instructions for Submission listed here but with
das_client –query="/TT*/*05Feb2018*/NANOAOD*". # This would allow you to search for ttbar in the 2016 MC for this processing.
das_client –query="/TT*/*05Feb2018*/NANOAOD*” >> samples.txt # This would allow you to pipe that information for ttbar into a file called samples.txt
IMPORTANT: when naming the text file of your sample list, make sure to include the year that corresponds to those samples, since this is an input read by the latest version of the Analyzer.
IMPORTANT: Before you submit, ensure that your EOS area is properly linked to your CERN/Fermilab LPC username. If you have never gone through the linking process, you likely will have to do so. You can utilize the following link.
To submit, type:
./remote_nano.py Nano_SAMPLE_MC22_2016.txt
This allows you to make your submissions via condor. You will likely be prompted to enter your grid passphrase. Follow the prompts. To check the status of your condor jobs:
condor_q <username>
You can also use the LPC online tool to monitor the status of your jobs: https://landscape.fnal.gov/lpc/. Make sure you open this link on the browser you installed your CMS grid certificate.
Once the jobs are done (i.e. disappear from the queue), you want to combine the output files for each individual input file analyzed. For this, we use the add_root_files.py
script:
./add_root_files.py -i /eos/uscms/store/user/<username>/run_2020_<month>_<day>_<hour>_<minute>
This script will produce a directory labeled output2020_<month>_<day>_<hour>_<minute>
, where <month>
, <day>
, <hour>
, and <minute>
will appear numerically. This file has the root files you want to use to plot.
Again, I run over data separately. You execute the same set of instructions with the appropriate text file now for the data list. You can run the add_root_files.py
script to combine all the output root files from the data set analyzed into a final file called allData.root
.
Next, we use the Plotter to obtain some histograms:
-
If you have the Plotter already: There’s an example Plotter configuration file in the Submission directory called
highmass.config
. Skip to the next subsection. -
For those who still need the Plotter:
- Navigate to your
CMSSW_10_2_18/src
directory in LPC. Executecmsenv
if you have not done so already. - Clone the Plotter from GitHub.
- Navigate into the
Plotter/
directory and build the plotter by executingmake
:
- Navigate to your
git clone https://github.com/BSM3G/Plotter.git
cd Plotter/
make
We’ll examine the example Plotter configuration file to see how to set-up a configuration file properly for the C-Plotter.
- The first item in this file is the luminosity for the data-taking run.
- Secondly, you see that your Plotter will dump the contents of its output into a root file ending in
.root
. - Thirdly, all graphs will be made in the style of
cms
. - Subsequently, the first column dictates the root files for which the Plotter will search and use to make your plots. We will have to edit this portion of the config file to tell your Plotter to get the root files from your run of
remote_nano.py
. - The next column shows that each background and the
SingleMuon
data will get its own root file to stack in the histograms. - The third column is the cross-section, followed in the fourth column by the skimming efficiency. The fifth dictates the data type.
Note: The skimming efficiency is different from 1 for the ntuples. For nanoAOD, the samples are not skimmed, and we set the efficiency to 1.
First, edit the config file. Remember, in your config file for the Plotter, you must specifythe location of the added, merged root files (the results of add_root_files.py
in the corresponding output directory).
- Specify the location of the files in your config file for the Plotter. Giving the directory a new name is advantageous. The Plotter is weird about directory names for some reason.
- Save and close the file after cross-checking the names of the various root files and adding any lines for any that may be missing according to the established format.
- Move back to the location of the Plotter. Next, you’ll be able to run the Plotter and see your histograms.
- In the Plotter directory, run the Plotter with the proper configuration file.
./Plotter <configfile_path>
- Recall that
./Plotter -help
will give you your plotter option flags. - In the Plotter directory will then be the output file we wish to view. Send the file to root with the following:
root -l <output_name>.root
. - To view, execute
TBrowser l
wherel
is just some letter.