AliPhysics  d497afb (d497afb)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Jet QA

Running the Jet QA task

The task AliAnalysisTaskPWGJEQA performs basic QA relevant to the jet group. This task is appropriate as a first step for an analysis (as opposed to light QA to be run shortly after data-taking – for this see the AnalysisQA train). See the task for details.

  • For an example configuration in PbPb data, see Jets_EMC_PbPb train 1872.
  • For an example in a pp Pt-hard production, see Jets_EMC_pp_MC train 1031.

Plotting Jet QA

There are a handful of scripts used to process the output from the QA task, covering several different use cases:


For Pt-hard productions, there are two additional scripts:


The scripts are located at $ALICE_PHYSICS/PWGJE//EMCALJetTasks/macros/JetQA.


  • The script uses the python package python-pptx. You can install this (via pip) with: pip install python-pptx
  • In order for error bars to be computed correctly, you should use ROOT 6. There is an issue with ROOT 5 versions used by ALICE that calling Sumw2() on a THnSparse after filling does not propagate the errors – a feature that is extensively used in this QA machinery.

Please read on for simple instructions of the workflow.

Run-by-run QA

The main script is It downloads the output files from your train, generates plots from these roots files, and constructs a powerpoint presentation. See the script for options that need to be configured.

The script uses two python scripts:

  • is a plotting macro that generates plots in an output directory
  • is a macro that generates a powerpoint presentation using these plots

The run-by-run QA machinery also expects a reference file consisting of all runs merged together. This file should be placed in the location specified in

Steps for data or non-Pt-hard productions

  1. Download the merged output file from your train (merged over all runs), and place it as the reference file. Run the script to generate QA plots for this reference file, and place it in a directory TrainOutput/AllRuns/QAoutput.
  2. Configure and execute

Steps for Pt-hard productions

Rather than using to download data, you should instead use the script This script downloads data per Pt-hard bin, and merges and scales appropriately using Pt-hard weights computed from histograms filled in AliAnalysisTaskPWGJEQA, using the script

  1. Configure to download data (but not merge or scale), and execute. This may take awhile since it is a lot of data! You should then copy the data – we will use one copy to generate the reference file, and one for the run-by-run QA. You may additionally wish to make an additional backup, in case something is misconfigured in later steps, so that you don't have to re-download.
  2. Configure to merge/scale/merge (but not download data) and with doRunByRun=false. This will produce your reference file – place it appropriately. Run the script to generate QA plots for this reference file, and place it in a directory TrainOutput/AllRuns/QAoutput.
  3. Configure to merge/scale/merge (but not download data) and with doRunByRun=true. You should also enable the option useReferenceFile=true, in order to take Pt-hard weights from the reference file. This will produce your run-by-run QA root files.
  4. Configure to plot QA and generate presentation, but not to download data. Execute the script.

Non Run-by-run QA

If you do not need run-by-run QA, you can download the the output by hand and directly execute the plotting macro See the script for details.

In case of Pt-hard production, you should use as described above (but with doRunByRun = false) to download, merge, and scale the output. Then proceed to execute

Questions / Comments ?

If you encounter problems, or if anything is confusing, or if you would like to make improvements (which are very welcome!) please write to or post to EMCAL-24.