Build O2 with aliBuild as explained here.
NOTE: Most of us use Ubuntu 18.04 / 20.04, so better pick Ubuntu.
NOTE: The instructions can quickly get outdated - aliDoctor might show you more packages than suggested by the instructions. However, you should never see Python - in that case install additional libraries with sudo apt-get install python3-dev
(Ubuntu) or sudo yum install python3-devel
(CentOS).
You will need also the GRID access to data, follow the instructions to get the certificate.
NOTE: You can test the certificate inside O2 instead of AliPhysics if you don't have AliPhysics.
Fork the O2 repository on GitHub: go to the repository page and click on 'Fork' in the upper right corner.
Then, inside your alice/O2/
directory:
git remote remove origin
git remote add origin <your_forked_repository_link>
git remote add upstream https://github.com/AliceO2Group/AliceO2.git # the main O2 repo
git remote -vvv # verify the remotes are set correctly
What it does: we set the origin
reference (i.e. the main, default remote repository) to your fork, so push
/pull
will by default refer to your own repository. Then, we add an upstream
reference to the official O2 repository, so you can then pull
any new changes and regularly update your repository.
NOTE: After the June O2 changes you might have already the upstream
reference set correctly - verify with git remote -vvv
and add the origin reference to your fork.
Now, you can create and push branches to your own repo (origin
) with your own O2 codes.
When you will be developing new codes, remember to stay up-to-date with the official repo:
git fetch upstream # Downloads new commits from the official repo
git checkout dev
git rebase upstream/dev # Updates your own dev with the official dev commits
git checkout <your_working_branch>
git rebase dev
MC correspondence on AliMonitor
O2 conversion trains
I see the following pairs (outdated):
system | train number | run name | MC train number | MC run name |
---|---|---|---|---|
Pb-Pb | 180 | LHC15o | 184 | LHC20f6 |
pp | 183 | LHC18_pp_bdefghiklmnop | 186 | LHC18g4 |
To get AOD files:
- Scroll down on the O2 conversion trains page
- Click on the train number --> Test Results
- Scroll down to 'full train', click on output
- Download
AO2D.root
Inside alice/O2
do:
git remote add <remote_name> https://github.com/saganatt/AliceO2.git # <remote_name> is any alias you wish e.g. saganatt
git fetch <remote_name>
git checkout learning-o2 # This automatically creates a local branch with changes from <remote_name>/learning-o2
git push -u origin # This creates a learning-o2 branch in your remote (GitHub) repository
What it does: You add a reference to my GitHub repository and you download (fetch
) my changes. Then you create your own branch, locally and in your remote repository, with the simple analysis example.
After these steps, your learning-o2
is independent from my repository, i.e. any your following changes won't affect the code in my repo, and vice versa.
Create a directory for analysis / test. Place your downloaded AOD data files there. Then, call from this directory:
alienv enter O2/latest
o2-analysistutorial-simple-analysis --aod-file <aod_file_name> -b
It is recommended to install direnv (sudo apt-get install direnv
on Ubuntu). This package manages environment variables like PATH
and LD_LIBRARY_PATH
. After the installation, add: eval "$(direnv hook bash)"
at the end of the ~/.bashrc
file, and reload your shell (for example, open new terminal window).
After you change some files, you might want to test them without building the whole O2. You can use ninja to build only the updated codes and their dependants.
cd alice/sw/BUILD/O2Physics-latest/O2Physics
direnv allow
alienv load ninja/latest O2Physics/latest
ninja install stage/bin/your-analysis-file
Calling ninja
or ninja install
without arguments will build all changed files and their dependants.
NOTE: If you add a new source file to O2Physics, you need to add it to your Git repository, otherwise aliBuild will not see any new changes made to this file and it won't recompile.
NOTE: In case you've updated the binaries with ninja
(but not ninja install
), you need to copy the new binary to your current dir and call ./o2-analysis*
:
cp alice/sw/BUILD/O2-latest/O2/stage/bin/o2-analysistutorial-simple-analysis .
./o2-analysistutorial-simple-analysis --aod-file <aod_file_name> -b
The output results are in AnalysisResults.root
.
Documentation under development.
The very simple analysis task is in Analysis/Tutorials/src/simpleAnalysis.cxx
. You can look at other analyses in Tutorials.
PID Response - documentation
TPC and TOF information is separated. The tables are defined in Analysis/DataModel/include/PID/PIDResponse.h
.