This is my personal Sandbox. Alberto is here!

Here I will put my test for the TWiki on in situ JMS/JMR analysis for Run2.

Updated to use AnalysisTop,2.4.16.

There is probably a bug affecting the MC statistical uncertainty. Also we need to understand why JMR~1.2 for 2016 data (to be debugged...)

In situ JMS/JMR analysis package for xAODs.

This is the Run2 migration of a 8TeV analysis. You can find the 8TeV internal documentation at

The aim of this package is to capture Top quarks and W bosons decaying hadronically into large jets and then estimating their mass scale and resolution.

In order to do this, large jets are cataloged using truth (DR and Pt) matching. Five different topologies have been implemented in this package:

  • Top : large jet containing decay products of a top quark
  • W : large jet containing decay products of a W boson.
  • q+b : large jet containing two jets, one coming from a b quark, the other from another (non-b) light quark.
  • b : large jet containing a jet coming from a b quark.
  • other : large jet which can be classified based on previous criteria
Mass peaks are obtained by looking at the large jet mass distribution. For MC, W and Top mass peaks are obtained using large jets tagged with W and Top topology. Data peaks are obtained by subtracting to the data spectrum all the topologies in which one is not interested.

In order to enhance the aforementioned peaks a W/Top selection is also performed, before performing the background subtraction.

All details can be found in the ! RunI internal note

The analysis is done for three type of large-R jets: AntiKt10TrimmedJets, TrackAssistedJetMass, ReClusteredJets.

Links to useful pages

TopxAODStartGuide page : introduction to the new xAOD analysis framework :

TopWorkingGroup page : main TWiki page of the top working group.

TopDerivationMC15List page: list of the last data and montecarlo available derivations available.

Two minutes instructions

Set up your version of ! TopAnalysis as explained in ! TopxAODStartGuide (see link above).

Use Top,2.4.16 as the version of the package.

Follow also recommendations from:

Copy JMRAnalysis_2.4.16.tar.gz (between the attachments) in the directory where you installed RootCore (If you followed previous instructions, it should be something like "AnalysisTop-2.3.37").

Then do:

tar -zxvf JMRAnalysisTools-2.6.16.tar.gz

mkdir plots 

This will configure the folder in the right way.

Tell RootCore to add the JMRAnalysisTools package and to compile it, by typing:

rc find_packages
rc compile

Now everything is compiled and ready to be used.

Run locally

Run it with:

top-xaod grid/boosted_ljets-cuts.txt JMRAnalysisTools/share/ttbar_p2454.txt

This will produce a file called "output.root".
If you want some plots, you can type (not sure this work for the last version...):


You will find the output plots in "plots/plots_onefile.root"

Modifying source code

In some cases modifying source files will be needed in order to change inputs parameters or file names of the executables.

You can find sources files in:


If modifying the program in a deeper way is needed, have a look at


where all the source files of the function used in the selection are stored.

Sending jobs to the grid

In one of the previous step a folder called "grid" has been created.

Inside this folder, you can easily send jobs to the grid by typing:


where <sample> can be ttbar, diboson, singletop, dataAC, etc...

The list of data and MC samples you can run on is inside or

There are different configuration files for data and montecarlo, have a look at them and choose your configuration.

Downloading from the grid, merge and make plots

When your outputs are ready, download them from the grid in two separate folders: one for data and on for montecarlo samples.

Modify the first lines of "JMRAnalysisTools/util/JMR_list_and_merge.cxx", using the location where you downloaded your samples.



It will create some files in the folder "plot". In these files you can find lists of MC and data outputs, divided by type.

There is also a file called "". Running it like:


it will merge all the outputs with the same MC code. It will also merge all data together.

A list of the merged file can be found in "plots/list_merged.txt" .

Once you merged the files, you can make some plots using:


Its output can be found in "plots/plots.root" and contains the final plots.

The normalization to the correct luminosity can be set at the beginning of "JMRAnalysisTools/util/JMR_plots.cxx".

Description of contents and structure of the package

The structure of the package is similar to other xAOD packages.

You can find additional information on contents of the package and on its structure in the README file in "JMRAnalysisTools/README.txt".

To do

Computation of QCD background is currently not implemented, since tools are still under development.

In order to reduce its impact on the final result, one can use the only mu+jets channel.

List of slides presented at the JSS meetings.

Link to the note we are working on:

-- DavideMelini - 2016-01-13

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip r1 manage 8295.4 K 2016-06-14 - 11:11 DavideMelini  
Unknown file formatgz AnalysisTop-2.4.16.tar.gz r1 manage 38705.1 K 2016-11-03 - 17:59 DavideMelini to be used after setting up AnalysisTop-2.4.16
Unknown file formatgz JMRAnalysisTools-2.3.37.tar.gz r1 manage 132187.2 K 2015-12-18 - 12:51 DavideMelini  
Unknown file formatgz JMRAnalysisTools-2.4.23.tar.gz r1 manage 16124.3 K 2017-06-08 - 09:29 DavideMelini  
Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r17 - 2019-05-15 - AlbertoPradesIbanez
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox 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.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback