Z' Statistical tools
Working Twiki on the use of the standard Z' statistical tools for limit setting and significance calculations in
CMS. The focus of this Twiki is on the use of these tools for the Z'->ee analysis
Master reference (G. Kukartsev Twiki):
https://twiki.cern.ch/twiki/bin/viewauth/CMS/RooStatsZprime
Getting started on lxplus
The Z' statistical tools require a well-configured recent version of the ROOT package (>=5.27), with ROOSTATS and PYROOT support. There are several ways to achieve this. I found the simplest method was to source a recent version of CMSSW (>= CMSSW_4_1_X) which links to the required version of ROOT. Note that the standard Z' statistical tools Twiki generally refers to code running on the FNAL lpc cluster
Worked example using CMSSW_4_1_4
> cd cms_releases/CMSSW_4_1_4/src
> cmsenv
(sets up ROOT version + ROOTSTATS + PYROOT)
> svn co svn+ssh://@svn.cern.ch/reps/exost
(check out Exost statistical package)
> cd exost
> source setup/cmssw_setup.[c]sh
> cd workdir
(source setup script for CMSSW installation)
> setenv CVSROOT ':gserver:cmssw.cvs.cern.ch:/cvs/CMSSW'
> kserver_init
> cvs co -r V00-01-00 -d twobody UserCode/GenaKukartsev/twobody
(Check out the Z' code)
> cd twobody
Making a workspace
> exost -a workspace -c dielectron_ratio.cfg
> cp myWS.root ws_dielectron_ratio.root
check configuration
> exost -a mcmc -c dielectron_ratio.cfg
quick test
> root
> .L twobody.C+
> limit("dielectron","observed",1000, "test", 1, 10000, 100, "")
Interpreting dielectron_ratio.cfg
Input file: must have branch named "mass", "weight" branch is optional
systematics:
mass_kappa = [1.01]; fix;
-> 1% eror on energy scale
running code:
limit("dielectron","observed",1000, "test", 1, 10000, 100, "")
limit("dielectron","expected",1000, "test", 2, 10000, 100, "")
Output files and limit plots
Running the above macro will produce an output root file (.ascii) with:
a) mass; b) limit on xsec ratio
(one per job)
plotting file expects a concatenated list
> ./merge_ascii.py {input file list}
[to stdout]
> ./merge_ascii.py -f {output file>} {input file list}
> ./plots.py -p {output plot name} -d {input dir}
> ./limit_plots.py
see here for definition of input ascii file
{plotter.py is worker file}
Significance calculation
--
DavidPetyt - 27 Mar 2009