manTree Root Trees

Introduction

These are old instructions - please see ManTree

The manTree package contains a set of classes for storing physics objects for final analysis. It can be used outside of athena, for example in SFrame. The code is in svn and the html descriptions of the classes can be found here.

First Time Use

First compile the package with sframe, following the instructions. Make sure you source the main SFrame setup.sh file (this makes sure root loads the manTree library). Then you should be able to open a file with the TBrowser in root and have a look around. A file with ttbar events can be found at:

/afs/hep.man.ac.uk/d/atlas-neutrino/ManTrees/MC/AcceptanceChallenge/14-10-10/tree.nocuts.root
Documentation for the functions for the various classes is here.

Using with Root's TTree Draw( )

You can also use root's TTree.Draw( ) functionality with these files, as long as you have set up the library (via setting up sframe) for example:

root /afs/hep.man.ac.uk/d/atlas-neutrino/Trees/MC08/NoSkim/16-6-09/ttbar/tree.root -l
TTree* tree = (TTree*)_file0->Get("ManTree");
tree->Draw("MElectron.Pt()","","");
new TCanvas
tree->Draw("MElectron.Pt()","(MElectron.Pt()>20000.0)&&(MElectron.IsMedium())","");
The first draw command produces a plot of the pT of all electrons in the events. The second command plots the pT of electrons in the events with pT > 20 GeV that pass the ATLAS 'medium' electron criteria.

Using with SFrame

An example package showing simple use within SFrame is in the manchester svn repository. The following lines show how to checkout & compile the package (first setup sframe):

cd $SFRAME_DIR
svn co svn+ssh://svn.cern.ch/reps/atlasgrp/Institutes/Manchester/SFrame/manTreeSFrameBase/trunk manTreeSFrameBase
cd manTreeSFrameBase
make
cd $SFRAME_DIR
svn co svn+ssh://svn.cern.ch/reps/atlasgrp/Institutes/Manchester/SFrame/exampleManTreeCycle/trunk exampleManTreeCycle
cd exampleManTreeCycle
make
There is a sample config file in the config directory, which you can run as follows:
cd config
sframe_main TestCycle_config.xml
You will get lots of output to the screen, since it is set to VERBOSE output level. You can change this in the config file. You can modify the cycle code (include/TestCycle.h and src/TestCycle.cxx), then just type make in the exampleManTreeCycle directory to build your changes. You can then rerun as before.

Instructions for using the code for the top acceptance challenge are here.

Compiling the package

The package can be compiled in two ways, using cmt within an athena release and using the standalone Makefile from SFrame. The two methods are described below. For each one you need to checkout code from the manchester svn repository. The easiest way to access this from linux8 is to obtain a cern kerberos ticket:

kinit --no-afslog username@CERN.CH

Compiling in Athena

To compile in athena, first set up an athena release & then checkout the package & compile:

cd $TestArea
cmt co -d SFrame/manTree $SVNMAN/SFrame/manTree
cd SFrame/manTree/cmt
make -j
Note: You can only use $SVNMAN if you're using one of the linux8 machines at Manchester and your username is the same at Manchester and CERN. You can freely replace $SVNMAN with:
svn+ssh://*cernusername*@svn.cern.ch/reps/atlasgrp/Institutes/Manchester 

Compiling with SFrame

First checkout & compile SFrame (see the SFrame page). Then checkout & compile manTree:

cd $SFRAME_DIR
svn co svn+ssh://svn.cern.ch/reps/atlasgrp/Institutes/Manchester/SFrame/manTree/trunk manTree
cd manTree
make

Common ATLAS Tools in SFrame

Good Runs List

See the inctructions here.

SFrame Pileup Tool

For information about installing the SFrame Pileup Tool click here.

Current Tag List

Here we keep a list of the stable tags of the packages that are being used:

Package svn tag for rel 15 svn tag for 16.0.3.3.3 svn tag for 16.0.3.8.2 svn tag for 16.6.3.5.1 svn tag for 16.6.5.5.1
manTree manTree-00-06-10-02 manTree-00-07-05 manTree-00-07-07 manTree-00-08-02 manTree-00-09-06
manTreeMaker manTreeMaker-00-06-09-01 manTreeMaker-00-07-00-branch manTreeMaker-00-07-01 manTreeMaker-00-08-04 manTreeMaker-00-09-05
topUtils topUtils-01-00-02 topUtils-01-01-03 topUtils-01-01-04 topUtils-01-01-05 trunk
manTreeSFrameBase manTreeSFrameBase-02-00-01 manTreeSFrameBase-02-00-02 manTreeSFrameBase-02-00-03 manTreeSFrameBase-02-00-04 trunk

Making manTrees

Please check if the sample you need has already been made.

Samples

A list of samples is at ManTreeSamples

Making new trees

To make manTrees, you need to work in the athena environment, so first setup your favorite release & then checkout & compile manTree (by following the above instructions before continuing). Using the same $TestArea that you just compiled manTree in, checkout and compile the packages needed for the making of the trees:

cd $TestArea
cmt co -r egammaAnalysisUtils-­00-02-18 Reconstruction/egamma/egammaAnalysis/egammaAnalysisUtils/ $SVNOFF/Reconstruction/egamma/egammaAnalysis/egammaAnalysisUtils/   
cd Reconstruction/egamma/egammaAnalysis/egammaAnalysisUtils/cmt/
make
cd $TestArea
cmt co -d ManAthenaTools/manTreeMaker $SVNMAN/ManAthenaTools/manTreeMaker
cd ManAthenaTools/manTreeMaker/cmt
make -j 2
cd $TestArea
cmt co -d ManAthenaTools/ManGridUtils $SVNMAN/ManAthenaTools/ManGridUtils
cd ManAthenaTools/ManGridUtils/cmt
make

Note: You can only use $SVNMAN or $SVNOFF if you're using one of the linux8 machines at Manchester and your username is the same at Manchester and CERN. You can freely replace $SVNMAN as above and $SVNOFF with:

svn+ssh://*cernusername*@svn.cern.ch/reps/atlasoff/ 

To use a tag of a package add the following to the cmt command, e.g.:

-r manTreeMaker-00-07-00

You are nearly ready to make manTrees by running on the Grid by following these instructions

-- MarkOwen - 13-May-2011

-- MarkOwen - 16-Sep-2011


This topic: AtlasSandbox > WebHome > InstitutePages > AtlasManchester > ManTreeOld
Topic revision: r1 - 2011-09-16 - MarkOwen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback