Skip to content

Commit 2e57c56

Browse files
authored
Merge pull request #329 from njacazio/master
Format PID, last fixes, add ITS task
2 parents f652cac + 79437d2 commit 2e57c56

File tree

1 file changed

+34
-23
lines changed

1 file changed

+34
-23
lines changed

docs/analysis-tools/PID.md

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Table of contents:
1010
- [Particle identification (PID)](#particle-identification-pid)
1111
- [Introduction](#introduction)
1212
- [Usage in user tasks](#usage-in-user-tasks)
13-
- [Task for TOF and TPC PID](#task-for-tof-and-tpc-pid)
13+
- [Task for TOF, TPC and ITS PID](#task-for-tof-tpc-and-its-pid)
1414
- [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)
1515
- [Enabling QA histograms](#enabling-qa-histograms)
1616

@@ -44,50 +44,60 @@ You can include it in your task with:
4444
In the process functions, you can join the table to add the PID (per particle mass hypothesis) information to the track.
4545
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`).
4646

47-
* For the **TOF** PID as:
47+
- For the **TOF** PID as:
4848

4949
``` c++
5050
void process(soa::Join<aod::Tracks, aod::pidTOFEl>::iterator const& track) {
5151
track.tofNSigmaEl();
5252
}
5353
```
5454

55-
* For the **TPC** PID as:
55+
- For the **TPC** PID as:
5656

5757
``` c++
5858
void process(soa::Join<aod::Tracks, aod::pidTPCEl>::iterator const& track) {
5959
track.tpcNSigmaEl();
6060
}
6161
```
6262

63-
* For both TOF and TPC PID information as:
63+
- For both TOF and TPC PID information as:
6464

6565
``` c++
6666
void process(soa::Join<aod::Tracks, aod::pidTOFEl, aod::pidTPCEl>::iterator const& track) {
6767
const float combNSigmaEl = std::sqrt( track.tofNSigmaEl() * track.tofNSigmaEl() + track.tpcNSigmaEl() * track.tpcNSigmaEl());
6868
}
6969
```
7070

71-
## Task for TOF and TPC PID
71+
- For the **ITS** PID as:
7272

73-
**In short:** O2 tasks dedicated to the filling of the PID tables are called with
74-
75-
* Filling TOF PID Table
73+
``` c++
74+
void init(o2::framework::InitContext& context)
75+
{
76+
o2::aod::ITSResponse::setParameters(context);
77+
}
7678

77-
``` bash
78-
o2-analysis-pid-tof
79+
void process(aod::Tracks const& tracks) {
80+
auto tracksWithPid = soa::Attach<aod::Tracks, aod::pidits::ITSNSigmaEl>(tracks);
81+
tracksWithPid.iteratorAt(0).tpcNSigmaEl();
82+
}
7983
```
8084

81-
This requires a helper class for the building of the event time information
85+
86+
## Task for TOF, TPC and ITS PID
87+
88+
**In short:** O2 tasks dedicated to the filling of the PID tables are called with
89+
90+
- Filling TOF PID Table
8291

8392
``` bash
84-
o2-analysis-pid-tof-base
93+
o2-analysis-pid-tof-merge
8594
```
8695

87-
These tasks can be configured according to the needs specified by the detector experts.
96+
This requires no other tasks.
97+
This tasks can be configured according to the needs specified by the detector experts.
8898
If you are in doubt, you can contact them or take the configuration of the Hyperloop as a reference.
8999

90-
* Filling the TPC PID Table
100+
- Filling the TPC PID Table
91101

92102
``` bash
93103
o2-analysis-pid-tpc
@@ -98,27 +108,29 @@ In this case, we are using the mass hypothesis of the electron, but tables for n
98108
```
99109

100110
These tasks can be configured according to the needs specified by the detector experts.
101-
If you are in doubt, you can contact them or take the configuration of the Hyperloop as a reference.
111+
If you are in doubt, you can contact them or take the configuration of the Hyperloop [`TOF`](https://alimonitor.cern.ch/hyperloop/view-wagon/12925/wagon-settings), [`TPC`](https://alimonitor.cern.ch/hyperloop/view-wagon/34291/wagon-settings) and [`ITS`](https://alimonitor.cern.ch/hyperloop/view-wagon/21173/wagon-settings) as a reference.
102112

103113
## Example of tasks that use the PID tables (and how to run them)
104114

105-
* TOF PID task [`pidTOF.cxx`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/TableProducer/PID/pidTOF.cxx)
106-
You can run the TOF spectra task with:
115+
- TOF PID task [`pidTOFMerge.cxx`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/TableProducer/PID/pidTOFMerge.cxx)
116+
You can run the TOF qa task with:
107117

108118
``` bash
109-
o2-analysis-pid-tof-qa --aod-file AO2D.root -b | o2-analysis-pid-tof -b | o2-analysis-pid-tof-base -b
119+
... | o2-analysis-pid-tof-qa -b | o2-analysis-pid-tof-merge -b --aod-file AO2D.root
110120
```
111121

112-
* TPC PID task [`pidTPC.cxx`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/TableProducer/PID/pidTPC.cxx)
113-
You can run the TPC spectra task with:
122+
- TPC PID task [`pidTPC.cxx`](https://github.com/AliceO2Group/O2Physics/tree/master/Common/TableProducer/PID/pidTPC.cxx)
123+
You can run the TPC qa task with:
114124

115125
``` bash
116-
o2-analysis-pid-tpc-qa --aod-file AO2D.root -b | o2-analysis-pid-tpc -b | o2-analysis-pid-tpc-base -b
126+
... | o2-analysis-pid-tpc-qa -b | o2-analysis-pid-tpc -b | o2-analysis-pid-tpc-base -b --aod-file AO2D.root
117127
```
118128

129+
Where by `...` we mean the other tasks in your workflow.
130+
119131
## Enabling QA histograms
120132

121-
* 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:
133+
- 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:
122134

123135
For the **TOF** QA plots
124136

@@ -133,4 +145,3 @@ In this case, we are using the mass hypothesis of the electron, but tables for n
133145
```
134146

135147
Where by `...` we mean the other tasks in your workflow.
136-

0 commit comments

Comments
 (0)