SFrame Analysis Framework


Below is a short description of the workflow of the analysis framework:

  • Production of Patuples from data and MC samples.
  • Production of small analysis ntuples from the Patuples.
  • Analysis of ntuples.

Production of Patuples

We use the patuples produced by the B2G group. The recipe and location of the patuples are given in this page.

SFrame Installation

Below is a set of instructions based in the instructions from Thomas: twiki:


* Setup ROOT and create a scratch area for PROOF:

    • Copy to your area and modify according to your needs the ROOT setup files:
cp ~yumiceva/RooAlias.C ~/.
cp ~yumiceva/RooCMS.C ~/.
cp ~yumiceva/RooLogon.C ~/.
cp ~yumiceva/.rootrc ~/.

    • Edit rootrc file to point the PROOF sandbox to your scratch area. Change the line:
Proof.Sandbox: /uscmst1b_scratch/lpc1/cmsroc/yumiceva/proof


cmsrel CMSSW_5_3_3
cd CMSSW_5_3_3/src

Ntuple Writer (as part of CMSSW)

cvs co -d UHHAnalysis/NtupleWriter -r Dec-05-2012-v1 UserCode/UHHAnalysis/NtupleWriter
cvs co -d EGamma/EGammaAnalysisTools -r V00-00-08 UserCode/EGamma/EGammaAnalysisTools
scram b -j 10


mkdir -p fastjet/tarfiles
cd fastjet/tarfiles
curl -O 
tar xvfz fastjet-X.X.X.tar.gz 
mv fastjet-X.X.X ../X.X.X
cd ../X.X.X/
./configure --prefix=$PWD/../X.X.X-install
make -j 10
make install


svn co SFrame 
cd SFrame
(Edit the core/Makefile and remove the -lpcre library that is not supported at FNAL)
make -j 10

Setup environment

(setup a CMSSW software first)
cd SFrame
source setup.csh
setenv FASTJETDIR /uscms/home/yumiceva/work/sframe/fastjet/3.0.2-install/lib

Analysis Code

cvs co -d SFrameAnalysis UserCode/UHHAnalysis/SFrameAnalysis
cvs co -d SFrameTools UserCode/UHHAnalysis/SFrameTools 
cd SFrameTools/include 
cvs co -d Objects UserCode/UHHAnalysis/NtupleWriter/Objects 
cd .. 
cd JetMETObjects 
cd ../../SFrameAnalysis

(For the moment, remove the following files to compile the code)
rm include/TMVATreeFiller.h
rm include/TopTagTMVACycle.h
rm src/TMVATreeFiller.cxx
rm src/TopTagTMVACycle.cxx
(run make again)

FIT Analysis Code

(temporal, code will be moded to git soon)
cp -r ~yumiceva/work/sframe/CMSSW_5_3_3/src/SFrame/FITAnalysis .
cd FITAnalysis

(experimental recipe, work in progress)
git clone

Configuration Examples

Create histograms from a MC sample

(First edit configuration file and modify the OutputDirectory to point to your area)
cd FITAnalysis
sframe_main config/FITExampleCycle_config.xml

Create histograms using only generator particles

(First edit configuration file and modify the OutputDirectory to point to your area)
cd FITAnalysis
sframe_main config/GenTTTTCycle_config.xml

Production of Analysis ntuples

Ntuples are produced with the ntuple writer ED analyzer.

cd CMSSW_5_3_3/src/UHHAnalysis/NtupleWriter

Edit the configuration file to writhe your ntuples. If the sample is large, you should use crab.

Skimmed Analysis ntuples (Preselection)

A reduced version of the ntuples is needed for fast processing. Below is a recipe to produce a skim of the ntuples:

cd SFrame/FITAnalysis/
(Edit configuration file config/FourtopsPreSelectionCycleMuons_config.xml to setup output directory, samples, electron or muon selection, object collection) 

The preselection can be run in PROOF mode with a condor job. You can use the files in the FITAnalysis/tools directory to accomplish this.


  • At least one good muon: min pt (26 GeV), max eta (2.1) , min reliso (0.12), and muon ID
  • No loose electron: pt (35 GeV), eta(2.5), iso (0.1)
  • At least 6 jets: pt (40 GeV), eta (2.4)
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r7 - 2013-06-13 - FranciscoYumiceva
    • 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-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