8TeVDileptonAC

TopRootCore

Installation

Here are some instructions to install TopRootCore:

https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TopRootCore#Runtime_environment_configuratio

Going to the section "Building the TopRootCoreRelease" the first thing to do (not mandatory if you don't mind to enter you password 40 times) is to configure Kerberos.

You need to do this command first (it can be put in a .bashrc for instance)

export KRB5_CONFIG=~user_name/.krb5.conf

with an existing .krb5.conf located in your ~ directory. To launch kerberos:

/usr/kerberos.org/bin/kinit

Then setup the right ROOT and gcc version:

source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.30.00/x86_64-slc5-gcc43-opt/root/bin/thisroot.sh
source /afs/cern.ch/sw/lcg/external/gcc/4.3.2/x86_64-slc5/setup.sh

and simply run for instance:

    If your current user name is not the same as your CERN user name, set CERN_USER with the name of your CERN account.

export CERN_USER=wbell

    For 2012 packages with full dataset:

svn co "svn+ssh://$CERN_USER@svn.cern.ch/reps/atlasoff/PhysicsAnalysis/TopPhys/TopRootCoreRelease/tags/TopRootCoreRelease-14-00-09" TopRootCoreRelease
cd TopRootCoreRelease/share
./build-all.sh

N.B.: Create an empty directory inside of which you will install TRC.The selection submission to the gris will be faster if there is only TRC directory. By default all the packages will be installed in the same directory where TopRootCore is, to change that you can modify the line "base_dir= ...." in build-all.sh

To rebuilt all the packages, you can do:

./RootCore/scripts/clean.sh 
./RootCore/scripts/compile.sh -j2

if you want to change the location of your TRC packages, you will need before recompiling to specify the new path in:

/RootCore/packages
RootCore/scripts/setup.[c]sh

and make sur that ROOCOREDIR & ROOTCOREBIN are the good ones (same ones):

ROOCOREDIR=_your_path_for_TRC/RootCore
ROOTCOREBIN=_your_path_for_TRC/RootCore

GRID

Setup

Here is the setup I use which allow to do everything:

#!/bin/bash
# === root
source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.30.00/x86_64-slc5-gcc43-opt/root/bin/thisroot.sh
export ROOTSYS=/afs/cern.ch/sw/lcg/app/releases/ROOT/5.30.00/x86_64-slc5-gcc43-opt/root
# === Launch MiniML
source _your_path/TopRootCoreRelease-14-00-09/RootCore/scripts/setup.sh
# === gcc
source /afs/cern.ch/sw/lcg/external/gcc/4.3.2/x86_64-slc5/setup.sh
# === grid
source /afs/cern.ch/atlas/offline/external/GRID/ddm/DQ2Clients/setup.sh
source /afs/cern.ch/atlas/offline/external/GRID/DA/panda-client/latest/etc/panda/panda_setup.sh
source /afs/cern.ch/project/gd/LCG-share/current/etc/profile.d/grid_env.sh
export PATHENA_GRID_SETUP_SH=/afs/cern.ch/project/gd/LCG-share/current_3.2/etc/profile.d/grid_env.sh
# === proxy
voms-proxy-init --voms atlas --hours 96:00 --valid 96:00
# === DQ2
export DQ2_LOCAL_SITE_ID=ROAMING
# === SVN
export SVNGRP=svn+ssh://svn.cern.ch/reps/atlasgrp/
export SVNOFF=svn+ssh://svn.cern.ch/reps/atlasoff/

but when I want to /installrecompile TopRootCore (TRC), I start a new session with the simple setup you can find in the next session (about the installation of TRC)

Selection on the grid with TopRootCore

Twiki link: https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TopD3PDGridRunning

Let's "do it" togeter for all that to be clear.

First, go in the directory where you installed TRC. We will go trough different steps.

Make the tarball from TRC directory

You have to use the command used to launch the selection on the grid plus two options:

--noSubmit : no jobs will be submitted
--outTarBall=tarball.tar : a tar ball (named here tarball.tar) will be created. You will reuse this tar ball until you need
to recompile TRC.

An exemple of the command could be:

prun --outTarBall tarball.tar --noSubmit --nFilesPerJob=30 --athena=17.5.0 --mergeOutput --useContElementBoundary --inDsTxt=../ttbar.txt --outDS=user.achapela.test3 --outputs=ML_2D.root --useRootCore --writeInputToTxt IN:file_list.txt --exec='ln -s $ROOTCOREDIR/data .; ln -s $ROOTCOREDIR/../TopD3PDAnalysis/control  .; echo >> file_list.txt; D3PD2MiniML -f file_list.txt -p control/settings.txt -mcType fullSim'

When the tarball is created (it takes ~30 min) you drop the two options an add a new one:

--inTarBall=tarball.tar

The command line will now look like to:

prun --inTarBall=tarball.tar --nFilesPerJob=30 --athena=17.5.0 --mergeOutput --useContElementBoundary --inDsTxt=../ttbar.txt --outDS=user.achapela.test --outputs=ML_2D.root --useRootCore --writeInputToTxt IN:file_list.txt --exec='ln -s $ROOTCOREDIR/data .; ln -s $ROOTCOREDIR/../TopD3PDAnalysis/control  .; echo >> file_list.txt; D3PD2MiniML -f file_list.txt -p control/settings.txt -mcType fullSim'

For the meaning of the different options, you can use the command:

prun --help

To monitor your jobs you can take a loot here https://twiki.cern.ch/twiki/bin/viewauth/Atlas/PandaBook

To monitor your jobs you can take a loot here https://twiki.cern.ch/twiki/bin/viewauth/Atlas/PandaBook

Basically, you have:

pbook
>>> show() // will show all the jobs you have. You can specify show('running') for instance to see all the running jobs.
>>> kill(job_id1, job_id2) // will kill job with a given id or with a given status (kill('running')).
>>> retry(job_id) // will resubmit failed jobs. You can specify new options like retry(408,newOpts={'nFilesPerJob':20})
>>> help(show) // will give you the help on a given command

Here is a bash script to launch the selection on MC:

#!/bin/bash

rm -f your_dir/output_dataset_mc.txt

for i in $(cat dataset_mc.txt) ; do

jour=$(date +%F_%H_%M_%S)

Inputdataset=$i
j=$(echo "$Inputdataset" | cut -f 1-3 -d '.')
echo "Input dataset: $Inputdataset"
Outputdataset=user.achapela.${jour}_${j}
echo "Output dataset: $Outputdataset"

echo "$Outputdataset" >> your_dir/output_dataset_mc.txt

prun --exec 'ln -s $ROOTCOREDIR/data .; ln -s $ROOTCOREDIR/../TopD3PDAnalysis/control  .; echo >> file_list.txt; D3PD2MiniML -f file_list.txt -p control/settings.txt -mcType fullSim' \
--inTarBall=__panda_rootCoreWorkDir.tar \
--mergeOutput \
--useContElementBoundary \
--athenaTag=17.5.0 \
--inDS=$Inputdataset \
--outDS=$Outputdataset \
--outputs=ML_2D.root \
--useRootCore \
--writeInputToTxt IN:file_list.txt \
--nFilesPerJob=30

done

You can put all the input dataset in

dataset_mc.txt

Here is a bash script to get the files. It uses the output_dataset_mc.txt created above.


source /afs/cern.ch/atlas/offline/external/GRID/ddm/DQ2Clients/setup.sh

for i in $(cat output_dataset_mc.txt) ; do
cd your_dir/grid_mc_selection/
Inputdataset=$i
Outputdataset=${Inputdataset}/
echo $Outputdataset

dq2-get -f *ML_2D* $Outputdataset

cd -
done

Grid/Jobs problems

ERROR getFilesInUseForAnal : cPickle.UnpicklingError invalid load key, '<'.

A: This error appears in the terminal when executin "prun ...". It occurs when you used too many times the same job name for different new submissions. You just need to change the job name and it will work. As far I knwo, there's anything you can do to clean-out the old dataset

When doing pbook: ERROR : SQL error: database disk image is malformed

A: use "pbook --restoreDB"

8 TeV dilepton data set

= DATA FULL 2012 https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TopData12

data12_8TeV.periodA.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1400_p1401/ data12_8TeV.periodB.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1400_p1401/ data12_8TeV.periodC.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1400_p1401/ data12_8TeV.periodD.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1400_p1401/ data12_8TeV.periodE.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1400_p1401/ data12_8TeV.periodG.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1400_p1401/ data12_8TeV.periodH.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1400_p1401/ data12_8TeV.periodI.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1595_p1596/ data12_8TeV.periodJ.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1595_p1596/ data12_8TeV.periodL.physics_Egamma.PhysCont.NTUP_TOPEL.grp15_v01_p1595_p1596/

data12_8TeV.periodA.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1400_p1401/ data12_8TeV.periodB.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1400_p1401/ data12_8TeV.periodC.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1400_p1401/ data12_8TeV.periodD.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1400_p1401/ data12_8TeV.periodE.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1400_p1401/ data12_8TeV.periodG.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1400_p1401/ data12_8TeV.periodH.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1400_p1401/ data12_8TeV.periodI.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1595_p1596/ data12_8TeV.periodJ.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1595_p1596/ data12_8TeV.periodL.physics_Muons.PhysCont.NTUP_TOPMU.grp15_v01_p1595_p1596/

= ttbar

base line: mc12_8TeV.117050.PowhegPythia_P2011C_ttbar.merge.NTUP_TOP.e1728_s1581_s1586_r3658_r3549_p1400/

= Z+jets https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TopMC12ZjetsSamples#Recomendations

mc12_8TeV.147105.AlpgenPythia_Auto_P2011C_ZeeNp0.merge.e1879_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147106.AlpgenPythia_Auto_P2011C_ZeeNp1.merge.e1879_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147107.AlpgenPythia_Auto_P2011C_ZeeNp2.merge.e1879_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147108.AlpgenPythia_Auto_P2011C_ZeeNp3.merge.e1879_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147109.AlpgenPythia_Auto_P2011C_ZeeNp4.merge.e1879_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147110.AlpgenPythia_Auto_P2011C_ZeeNp5incl.merge.e1879_s1581_s1586_r3658_r3549_p1549/

mc12_8TeV.147113.AlpgenPythia_Auto_P2011C_ZmumuNp0.merge.e1880_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147114.AlpgenPythia_Auto_P2011C_ZmumuNp1.merge.e1880_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147115.AlpgenPythia_Auto_P2011C_ZmumuNp2.merge.e1880_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147116.AlpgenPythia_Auto_P2011C_ZmumuNp3.merge.e1880_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147117.AlpgenPythia_Auto_P2011C_ZmumuNp4.merge.e1880_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147118.AlpgenPythia_Auto_P2011C_ZmumuNp5incl.merge.e1880_s1581_s1586_r3658_r3549_p1549/

mc12_8TeV.147121.AlpgenPythia_Auto_P2011C_ZtautauNp0.merge.e1881_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147122.AlpgenPythia_Auto_P2011C_ZtautauNp1.merge.e1881_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147123.AlpgenPythia_Auto_P2011C_ZtautauNp2.merge.e1881_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147124.AlpgenPythia_Auto_P2011C_ZtautauNp3.merge.e1881_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147125.AlpgenPythia_Auto_P2011C_ZtautauNp4.merge.e1881_s1581_s1586_r3658_r3549_p1549/ mc12_8TeV.147126.AlpgenPythia_Auto_P2011C_ZtautauNp5.merge.e1881_s1581_s1586_r3658_r3549_p1549/

= Z+jets low mass https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TopMC12ZjetsSamples#Recomendations

mc12_8TeV.146830.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZeeNp0Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146831.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZeeNp1Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146832.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZeeNp2Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146833.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZeeNp3Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146834.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZeeNp4Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146835.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZeeNp5Incl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146840.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZmumuNp0Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146841.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZmumuNp1Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146842.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZmumuNp2Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146843.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZmumuNp3Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146844.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZmumuNp4Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146845.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZmumuNp5Incl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146850.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZtautauNp0Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146851.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZtautauNp1Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146852.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZtautauNp2Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146853.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZtautauNp3Excl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146854.AlpgenJimmy_Auto_AUET3CTEQ6L1_ZtautauNp4Excl_Mll10to60.merge.NTUP_TOP.e1551_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.146855.AlpgenJimmy_Auto_AUET2CTEQ6L1_ZtautauNp5Incl_Mll10to60.merge.NTUP_TOP.e1600_s1499_s1504_r3658_r3549_p1400/

= Dibosons

mc12_8TeV.107100.AlpgenJimmy_AUET2CTEQ6L1_WWlnulnuNp0.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107101.AlpgenJimmy_AUET2CTEQ6L1_WWlnulnuNp1.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107102.AlpgenJimmy_AUET2CTEQ6L1_WWlnulnuNp2.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107103.AlpgenJimmy_AUET2CTEQ6L1_WWlnulnuNp3.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107104.AlpgenJimmy_AUET2CTEQ6L1_WZincllNp0.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107105.AlpgenJimmy_AUET2CTEQ6L1_WZincllNp1.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107106.AlpgenJimmy_AUET2CTEQ6L1_WZincllNp2.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107107.AlpgenJimmy_AUET2CTEQ6L1_WZincllNp3.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107108.AlpgenJimmy_AUET2CTEQ6L1_ZZincllNp0.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107109.AlpgenJimmy_AUET2CTEQ6L1_ZZincllNp1.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107110.AlpgenJimmy_AUET2CTEQ6L1_ZZincllNp2.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/ mc12_8TeV.107111.AlpgenJimmy_AUET2CTEQ6L1_ZZincllNp3.merge.NTUP_TOP.e1596_s1499_s1504_r3658_r3549_p1400/

= Single top

mc12_8TeV.108346.McAtNloJimmy_AUET2CT10_SingleTopWtChanIncl.merge.NTUP_TOP.e1525_a159_a171_r3549_p1400/ mc12_8TeV.110101.AcerMCPythia_P2011CCTEQ6L1_singletop_tchan_l.merge.NTUP_TOP.e1731_s1581_s1586_r3658_r3549_p1400/ mc12_8TeV.110119.PowhegPythia_P2011C_st_schan_lep.merge.NTUP_TOP.e1720_s1581_s1586_r3658_r3549_p1400/ mc12_8TeV.110140.PowhegPythia_P2011C_st_Wtchan_incl_DR.merge.NTUP_TOP.e1743_s1581_s1586_r3658_r3549_p1400/

Plotting macro

Macro available here:

https://svnweb.cern.ch/trac/atlasinst/browser/Institutes/Saclay/TopAnalysis/ChargeAsymm/Asym_8TeV/utils

or just do:

 svn co svn+ssh://svn.cern.ch/trac/atlasinst/browser/Institutes/Saclay/TopAnalysis/ChargeAsymm/Asym_8TeV/utils 

Some informations to understand and run the ploting macro mksum_8TeV.C
Before all: you need to have AtlasStyle.C and AtlasStyle.h in the same directory as the mksum macro.

1) You will call the function mksum, mkrecseum, mksumWithSyst, or mkrecWithSyst depends on what you want.

Here "reconstruction" means reconstruction of the top and antitop kinematics (and not the reconstruction with Athena).

- You have to specify the input directory where are the different root files (string dir) and the ouput directory (string plotdir) for your plots.
- You speficy the variables you are interested in:

 TString variables[] = ... 
and loop on it
 for (int ivar = 0; ivar < nvar; ivar++) 
choosing the number of defined variables "nvar" you want to plot.

After compiling the macro:

root -l -b
root [0] .L mksum_8TeV.C++

when calling the function mksum you have to speficy:

root [1] mksum(channel, selection, saveplots)

int channel: with 0 all channels together, 1 ee, 2 mumu, 3 emu
string selection: "reco" for reco ttbar or nothing to have default ie w/o reco ttbar
bool saveplots: true to save plots

for instance: mksum(1,"final",true)

2) mksum() function calls the main function mkplot()

Check if the lumi suits to you. By default it is 20.3398 fb-1 for full 8 TeV sample.
You can also check that the sample are the one that you processed.
Cross section and k-factor should be the good ones for 8 TeV running.

3) mkplot() calls getBinningAndTitle() where the input variables from ntuples are defined.

4) mkplot() calls getFilename() to read the name on the input root files.
The root files should be in 'dir' for ttbar, 'dir/mc' for background and 'dir/merge' for data.
Their name should be their DatasetID, e.g. for ttbar dilepton: 110001.root.
For data you have to merge "Muons" and "Egamma" sample and name it data.root.

5) mkplot() calls getTreename().
The name of the tree could not be the good one by default ("mini").

6) mkplot() calls getSelection() where all the selection cuts are defined according to the hexadecimal number.
You can play here to have the desired selection.

UserForm
First Name Antoine
Last Name Chapelain
Titles

Email antoine.chapelain@cernNOSPAMPLEASE.ch
Telephone

Mobile

Skype ID

Department

Organization

URL

Location

Region

Country France
Status Update

Edit personal data
Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r17 - 2014-03-12 - AntoineChapelain
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main 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