TWiki> ATLAS Web>HiggsBb (revision 8) Edit Raw edit Attach Print version

Introduction

Documenting the setup of Higgsbb analysis code used by cern.

An overview of the software framework can be found here.

(Note: If at any stage when setting up an environment or building code you encounter a problem before trying anything else first do make clean on anything you have done make on then use a clean shell and retry.)

Running Mode

The code can be run in two different modes. Locally or using PROOF(Parallel ROOT Facility). PROOF allows analysis of a large number of ROOT files in parallel using multiple machines or processor cores.

Running Locally

Code Checkout

The code can be checked out from the correct repository by doing:

mkdir myVH_research
cd myVH_research
svn co svn+ssh://svn.cern.ch/reps/atlasusr/mbellomo/ElectroweakBosons/trunk/AnalysisWZorHbb/

Note: you may want to set up kerberos first.(I did not require the GSSAPITrustDNS yes line).

Compiling And Using The Code

(Note: for more complete instructions see the README file in the trunk subdirectory)

To setup the environment:

cd myVH_research/ElectroweakBosons/trunk
source scripts/setup_lxplus.sh

This will setup the required environment variables, the Gnu C++ compiler and ROOTCORE.

To download and compile and extra software required do

(Note: If the extra code fails to compile due to the MET package you need to remove the code and run the 2012 versions of all the scripts)

./scripts/get_allcode.sh
cd SFrame
source setup.sh
cd ..

Next compile the software by doing

make

(You can also clean up by doing make clean and make distclean)

For the purposes of analysing H->bb decays the code is stored in the AnalysisWZorHbb/ directory.We now need to compile this code before we can do the analysis.

cd AnalysisWZorHbb
make

Now we can run our analysis by doing sframe_main config/WZorHbb_config_mc_nu_2011.xml for example. The .xml file is where the input files and settings are all defined(e.g. what corrections to apply to the data) and can be modified or written to suit the needs of the analysis.

(Note: every time you open a shell to run the code you need to do steps 1 and 3 again. i.e. setup the environment and make the code. It is also a good idea to run make clean before you recompile anything.)

Producing Plots

The output from running sframe is stored in .root files as common ntuples. To produce plots from these output files we need to use HistMaker by doing

cd macros
make

to make the required code. To run the code we use the command

./RunHistMaker  <path to config file> <runMJ> <path to files output by sframe> <output directory>      -- explain better?

This will output a .root file containing histograms.

If RunHistMaker crashes saying it did not find the cross-section(xsec) for a given number(correlating to a data set) you may need to edit the function InitCrossSections2011() in the file macros/src/process.cpp. You will need to add the following code


allXSecs.push_back(xsection(dataset, cross-section, k factor, 1, "sample name"));  -- find out what 1 is.

e.g.

allXSecs.push_back(xsection(109351, 4.0638E-05, 1, 1,"ZHnunu"));

Atlas twiki pages can be used to find the cross-section for 7TeV data, 8 TeV data and for general datasets.

For a 2012 event InitCrossSection2012() pulls the information from a file called configs/2012_cross_sections.txt which can be edited to add the information for your particular dataset

Running Using PROOF on Demand(PoD)

Proof is a framework for running many root analyses in parallel. It can be run locally using PROOF-lite which will utilise multiple cores on one machine or it can be run on many machines usind the PoD framework.

Installing and Building

To Install PROOF on Demand first we must get and unpack the code.

cd $HOME
wget http://pod.gsi.de/releases/pod/3.10/PoD-3.10-Source.tar.gz
tar -xzvf PoD-3.10-Source.tar.gz

To build the code do

cd $HOME/PoD-3.10-Source
mkdir build
cd build
cmake -C ../BuildSetup.cmake ..
make
make install
cd
source myVH_research/ElectroweakBosons/trunk/scripts/setup_pod_lxplus.sh
cd PoD/3.10/
source PoD_env.sh

To change the working directory PoD uses along with many other settings just edit $HOME/.PoD/PoD.cfg

(Note: For those using an afs directory you need to change your [server] work_dir parameter to something like /tmp/$USER/PoD)

Now create a file called $HOME/.PoD/user_worker_env.sh and put the following settings in it


#! /usr/bin/env bash
echo "Setting user environment for workers ..."
export LD_LIBRARY_PATH=/afs/cern.ch/sw/lcg/external/qt/4.4.2/x86_64-slc5-gcc43-opt/lib:\
/afs/cern.ch/sw/lcg/external/Boost/1.44.0_python2.6/x86_64-slc5-gcc43-opt//lib:\
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.30.01/x86_64-slc5-gcc43-opt/root/lib:\
/afs/cern.ch/sw/lcg/contrib/gcc/4.3.5/x86_64-slc5-gcc34-opt/lib64:\
/afs/cern.ch/sw/lcg/contrib/mpfr/2.3.1/x86_64-slc5-gcc34-opt/lib:\
/afs/cern.ch/sw/lcg/contrib/gmp/4.2.2/x86_64-slc5-gcc34-opt/lib
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"

Then create a file called $HOME/.PoD/user_xpd.cf and put the line xpd.root allow in it.

Edit | Attach | Print version | History: r32 | r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r8 - 2012-10-24 - PaulMullen
 
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