SFrame Analysis Framework
Workflow
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:
Prerequisite
* 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
CMSSW
cmsrel CMSSW_5_3_3
cd CMSSW_5_3_3/src
cmsenv
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
FastJet
mkdir -p fastjet/tarfiles
cd fastjet/tarfiles
curl -O http://fastjet.fr/repo/fastjet-X.X.X.tar.gz
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
SFrame
svn co https://sframe.svn.sourceforge.net/svnroot/sframe/SFrame/tags/SFrame-03-06-11 SFrame
cd SFrame
(Edit the core/Makefile and remove the -lpcre library that is not supported at FNAL)
source setup.sh
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
setenv LD_LIBRARY_PATH ${FASTJETDIR}:${LD_LIBRARY_PATH}
setenv LD_LIBRARY_PATH ${SFRAME_DIR}/SFrameTools/JetMETObjects/lib:${LD_LIBRARY_PATH}
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 ..
make
cd JetMETObjects
make
cd ../../SFrameAnalysis
make
(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
(experimental recipe, work in progress)
cd $SFRAME_DIR
git clone git@github.com:yumiceva/FITAnalysis.git
cd FITAnalysis
make
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 ntuplewriter_cfg.py 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.
PRESELECTION
- 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)
LOCATION of skimmed ntuples
/eos/uscms/store/user/yumiceva/fourtops/sframePreselection/
Selection Analysis
- One good PV.
- 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)
- At least 2 CSVM b-tagged jets.
- Ht (400 GeV)