|
| 1 | +--- |
| 2 | +sort: 2 |
| 3 | +title: Particle identification (PID) |
| 4 | +--- |
| 5 | + |
| 6 | +# Particle identification (PID) |
| 7 | + |
| 8 | +Table of contents: |
| 9 | + |
| 10 | +* [Introduction](#introduction) |
| 11 | +* [Usage in user tasks](#usage-in-user-tasks) |
| 12 | +* [Task for TOF and TPC PID](#task-for-tof-and-tpc-pid) |
| 13 | +* [Example of tasks that use the PID tables (and how to run them)](#example-of-tasks-that-use-the-pid-tables-and-how-to-run-them) |
| 14 | + |
| 15 | +Here are described the working principles of Particle Identification (PID) in O2 and how to get PID information (expected values, nSigma separation _et cetera_) in your analysis tasks if you plan to identify particles. |
| 16 | + |
| 17 | +## Introduction |
| 18 | + |
| 19 | +PID is handled in analysis by filling helper tables that can be joined to tracks (propagated or not). |
| 20 | +The parameterization of the expected detector response (e.g. signal, resolution, separation) is used in the PID tasks to fill the PID tables. |
| 21 | +These parameterizations are detector specific and handled by the detector experts; usually, they are shipped to the PID helper tasks from the CCDB to match the data-taking conditions. |
| 22 | +The interface between the detector and the Analysis Framework (i.e. your tracks) is fully enclosed in [`PIDResponse.h`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/DataModel/PIDResponse.h). |
| 23 | +Here are the defined tables for the PID information for all the detectors. |
| 24 | + |
| 25 | +The filling of the PID tables is delegated to dedicated tasks in [`Common/TableProducer/PID/`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/TableProducer/PID) |
| 26 | +Examples of these tasks can be found in [`pidTOF.cxx`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/TableProducer/PID/pidTOF.cxx) and [`pidTPC.cxx`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/TableProducer/PID/pidTPC.cxx) for TOF and TPC tables, respectively. |
| 27 | + |
| 28 | +## Usage in user tasks |
| 29 | + |
| 30 | +Tables for PID values in O2 are defined in [`PIDResponse.h`](https://github.com/AliceO2Group/O2Physics/blob/master/Common/DataModel/PIDResponse.h). |
| 31 | +You can include it in your task with: |
| 32 | + |
| 33 | +``` c++ |
| 34 | +#include "Common/DataModel/PIDResponse.h" |
| 35 | +... |
| 36 | + |
| 37 | +``` |
| 38 | + |
| 39 | +In the process functions, you can join the table to add the PID (per particle mass hypothesis) information to the track. |
| 40 | +In this case, we are using the mass hypothesis of the electron, but tables for nine (9) stable particle species are produced (`El`, `Mu`, `Pi`, `Ka`, `Pr`, `De`, `Tr`, `He`, `Al`). |
| 41 | + |
| 42 | +* For the **TOF** PID as: |
| 43 | + |
| 44 | + ``` c++ |
| 45 | + void process(soa::Join<aod::Tracks, aod::pidTOFEl>::iterator const& track) { |
| 46 | + track.tofNSigmaEl(); |
| 47 | + } |
| 48 | + ``` |
| 49 | + |
| 50 | +* For the **TPC** PID as: |
| 51 | + |
| 52 | + ``` c++ |
| 53 | + void process(soa::Join<aod::Tracks, aod::pidTPCEl>::iterator const& track) { |
| 54 | + track.tpcNSigmaEl(); |
| 55 | + } |
| 56 | + ``` |
| 57 | + |
| 58 | +* For both TOF and TPC PID information as: |
| 59 | + |
| 60 | + ``` c++ |
| 61 | + void process(soa::Join<aod::Tracks, aod::pidTOFEl, aod::pidTPCEl>::iterator const& track) { |
| 62 | + const float combNSigmaEl = std::sqrt( track.tofNSigmaEl() * track.tofNSigmaEl() + track.tpcNSigmaEl() * track.tpcNSigmaEl()); |
| 63 | + } |
| 64 | + ``` |
| 65 | + |
| 66 | +## Task for TOF and TPC PID |
| 67 | + |
| 68 | +**In short:** O2 tasks dedicated to the filling of the PID tables are called with |
| 69 | + |
| 70 | +* Filling TOF PID Table |
| 71 | + |
| 72 | + ``` bash |
| 73 | + o2-analysis-pid-tof |
| 74 | + ``` |
| 75 | + |
| 76 | + This requires a helper class for the building of the event time information |
| 77 | + |
| 78 | + ``` bash |
| 79 | + o2-analysis-pid-tof-base |
| 80 | + ``` |
| 81 | + |
| 82 | + These tasks can be configured according to the needs specified by the detector experts. |
| 83 | + If you are in doubt, you can contact them or take the configuration of the Hyperloop as a reference. |
| 84 | + |
| 85 | +* Filling the TPC PID Table |
| 86 | + |
| 87 | + ``` bash |
| 88 | + o2-analysis-pid-tpc |
| 89 | + ``` |
| 90 | + |
| 91 | + ``` bash |
| 92 | + o2-analysis-pid-tpc-base |
| 93 | + ``` |
| 94 | + |
| 95 | + These tasks can be configured according to the needs specified by the detector experts. |
| 96 | + If you are in doubt, you can contact them or take the configuration of the Hyperloop as a reference. |
| 97 | + |
| 98 | +## Example of tasks that use the PID tables (and how to run them) |
| 99 | + |
| 100 | +* TOF PID task [`pidTOF.cxx`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/TableProducer/PID/pidTOF.cxx) |
| 101 | + You can run the TOF spectra task with: |
| 102 | + |
| 103 | + ``` bash |
| 104 | + o2-analysis-pid-tof-qa --aod-file AO2D.root -b | o2-analysis-pid-tof -b | o2-analysis-pid-tof-base -b |
| 105 | + ``` |
| 106 | + |
| 107 | +* TPC PID task [`pidTPC.cxx`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/TableProducer/PID/pidTPC.cxx) |
| 108 | + You can run the TPC spectra task with: |
| 109 | + |
| 110 | + ``` bash |
| 111 | + o2-analysis-pid-tpc-qa --aod-file AO2D.root -b | o2-analysis-pid-tpc -b | o2-analysis-pid-tpc-base -b |
| 112 | + ``` |
| 113 | + |
| 114 | +## Enabling QA histograms |
| 115 | + |
| 116 | +* QA histograms should come with the PID tasks; they can be enabled by including the QA tasks in your workflow when running locally or with the corresponding QA tasks as in: |
| 117 | + |
| 118 | + For the **TOF** QA plots |
| 119 | + |
| 120 | + ``` bash |
| 121 | + ... | o2-analysis-pid-tof-qa | ... |
| 122 | + ``` |
| 123 | + |
| 124 | + For the **TPC** QA plots |
| 125 | + |
| 126 | + ``` bash |
| 127 | + ... | o2-analysis-pid-tpc-qa | ... |
| 128 | + ``` |
| 129 | + |
| 130 | + Where by `...` we mean the other tasks in your workflow. |
| 131 | + |
0 commit comments