The Example Exotica Analysis with PAT
Introduction
This page describes the example exotica
PAT analysis tool which was developed for the bprime analysis.
The analysis details (physics part) can be found in the following links:
Release for 2_2_X (new/beta)
This version is under test, please refer to the 1_8_4 release if you only want to find an example code.
The updated version for 2_2_X (tested under 2_2_6 + patches currently) can be found at
/afs/cern.ch/user/k/kfjack/public/bprimeKit/2_2_X
.
For the
PAT part, it works with the 2_2_6 release.
See the
PAT recipes for details
SWGuidePATRecipes for 2_2_X.
A copy-and-paste guide
Go to a working directory, and prepare the CMSSW environment:
scramv1 project CMSSW CMSSW_2_2_6
cd CMSSW_2_2_6/src/
Access the full source tar ball at
/afs/cern.ch/user/k/kfjack/public/bprimeKit/2_2_X/fullsrc.tar.gz
tar xfvz fullsrc.tar.gz
Then, compile the code (it will take a while, if the
PAT tags are included):
scramv1 b
The script
MyAna/bprimeKit/test/full.py
is the example script for the analyzer.
(
full.py
for Summer08 fullsim,
fast.py
for 2_2_X fastsim,
pattuple.py
for 2_2_X PATTuples.)
cd MyAna/bprimeKit/test/
cmsRun full.py
A root file,
results_full.root
will be generated.
How to generate a simple physics plot
This is an example for how to access the
results_full.root
. Two files are needed:
- Tree format definition:
/afs/cern.ch/user/k/kfjack/public/bprimeKit/2_2_X/format.h
- Example root code:
/afs/cern.ch/user/k/kfjack/public/bprimeKit/2_2_X/proj.cc
Run the root macro directly:
root -l proj.cc
And it will generate a simple plot for the p_T of jets.
Please read the
format.h
for the detailed information of the root trees.
Release for 1_8_4
This analysis tool,
bprimtKit, is running under CMSSW_1_8_4 together with the single snapshot
PAT (See
SWGuidePATRecipes for 1_8_X). Since 1_8_4
PAT is not fully supported, some features have to be switched on by the users. Here are a short summary on the modifications:
- Switch on the cut based electron (robust) ID. The muon ID by the global function
muonid::isGoodMuon()
is directly called by the analysis code instead of PAT interface.
- The jet correction in 1_8_4 PAT is off (and with only the
MCJetCorrections
). The producer JetCorrFactorsProducer
is modified to include the recommended L2+L3 jet corrections. The L5 flavor dependent correction is not used (leaving the space for extension).
- The MET correction is also modified accordingly (replace the MCJet by L2+L3).
- The
originalObjectRef()
links are not working well in 1_8_4 PAT. In order to retrieve some of the information that are only stored in the original RECO object, some additional codes are added in order to by-pass the problems (a matching with dR and Pt).
- We added jet and primary vertexes association (through the algorithm 1, alpha cut).
Quick start
Here we describe the recipe for a quick start with bprimtKit:
Go to a working directory, and prepare the CMSSW environment:
scramv1 project CMSSW CMSSW_1_8_4
cd CMSSW_1_8_4/src/
Access the full source tar ball at
/afs/cern.ch/user/k/kfjack/public/bprimeKit/1_8_4/fullsrc.tar.gz
This tar ball includes the original 1_8_4
PAT snapshot, the bprimtKit source code, and the modifications listed above.
tar xfvz fullsrc.tar.gz
Then, compile the code (it will take a long time for
PAT tools)
scramv1 b
The script
MyAna/bprimeKit/test/test_all_in_one.cfg
is the example script for the analyzer.
cd MyAna/bprimeKit/test/
cmsRun test_all_in_one.cfg
It will produce a root tree stored in the root file,
results.root
.
See the recipe below for how to produce some fastsim MC for testing the code.
Also, for how to generate a physics plot from this
results.root
can be found below as well.
Produce some b'->tW fast simulation MC for a simple test
Initial another CMSSW_1_8_4 working environment (
IMPORTANT: The MC production cfg conflicts with the
PAT environment.)
scramv1 project CMSSW CMSSW_1_8_4
cd CMSSW_1_8_4/src/
Get my template production cfg file
prod_template.cfg,
and the cfi for b'->tW pythia setup
bprime_tW_m300.cfi.
Run the production cfg and it will produce 10 b'->tW signal events.
cmsRun prod_template.cfg
How to generate a simple physics plot
This is an example for how to plot jets' p_T stored in the
results.root
. Two files are needed:
- Tree format definition:
/afs/cern.ch/user/k/kfjack/public/bprimeKit/1_8_4/format.h
- Example root code:
/afs/cern.ch/user/k/kfjack/public/bprimeKit/1_8_4/proj.cc
Run the root macro directly:
root -l proj.cc
And it will generate a simple plot for the p_T of jets (with energy corrections).
Please read the
format.h
for the detailed information of the root tree produced by bprimeKit.
--
KaiFengChen - 31 Oct 2008