Getting started

Get the package

Download the trunk version of the TTbarUnfold package

svn co svn+ssh://$CERN_USER@svn.cern.ch/reps/atlasinst/Institutes/Bologna/TTbarUnfold/trunk TTbarUnfold
cd TbarUnfold

Compilation

Setup the basic environment variable with

source setup_basic.sh

The package is shipped with a local copy of RooUnfold -1.1.1, but by default it uses the copy from AnalysisTop (if AnalysisTop is set). To compile the local RooUnfold copy:

cd RooUnfold-1.1.1; make
cd ../
Then, compile the package with make

Run an example

Get the example input root files from afs:

./makeExample.sh

This command should create symbolic links in examples/rootfiles To run the example, use the command ../bin/exampleSpectrum -f examples/config/particle_topH_pt_ll.nominal.xml -c co -s nominal -o test.root where the -f option is used to provide the configuration file, the -c option sets the channel name, the -s option sets the systematic name and -o sets the output file name.

Understand the flow of the program

Configuration file

The configuration file has a very simple structure:
<configuration>
<data   file="examples/rootfiles/tt_diffxs_8TeV.data.Combined.co.histograms.root"   hpath="reco/4j2b/topH/pt" />
<sig    file="examples/rootfiles/tt_diffxs_8TeV.mc.DiTop.110404.co.nominal.nofullhad.histograms.root"   hpath="reco/4j2b/topH/pt" />
<bkg    file="examples/rootfiles/tt_diffxs_8TeV.mc.Background.co.nominal.histograms.root" hpath="reco/4j2b/topH/pt" />
<!-- <res    file="examples/rootfiles/tt_diffxs_8TeV.mc.DiTop.110404.co.nominal.signal.histograms.root"    hpath="reco/4j2b/topH/Matrix_reco_particle_pt" /> -->
<res      file="examples/rootfiles/tt_diffxs_8TeV.mc.DiTop.110404.co.nominal.ljets.histograms.root" hpath="reco/4j2b/topH/Matrix_reco_parton_pt" />
<gen    file="examples/rootfiles/tt_diffxs_8TeV.mc.DiTop.110404.co.particle.ljets.histograms.root"                               hpath="parton/4j2b/topH/pt" />
<lumi value="20300" />
<br value="0.876"/> <!-- since the "generated" files are the sum of the electron and muon channel, they are filled twice per event -->
<unfolding method="Bayes" regularization="4" statErr="none" ntoys="1000" />
<spectrum particle="topH" variable="pt" />
</configuration>
<!-- sig and res contain the training histograms -->
The <data, <sig, <bkg, <res and <gen fields are used to provide the input files (file) and histogram (hpath) paths:
  • <data is used for the data file
  • <sig is used for the signal reco file (i.e. signal after reco cuts)
  • <bkg is used for the background path (if the file field is empty the background correction is not applied)
  • <res is used for the file containing the response matrix (it may or may not the same file of <sig)
  • <gen is used for the file containing the truth histogram in target phase space (no cuts for parton level and after particle cuts for particle level unfolding).

Additional fields are

  • <lumi: total luminosity (in inverse picobarn);
  • <unfolding: the settings for the unfolding procedure. method can be "Bayes", "Inversion" or "SVD"; regularization is the number of iterations for the Bayes method, the regularization parameter for SVD and is ignored for Inversion; statErr sets the error treatment (it can be either "toys" or ="none"); =ntoys sets the number of toys (it is ignored if statErr is set to "none");
  • <br is the branching fraction;
  • <spectrum contains the basic information for the spectrum under study (it sets particle and variable names).

Outputs files

The the output files contain the relative and absolute cross sections and also a copy of the input used in the unfolding procedure:
$ root co_topH_pt_Bayes_4_DiffXs.root 

Applying ATLAS style settings...

Note: File "iostream.h" already loaded
root [0] 
Attaching file co_topH_pt_Bayes_4_DiffXs.root as _file0...
.ls
root [1] .ls
TFile**      co_topH_pt_Bayes_4_DiffXs.root   
 TFile*      co_topH_pt_Bayes_4_DiffXs.root   
  KEY: TH1D   Data;1   p_{T} [GeV]
  KEY: TH1D   SignalReco;1   p_{T} [GeV]
  KEY: TH2D   Response;1   Matrix reco/parton p_{T} [GeV]
  KEY: TH1D   Background;1   p_{T} [GeV]
  KEY: TH1D   Generated;1   p_{T} [GeV]
  KEY: TH1D   DataMinusBackground;1   p_{T} [GeV]
  KEY: TH1D   SignalTruth;1   Matrix reco/parton p_{T} [GeV]
  KEY: TH1D   Efficiency;1   Matrix reco/parton p_{T} [GeV]
  KEY: TH1D   Acceptance;1   Matrix reco/parton p_{T} [GeV]
  KEY: TH1D   DataUnfolded;1   Unfold unf_Response_response
  KEY: TH1D   AbsoluteDiffXs;1   Unfold unf_Response_response
  KEY: TH1D   RelativeDiffXs;1   Unfold unf_Response_response
  KEY: TH1D   TheoryXs_abs;1   p_{T} [GeV]
  KEY: TH1D   TheoryXs_rel;1   p_{T} [GeV]
AbsoluteDiffXs and RelativeDiffXs are the result of the calculation: the absolute and relative differential cross sections (already divided by bin width). The statistical error is 0 if statErr is set to "none", otherwise is the RMS of the toys. TheoryXs_abs and TheoryXs_rel are the theoretical cross sections (taken from the <gen file).

If the statErr variable is set to "toys" the root files will contain additional histograms:

  KEY: TH2D   Covariance_abs;1   Matrix reco/parton p_{T} [GeV]
  KEY: TH2D   Covariance_rel;1   Matrix reco/parton p_{T} [GeV]
  KEY: TH1D   Variance_abs;1   p_{T} [GeV]
  KEY: TH1D   Variance_rel;1   p_{T} [GeV]
  KEY: TH2D   Correlation_abs;1   Matrix reco/parton p_{T} [GeV]
  KEY: TH2D   Correlation_rel;1   Matrix reco/parton p_{T} [GeV]
These are the statistical correlation/covariance matrices and variances for the absolute and relative differential cross section (already divided by bin width).

-- MarinoRomano - 2015-11-11

-- MarinoRomano - 2015-11-11

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2015-11-11 - MarinoRomano
 
    • 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-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback