Plotting Cuts in Higgs to Tau tau to LL
First Time Setup
Prerequisites - Setting up ROOT and XROOTD
Edit the .bashrc file and add the following lines. Do not forget to modify the ROOT and gcc versions, according to your needs.
For ROOT: (updated Dic-14)
- SLC6
- . /afs/cern.ch/sw/lcg/external/gcc/4.6.3/x86_64-slc6/setup.sh # v 4.6.3
- source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc46-opt/root/bin/thisroot.sh #gcc463/Root53414
- export CERN_USER=YOUR_USER_LOGIN (user your own user...)
In order to get the plots with the default settings used in ATLAS you have to add the file ".rootlogon.C" to your home directory. The file can be found at the end of this twiki, in attachments section.
Checking out and configure the code
Main code
Do the following:
-
export SVNROOT=svn+ssh://svn.cern.ch/reps/ificuwrepo
-
svn co $SVNROOT/PhysTools/httll/plots_mva2013 plots_mva2013
Setting up RootCore
- Complete instructions here: RootCore twiki
- In the same level than the plot_mvavbf code, create a "lib" folder:
- Inside the lib folder check out the RootCore package (use latest RootCore tag):
-
export SVNROOT=svn+ssh://svn.cern.ch/reps/atlasoff
-
svn co $SVNROOT/PhysicsAnalysis/D3PDTools/RootCore/tags/RootCore-00-02-99 RootCore
-
cd RootCore
-
./configure
-
source scripts/setup.sh
- Back to the "lib" folder, copy the following
packages.txt
file from plot_mva2013:
-
cp ../plot_mva2013/packages.txt .
-
rc build packages.txt
-
ln -s RootCore ../RootCore
Plotting cuts
Run the code
Every time you want to run the code, you have to setup RootCore, load the libraries and compile the code. Within the plot_mvavbf folder:
-
source ../RootCore/scripts/setup.sh
-> This can be added to the ~/.bashrc file, so you don't have to do it every time
- Once loaded root (
root -l
)
-
gROOT->ProcessLine (".x $ROOTCOREDIR/scripts/load_packages.C");
Load RootCore libraries
- Compile the code
-
gROOT->LoadMacro("./plot_mvavbf.cxx+")
for plot_mvavbf
- or
gROOT->LoadMacro("./plot_syst.cxx+")
for plot_syst
- This step can be done faster by loading the macro svn provides:
-
root -l setup_mva.c
-
root -l setup_syst.c
Files
Five kind of files have to be correctly located in order to the code to work. These are
- Data
- MC Bkg
- MC Signal
- Ztautau embedding
- Fake Leptons
The path for these files is set using the variables:
dir_data,
dir_bkg,
dir_sig,
dir_embed and _dir_fake. By default these variables are set to the last version of the files stored in XROOTD, but you can change to a different directory, for example, your local computer path.
Dic14: XROOTD is down, so the files have been copied to EOS in the following path: (you may have to change that in your code, since it's not in the last version in SVN)
dir_bkg ="root://eosatlas//eos/atlas/user/d/daalvare/ntuples/LHCP/mc/";
dir_sig ="root://eosatlas//eos/atlas/user/d/daalvare/ntuples/LHCP/mc/";
dir_data ="root://eosatlas//eos/atlas/user/d/daalvare/ntuples/LHCP/data/";
dir_embed="root://eosatlas//eos/atlas/user/d/daalvare/ntuples/LHCP/embed/";
dir_fake ="root://eosatlas//eos/atlas/user/d/daalvare/ntuples/LHCP/fake/";
Plotting
Once the macro has been successfully loaded, you can execute it to plot a particular cut. The scheme to follow is:
root[1] p = new plot_mvavbf("var", "cut", "chan", "dir", cutm);
The three arguments to give are:
- "var": Is the variable to plot, always in low case. Total list is in function "decide_var" Example of this are: "mll", "j1pt", "l2pt", nj40", "x1", "dphill", "mtautau", "mmc", "mvaother"
- "cut": Is the desired cut to plot. Total list is in function "decide_cut" Example of this are: "1", "3d", "6", "readervbf", "readerboost_zllcr", "ccboost_topcr"
For a list of the meaning of each cut, refer to the
Twiki.
- "chan": Is the channel to be analysed. It has to be chosen among these ones: "ee", "emu", "mumu", "sf", "df, "EMU", "MUE" or "all", where "e" refers to "electron", "mu" to "muon", "sf" to leptons of the Same Flavour (ee+mumu), "df" to leptons of Different Flavour (emu + mue), "all" is all the channels. The difference between "emu" and "EMU" is that, in the case of the capital letters, the flavour of the leading lepton matters, while in low case it doesn't. It is, "emu" and "mue" are the same (and also equal to "df"), while "EMU" and "MUE", are different (EMU picks events where the leading lepton is an electron) .
- "dir": This is the direction of the path where the files (png, eps, pdf, root and log files) will be saved under the results folder. For example, if you write "test_2", the plots will be saved in "results/test_2/" . By default, the output directory is "test" (results/test)
- "cutm": This is an integer used to do quickly in batch loops with varying the threshold of one cut - only for deep analysis.
An example of this would be:
root[1] p = new plot_mvavbf("mmc", "11a", "all", "prueba_twiki")
-- Main.dalpiq - 19 Oct 2012