close Warning: Can't synchronize with repository "(default)" (/SVN/atlas does not appear to be a Subversion repository.). Look in the Trac log for more information.

Version 7 (modified by /O=GRID-FR/C=FR/O=CNRS/OU=LPSC/CN=Julien Labbe, 14 years ago) (diff)


Presentation of Topaz, Top Analysis Zoftware

Topaz is a c++ code dedicated to top analysis. It take (for now) in input the trees produced by TopView.

Topaz is divided into 3 sub-packages :

  • topview : reads TopView trees and apply selections.
  • analysis : applies multi-variable analyses (MVA) and make final histograms.
  • tools.

Executables are in trunk/bin (and sources in trunk/src/exe/). There are :

  • !MakeNtuple_x : reads TopView trees and apply selections (with topview library).
  • !DataAnalysis_x : merges MakeNtuple outputs for all processes.
  • !ComputeDiscri_x, PrepareTMVAInputs_x, TrainMVAs_x : prepare and trains MVA.
  • RunMVAs_x : applies MVA cuts.
  • !MakePlots_x, !DisplayPlots_x : make final plots.

The code is based on the class ParameterReader which allows to set parameters with text files. Theses parameters are read in executables before be given in libraries.

Executables could be run by hand or with the python scripts run_all (simple, for data analysis) or topaz (more complete, full chain). In any case you should configure your LD_LIBRARY_PATH and PYTHONPATH (source setup.[sh/csh]).


Reader of parameters, mainly used in executables.

Parameters are defined in a type file (usually script/parameter.typ), set in parameter files (eg. script/makentuple.par) and used with GetParameter or in loop with itrNext.

See in html ParameterReader documentation these methods : AddTypeFile, AddParameterFile, GetParameter, itrNext. And take a look at script/parameters.typ


Accessible with bin/MakeNtuple parfile or topaz ntuple parfile (usually parfile = script/makentuple.par).

Create selections (selection type set in analysesfile, analysesfile is defined in parfile, usually script/makentuple/makentuple_analyses.par) with tree name and cuts (in another file given in analysesfile, eg. script/makentuple/makentuple_cuts_ttbarSemiLepSelection.par ).

Then loop on processes (analysis type in parfile, define output root file, list of TopView input files and some other options) apply cuts and save results in outputdir. The main class used here is TopViewAnalyze.

See html documentation of TopViewAnalyze class and Selection class.

For adding your own selection : create your class inherited from Selection, fill Configure, SelectEvent, MakeTree and UpdateCounters (see the ttbar semileptonic selection for example), add it in the Makefile and in script/makentuple/makentuple_analyses.par. That's all.

Data analysis

Analyze the trees produced by MakeNtuple.

Executables :

  • !DataAnalysis_x : merges MakeNtuple outputs for all processes.
  • !ComputeDiscri_x, PrepareTMVAInputs_x, TrainMVAs_x : prepare and trains MVA.
  • RunMVAs_x : applies MVA cuts.
  • !MakePlots_x, !DisplayPlots_x : make final plots.

They should be runned with ./executable_x path, path is the directory where are your parameter files. Eg : script/datareader_ttbarWtb for ttbar Wtb coupling studies or script/datareader_wt for single top wt channel.

The full chain can be runned with run_all or preferably topaz python scripts. topaz script has flag to activate each executables. Usage : ./topaz analysis path [option]. option when given correspond to different studies (see topaz content, for example 'standard' correspond to trf and notrf), for each study the file <path>/Mode_study.par (Mode_trf.par, Mode_notrf.par...) is copied to <path>/Mode.par before re-running the full chain (Mode.par is directly used if no option is given). Mode.par should be included in your <path>/Datareader.par : simply add include <path>/Mode.par.

The main parameter file is <path>/DataReader?.par. Others are loaded with include <path>/file.par.

An exemple of the part of Datareader.par which defines the files used :

## input and output files of the analysis chain
## - DataAnalysis
string OutputDataAnalysis	DataReader.root
## - MVA
string InputPrepareMVAs		DataReader.root
string OutputPrepareMVAs	MVAInputs.root
string InputRunMVAs		DataReader.root
string OutputRunMVAs		RunMVA.root
## Plots
string InputMakePlots		RunMVA.root
string OutputMakePlots		Plots.root

Parameter files, input and output for each executables (_par_ means the value of the parameter par defined in your parameters files) :

Executable Parameter file(s) input(s) output(s)
* Merge MakeNtuple outputs for all processes.
!DataAnalysis_x Datareader.par
MakeNtuple root file (in _inputpath_)
[eg. ./result]
[eg. plots/EL/4j/DataReader.root]
* Prepare and trains MVA.
!ComputeDiscri_x Datareader.par
PrepareTMVAInputs_x Datareader.par
TrainMVAs_x Datareader.par
* Applie MVA cuts
RunMVAs_x Datareader.par
* Make final plots
!MakePlots_x Datareader.par
[eg. plots/MU/3j/RunMVA.root]
[eg. plots/MU/3j/Plots.root]
!DisplayPlots_x Datareader.par
[eg. plots/MU/3j/Plots.root]
_inputpath_/chan/ + eps files