Skip to content

Commit e731cd9

Browse files
authored
Merge pull request #257 from vkucera/pwghf
PWGHF: Update framework documentation
2 parents ffedb2c + d37205e commit e731cd9

File tree

1 file changed

+32
-13
lines changed

1 file changed

+32
-13
lines changed

docs/advanced-specifics/pwghf.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,43 @@ from the [O2 Analysis Tutorial 2.0](https://indico.cern.ch/event/1267433/) (17-2
1818

1919
## Contact
2020

21-
Coordinators: Francesco Prino, Vít Kučera
22-
2321
Mattermost channel: [hf-o2-analysis](https://mattermost.web.cern.ch/alice/channels/hf-o2-analysis)
2422

2523
## Code
2624

27-
- Code used by the heavy-flavour analysis framework are in the
25+
- Code used by the heavy-flavour analysis framework is in the
2826
[`PWGHF`](https://github.com/AliceO2Group/O2Physics/tree/master/PWGHF) directory.
29-
- Tables produced by skimming and candidate creators are defined in
27+
- Tables produced by skimming and candidate creators are defined in
3028
[`CandidateReconstructionTables.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/DataModel/CandidateReconstructionTables.h).
31-
- Tables produced by candidate selectors are defined in
29+
- Tables produced by candidate selectors are defined in
3230
[`CandidateSelectionTables.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/DataModel/CandidateSelectionTables.h).
33-
- Default parameters used in the selection of single tracks, track-index skims and candidates are defined in
31+
- Tables produced by derived-data creators are defined in
32+
[`DerivedTables.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/DataModel/DerivedTables.h).
33+
- Default parameters used in the selection of single tracks, track-index skims and candidates are defined in
3434
[`SelectorCuts.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/Core/SelectorCuts.h).
35+
- Machine learning response classes are implemented in [`HfMlResponse(...).h`](https://github.com/AliceO2Group/O2Physics/tree/master/PWGHF/Core) files.
36+
- Utilities, providing small pieces of code used repeatedly in many workflows, are in the
37+
[`Utils`](https://github.com/AliceO2Group/O2Physics/tree/master/PWGHF/Utils) directory.
3538
- Secondary-vertex reconstruction algorithms are implemented in the
3639
[`DCAFitterN`](https://github.com/AliceO2Group/AliceO2/blob/dev/Common/DCAFitter/include/DCAFitter/DCAFitterN.h) class.
3740
- Functions for calculations of kinematic quantities and for MC matching are implemented in the
3841
[`RecoDecay`](https://github.com/AliceO2Group/O2Physics/blob/master/Common/Core/RecoDecay.h) class.
3942
- Selection of tracks based on the particle identification (PID) detectors is performed via the
4043
[`TrackSelectorPID`](https://github.com/AliceO2Group/O2Physics/blob/master/Common/Core/TrackSelectorPID.h) class.
41-
- Code for easy local running of the HF tasks and output processing can be found in the
44+
- The validation framework for easy local execution, testing and validation of O2Physics code can be found in the
4245
[Run3Analysisvalidation](https://github.com/AliceO2Group/Run3Analysisvalidation) repository.
43-
- Analysis code for postprocessing of the task output is collected in the
44-
[`FirstAnalysis`](https://github.com/AliceO2Group/Run3Analysisvalidation/tree/master/FirstAnalysis) directory.
4546

4647
## AliHyperloop
4748

4849
<!-- markdown-link-check-disable -->
4950
[AliHyperloop analyses](https://alimonitor.cern.ch/hyperloop/all-analyses)
5051
<!-- markdown-link-check-enable -->
5152
(Type "PWGHF" in the field "JIRA" to filter.)<br>
52-
Corresponding [JIRA tickets](https://alice.its.cern.ch/jira/issues/?jql=project%20%3D%20PWGHF%20AND%20%22Run%203%20analysis%22%20%3D%20Yes)
53+
Corresponding [JIRA tickets](https://its.cern.ch/jira/issues/?jql=project%20%3D%20PWG-HF%20AND%20%22Run%203%20analysis%22%20%3D%20Yes)
5354

5455
## Framework structure
5556

56-
Simplified graph of the workflows and tasks involved in a single HF analysis is shown in the following picture.
57+
A simplified graph of the workflows and tasks involved in a single HF analysis is shown in the following picture.
5758
Individual components are described in the next section below.
5859

5960
<div align="center">
@@ -136,20 +137,38 @@ For MC events, histograms with quantities of generated MC particles and MC-match
136137
### Tree creation
137138

138139
Candidate tables and other related derived tables are exported to disk as ROOT trees for
139-
post-processing with external tools, e.g. for optimisation with Machine Learning techniques.
140+
post-processing with external tools, e.g. for selection optimisation with machine learning techniques.
140141

141142
Workflows: `o2-analysis-hf-tree-creator-<particle|decay>`<br>
142143
Files: `treeCreator<Particle|Decay>.cxx`<br>
143144
Directories: [`PWGHF/TableProducer`](https://github.com/AliceO2Group/O2Physics/tree/master/PWGHF/TableProducer), `PWGHF/*/TableProducer`
144145

146+
### Derived-data creation
147+
148+
Derived-data creators are a better alternative to tree creators, because they are more flexible and
149+
can produce light self-contained interlinked tables which are independent from the parent AO2D files
150+
and can therefore be stored as derived datasets on AliHyperloop as well as processed locally.
151+
152+
Workflows: `o2-analysis-hf-derived-data-creator-<particle|decay>`<br>
153+
Files: `derivedDataCreator<Particle|Decay>.cxx`<br>
154+
Directories: [`PWGHF/TableProducer`](https://github.com/AliceO2Group/O2Physics/tree/master/PWGHF/TableProducer), `PWGHF/*/TableProducer`
155+
145156
### QA and helper workflows
146157

147158
Workflow | File | Type
148159
---------------------------------------|---------------------------|----------------------------------------------------------------------------
160+
`o2-analysis-hf-pid-creator` | `pidCreator.cxx` | creation of tables combining *σ* from TPC and TOF for track selection
149161
`o2-analysis-hf-task-mc-validation` | `taskMcValidation.cxx` | validation of HF MC distributions
150162
`o2-analysis-hf-task-sel-optimisation` | `taskSelOptimisation.cxx` | preselection optimisation
151163
`o2-analysis-hf-refit-pv-dummy` | `refitPvDummy.cxx` | creation of a dummy table with primary-vertex position (for converted data)
152164

165+
### Postprocessing scripts and macros
166+
167+
Python scripts and ROOT macros which process the O2Physics output files.
168+
In general, Python scripts are preferred over ROOT macros.
169+
170+
Directories: [`PWGHF/D2H/Macros`](https://github.com/AliceO2Group/O2Physics/tree/master/PWGHF/D2H/Macros)
171+
153172
## Contribute
154173

155174
### Code development guidelines
@@ -185,7 +204,7 @@ Workflow | File | Type
185204
- Sort `#include`s alphabetically within a group.
186205
- Avoid using hard-coded PDG codes. Use their `enum` names instead
187206
(from [`PDG_t`](https://root.cern/doc/master/TPDGCode_8h.html) or
188-
[`o2::analysis::pdg::Code`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/Core/PDG.h)).
207+
[`o2::constants::physics::Pdg`](https://github.com/AliceO2Group/AliceO2/blob/dev/Common/Constants/include/CommonConstants/PhysicsConstants.h)).
189208
See also [Magic numbers](https://rawgit.com/AliceO2Group/CodingGuidelines/master/coding_guidelines.html?showone=Magic_numbers#Magic_numbers).
190209
- Use `Type const&` for table subscriptions in function arguments.
191210
- Declare iterators in range-based `for` loops over tables with `const auto&`.

0 commit comments

Comments
 (0)