Top MC validation (How To)

Rivet

Rivet is a software toolkit for data analysis of MC event generator samples, providing tools (jet finders, event shapes, etc.) for easy writing of analyses which are not generator-specific, and a large (250+) collection of MC versions of published experimental analyses. http://rivet.hepforge.org.

Producing EVGEN files

Information not yet ready frown

Running Rivet 1.X

First, log on lxplus5 and create a directory to work, let's say a temporal one:

tmpdir=$(mktemp -d)
mkdir ${tmpdir}/evgen

Rivet will run over EVGEN files, so one can produce these files, they can be retrieved from the GRID or read from any location if they already exists. Let's do the latter and read EVGEN files from EOS here /eos/atlas/user/c/cescobar/top/validation/evgen/mc12_8TeV.117050.PowhegPythia_P2011C_ttbar.evgen.EVNT.v2/

Now, one can produce the rivet output file (i.e. AIDA file) just running the produce_rivet_validation.py script which is available. It can be retrieved doing this:

cd ${tmpdir}
svn export svn+ssh://svn.cern.ch/reps/atlasphys/Physics/Top/Software/MCvalidation/Rivet/Rivet1.X/trunk/scripts/produce_rivet_validation.py

Now, just run this script:

python produce_rivet_validation.py -i /eos/atlas/user/c/cescobar/top/validation/evgen/mc12_8TeV.117050.PowhegPythia_P2011C_ttbar.evgen.EVNT.v2/

This script will run over 1 input file (i.e. 5000 events) in the input directory and will produce an AIDA file with the plots. You can explore the options of the previous script doing:

python produce_rivet_validation.py -h

Assuming that you have produced the AIDA file with the statistics you wanted for all the samples you want to compare, let's now produce some plots.

Producing plots using Rivet

Setup Rivet in either lxplus or lxplus5:

asetup 17.2.10,here
source /afs/cern.ch/sw/lcg/external/MCGenerators_hepmc2.06.05/rivet/1.8.1/${CMTCONFIG}/rivetenv.sh

Now, one can use compare-histos utility to produce all the plots that are defined in the plug-in you selected.

mkdir plots
compare-histos myfile1.aida:'Title=myTitle1' myfile2.aida:'Title=myTitle2'
make-plots --png *.dat
mv MC_* plots

Or one can use the rivet-mkhtml utility to produce the plots together with a (ugly) webpage.

rivet-mkhtml myfile1.aida:'Title=myTitle1':'LineColor=black':'LineStyle=solid' myfile2.aida:'Title=myTitle2':'LineColor=red':'LineStyle=dashed':LineDash'=1pt 1pt 1pt 1pt' --mc-errs -s

You can also add options such as --mc-errs, -s, -n 20, --times, etc...

-- CarlosEscobar - 14-May-2013

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2014-04-23 - CarlosEscobar
 
    • 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-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback