UTA Stop2L

Here I would like to collect anything important for efforts to keep up with the Stop2L group. I will try to keep this updated as much as possible.

Samples

I have space in EOS to store all of our MC samples. I do my best to keep this folder updated and organized, but please help and let me know if you see something wrong!

/eos/atlas/user/j/jlittle/v50/ for Signal Samples
/eos/atlas/user/j/jlittle/v51/ for Background Samples

I also try to keep the background separated into their respective regions, but again, please help with this as you see fit.

Analysis Release 20.7

LoopSUSYCore

LoopSUSYCore is a common RootCore package to help with branch address settings for the common ntuples from MelAnalysis. LoopSUSYCore also helps with the computation of kinematic variables such as mCT and MT2.

This package can be found at https://svnweb.cern.ch/trac/atlasinst/browser/Institutes/Bern/SusyAnalysis/LoopSUSYCore/trunk. Generally this will be set up to read the most recent common ntuple.

Setup

To use LoopSUSYCore you need to first set up your environment and Analysis Release:

It is common to setup ATLAS software by adding some lines to .bashrc as follows:

export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
alias setupATLAS='source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh'

This way anytime you open a terminal you can simply setup with the command $setupATLAS. If you are on lxplus, you can simply run setupATLAS.

Once the ATLAS Software is setup, we need to run.

rcSetup Base,2.4.43

This will set up the analysis release, it contains SampleHandler, EventLoop and SUSYTools among other things. Now, check out the package:

rc checkout_pkg atlasinst/Institutes/Bern/SusyAnalysis/LoopSUSYCore/trunk 
rc find_packages 
rc compile

Don't forget to re-compile if you make changes!

First Analysis

I have set up a Git Repository for my code so we can all work on the same code here https://gitlab.cern.ch/jlittle/FirstAnalysis. To get started using GitLab go to https://cern.service-now.com/service-portal/article.do?n=KB0003137

Our analysis will inherit from LoopSUSYCore to make histograms or ntuples from the common ntuples.

To check out this project, navigate to where your rcSetup script is located.

git clone https://:@gitlab.cern.ch:8443/jlittle/FirstAnalysis.git
rc find_packages
rc compile

The code should be setup to run right out of the box. If you navigate to the "scripts" directory, there is a python script that will point to the files and execute the code. It is by default set to run over the files in EOS, which I will try to keep up to date. You just have to pass the name of the folder you want to run over as the "submitDir" option. You can run this code over any of the background regions or all of the signals using the following commands:

python Run_2LSS.py --submitDir ttbar
python Run_2LSS.py --submitDir ttV
python Run_2LSS.py --submitDir zjets
python Run_2LSS.py --submitDir VV_llll
python Run_2LSS.py --submitDir VV_lllv
python Run_2LSS.py --submitDir VV_llvv
python Run_2LSS.py --submitDir Wt
python Run_2LSS.py --submitDir VVV
python Run_2LSS.py --submitDir other
python Run_2LSS.py --submitDir signal

This will automatically find the folder containing the corresponding MC stored in EOS.

TMVA

I also have TMVA setup in a public space along with samples already skimmed by our FirstAnalysis code.

/afs/cern.ch/work/j/jlittle/public/TMVA/
/afs/cern.ch/work/j/jlittle/public/FirstAnalysisOutput/ntuples/

If you navigate to the TMVA folder and source the setup.sh script, you can run TMVAClassification and it will run over the samples in the TMVA_Samples/ folder.

Choose Classification Technique

You can easily choose which technique to train with. Simply open TMVAClassification.C and find the binaries that select the classifier you want. If it's '1', then it will train with that method.

For example you can train a BDT with Adaptive Boosting as follows:

 Use["BDT"]            = 1; // uses Adaptive Boost

You can select multiple methods in one run.

Training

You can train on the data by running the TMVAClassification.C script. There are a few ways to do it.

Directly

You can execute the script directly with ROOT:

root -l TMVAClassification.C

This can be useful if there is a problem with compiling.

Compiled

Compiling is probably a better way of doing things.

make
./TMVAClassification

Don't forget to run make again if you make any changes.

Viewing Results with TMVA GUI

When finished the TMVA GUI will automatically launch. However, you can launch the files manually in a root session with TMVA::TMVAGui("file.root"). I left root files you can open and view right away in the TMVA folder.

/afs/cern.ch/work/j/jlittle/public/TMVA/

Converting ROOT files for SciKit

NumPy Arrays

I have setup code to convert files from .root to numpy arrays. It is located in:

/afs/cern.ch/work/j/jlittle/public/root2array

First source the setup script. This will setup all of the software needed, including root_numpy. Then you can execute root2array.py and pass the file to convert as an argument.

HDF5

I also have setup a space for .h5 files. HDF5 is a great mechanism for storing large numerical arrays of a homogeneous type, for data models that can be organized hierarchically and benefit from tagging of the datasets with arbitrary metadata.

/afs/cern.ch/work/j/jlittle/public/h5py

To convert the root files to .h5, simply navigate here and source the setup file. Then you can convert any ttree like this:

$ ttree2hdf5 --in-file foo.root -o foo.h5 --tree-name TREE

Some HDF5/H5Py Sources

https://support.hdfgroup.org/HDF5/release/obtain518.html

http://www.h5py.org/

PythonandHDF5.pdf

-- JaredDavidLittle - 2016-04-08

Topic attachments
I Attachment History Action Size Date Who Comment
PDFpdf ATLAS-CONF-2016-009.pdf r1 manage 830.1 K 2016-05-18 - 15:38 JaredDavidLittle 2016 Stop2L Conf. Note
PDFpdf INTstop2L2015.pdf r1 manage 7473.2 K 2016-09-15 - 17:17 JaredDavidLittle b-chargino internal note 2015
PDFpdf Presentation_stop2L_201-207_comparison.pdf r1 manage 593.5 K 2016-05-18 - 15:38 JaredDavidLittle Comparison Plots (May 11, 2016)
PDFpdf PythonandHDF5.pdf r1 manage 6182.1 K 2018-03-14 - 18:08 JaredDavidLittle Python and HDF5 Book
PDFpdf data-comparision-201-207.pdf r1 manage 1217.3 K 2016-05-27 - 10:40 JaredDavidLittle Comparison Plots (May 26, 2016)
Edit | Attach | Watch | Print version | History: r31 < r30 < r29 < r28 < r27 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r31 - 2018-07-25 - JaredDavidLittle
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback