1. Run the example

Our starting point for these exercises is the AnalysisTask: "AliAnalysisTaskMyTask.cxx" that was covered during the presentation. To run this task, you need to

  • download an input file AliAOD.root, which contains real events from the 2010 Pb-Pb run. You can download it at LINK.
  • download a .tar file with the full code from the tutorial webpage https://indico.cern.ch/event/647269/

Store these files on your laptop. The path in which you store these files cannot contain spaces! E.g. /home/my awesome task/ will not work, use /home/my_awesome_task/

1.1 Testing the task

As a start, just take a look at code that makes up the task. First, create a folder in which you want to run your analysis, and extract the contents of the .tar file to this folder. When you've extracted the .tar file, you should see the files that were also covered in the first part of the talk:

  • AliAnalysisTask.cxx
  • AliAnalysisTask.h
  • AddMyTask.C
  • runAnalysis.C

try to see where all the code snippets that were shown during the presentation t in. See if you can answer the following questions:

  • which function is called for each event?
  • where are the output histogram defined?
  • where are the output histogram filled?

1.2 Running the task

It's time to run this simple analysis. If you don't have AliROOT running on your laptop already, ask for our help and/or team up with one of your fellow summer students. To run the task, open a terminal, source your aliroot environment and type

$ aliroot runAnalysis.C

This launches aliroot, and executes the macro 'runAnalysis.C'. Make sure though, that the macro 'knows' where you stored the AliAOD.root file on your laptop. If the AliAOD.root file is in a different folder than the analysis source code, open the runAnalysis.C file, and change the lines where the input file is accessed.

1.3 Take a look at the output

If all goes well, your simple task runs over the input data, and fills one histogram with the distribution of transverse momentum ($$p_T$$) of all charged particle tracks in all events. Once the task is done running, take a look at it. Open a TBrowser (ROOT's 'graphical user interface') and take a look at the distribution in the histogram. No idea how to open a TBrowser, or what a TBrowser even is? Don't hesitate to ask, and take a look at the ROOT user's guide.

results matching ""

    No results matching ""