Skip to content

Commit 68bb3c3

Browse files
committed
Update PWG-HF documentation
1 parent 55daebd commit 68bb3c3

File tree

5 files changed

+2755
-1945
lines changed

5 files changed

+2755
-1945
lines changed

docs/advanced-specifics/pwghf.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,24 @@ title: PWG-HF
77

88
## Get started
99

10-
- See the materials from the [HF O2 hackathon](https://indico.cern.ch/event/1101005/)
11-
(includes introduction to O2, O2 HF, tutorials,...) and watch the
12-
[Zoom recordings of the sessions](https://videos.cern.ch/deposit/project/cbe4869a27f749b7b45ea66577ca8a9f) (7, 9 Dec 2021).
13-
- See the [presentation on HF vertexing and analysis](https://indico.cern.ch/event/1200252/timetable/#10-hf-vertexing-and-analysis)
10+
See the presentations and materials from the HF session of the latest [O2 Analysis Tutorial](../tutorials/README.md#tutorial-events).
11+
12+
### Archive
13+
14+
- [HF O2 hackathon](https://indico.cern.ch/event/1101005/)
15+
(introduction to O2, O2 HF, tutorials,...),
16+
[Zoom recordings of the sessions](https://videos.cern.ch/deposit/project/cbe4869a27f749b7b45ea66577ca8a9f) (7, 9 Dec 2021)
17+
- [Presentation on HF vertexing and analysis](https://indico.cern.ch/event/1200252/timetable/#10-hf-vertexing-and-analysis)
1418
and the [HF analysis example](https://indico.cern.ch/event/1200252/timetable/#23-hands-on-session-4-analysis)
15-
from the [O2 Analysis Tutorial](https://indico.cern.ch/event/1200252/) (13–14 Oct 2022).
16-
- See the [HF hands-on session](https://indico.cern.ch/event/1267433/timetable/#b-504545-parallel-hands-on-pwg)
17-
from the [O2 Analysis Tutorial 2.0](https://indico.cern.ch/event/1267433/) (17-28 Apr 2023).
19+
at the O2 Analysis Tutorial (1.0) (14 Oct 2022)
20+
- [HF session](https://indico.cern.ch/event/1267433/timetable/#b-504545-parallel-hands-on-pwg)
21+
at the O2 Analysis Tutorial 2.0 (27 Apr 2023)
22+
- [HF session](https://indico.cern.ch/event/1326201/timetable/#b-528200-pwg-hf-the-heavy-flav)
23+
at the O2 Analysis Tutorial 3.0 (8 Nov 2023)
24+
- [HF session](https://indico.cern.ch/event/1425820/timetable/#b-571495-pwg-hf-the-heavy-flav)
25+
at the O2 Analysis Tutorial 4.0 (16 Oct 2024)
26+
- [HF session](https://indico.cern.ch/event/1574136/timetable/#b-629951-pwg-hf-pwg-hf-tutoria)
27+
at the O2 Analysis Tutorial 5.0 (12 Nov 2025)
1828

1929
## Contact
2030

@@ -24,12 +34,16 @@ Mattermost channel: [hf-o2-analysis](https://mattermost.web.cern.ch/alice/channe
2434

2535
- Code used by the heavy-flavour analysis framework is in the
2636
[`PWGHF`](https://github.com/AliceO2Group/O2Physics/tree/master/PWGHF) directory.
27-
- Tables produced by skimming and candidate creators are defined in
37+
- Tables produced by the track index skim creator are defined in
38+
[`TrackIndexSkimmingTables.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/DataModel/TrackIndexSkimmingTables.h).
39+
- Tables produced by candidate creators are defined in
2840
[`CandidateReconstructionTables.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/DataModel/CandidateReconstructionTables.h).
2941
- Tables produced by candidate selectors are defined in
3042
[`CandidateSelectionTables.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/DataModel/CandidateSelectionTables.h).
3143
- Tables produced by derived-data creators are defined in
3244
[`DerivedTables.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/DataModel/DerivedTables.h).
45+
- Constants for MC flagging of HF decay channels are defined in
46+
[`DecayChannels.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/Core/DecayChannels.h).
3347
- Default parameters used in the selection of single tracks, track-index skims and candidates are defined in
3448
[`SelectorCuts.h`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/Core/SelectorCuts.h).
3549
- Machine learning response classes are implemented in [`HfMlResponse(...).h`](https://github.com/AliceO2Group/O2Physics/tree/master/PWGHF/Core) files.
@@ -41,7 +55,7 @@ Mattermost channel: [hf-o2-analysis](https://mattermost.web.cern.ch/alice/channe
4155
[`RecoDecay`](https://github.com/AliceO2Group/O2Physics/blob/master/Common/Core/RecoDecay.h) class.
4256
- Selection of tracks based on the particle identification (PID) detectors is performed via the
4357
[`TrackSelectorPID`](https://github.com/AliceO2Group/O2Physics/blob/master/Common/Core/TrackSelectorPID.h) class.
44-
- The validation framework for easy local execution, testing and validation of O2Physics code can be found in the
58+
- The validation framework for easy local execution, testing, and validation of O2Physics code can be found in the
4559
[Run3AnalysisValidation](https://github.com/AliceO2Group/Run3AnalysisValidation) repository.
4660

4761
## AliHyperloop
@@ -50,15 +64,15 @@ Mattermost channel: [hf-o2-analysis](https://mattermost.web.cern.ch/alice/channe
5064
[AliHyperloop analyses](https://alimonitor.cern.ch/hyperloop/all-analyses)
5165
<!-- markdown-link-check-enable -->
5266
(Type "PWGHF" in the field "JIRA" to filter.)<br>
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)
67+
Corresponding [JIRA tickets](https://its.cern.ch/jira/issues/?jql=project%20%3D%20PWGHF%20AND%20%22Run%203%20analysis%22%20%3D%20Yes%20ORDER%20BY%20created%20ASC)
5468

5569
## Framework structure
5670

5771
A simplified graph of the workflows and tasks involved in a single HF analysis is shown in the following picture.
5872
Individual components are described in the next section below.
5973

6074
<div align="center">
61-
<img src="../images/pwghf_graph.svg" width="800px" alt="PWGHF analysis framework">
75+
<img src="../images/graph_o2_hf_simple.svg" width="800px" alt="PWGHF analysis framework">
6276
</div>
6377

6478
## Framework components
@@ -192,7 +206,7 @@ Directories: [`PWGHF/D2H/Macros`](https://github.com/AliceO2Group/O2Physics/tree
192206
- `error` for problems that lead to an unwanted behaviour of the code,
193207
- `fatal` for critical problems that make further running of the code impossible or useless.
194208
- Include only needed headers but do not rely on implicitly included headers. See [Include What You Use](https://github.com/AliceO2Group/O2Physics/issues/8357).
195-
- Sort `#include`s from most specific to least specific and organise them into groups (separated by a blank line) in the following order (can be done automatically with [clang-format](../tools/README.md#pre-commit-hooks)):
209+
- Sort `#include`s from most specific to least specific and organise them into groups (separated by a blank line) in the following order (done automatically by [clang-format](../tools/README.md#pre-commit-hooks)):
196210

197211
1. Main module
198212
2. Local-like file
@@ -212,7 +226,7 @@ Directories: [`PWGHF/D2H/Macros`](https://github.com/AliceO2Group/O2Physics/tree
212226
- C++ standard library
213227
- C standard library
214228

215-
- Sort `#include`s alphabetically within a group.
229+
- Sort `#include`s alphabetically within a group (done automatically by [clang-format](../tools/README.md#pre-commit-hooks)).
216230
- Avoid using hard-coded PDG codes. Use their `enum` names instead
217231
(from [`PDG_t`](https://root.cern/doc/master/TPDGCode_8h.html) or
218232
[`o2::constants::physics::Pdg`](https://github.com/AliceO2Group/AliceO2/blob/dev/Common/Constants/include/CommonConstants/PhysicsConstants.h)).
@@ -259,7 +273,7 @@ Organising the code in a well defined structure makes it easier to navigate thro
259273

260274
### Naming conventions
261275

262-
- Use the `<object><attribute>` (or `<general><specific>`) naming scheme, so that names of the same kind of objects start with same string and the different attributes follow.
276+
- Use the `<object><attribute>` (or `<general><specific>`) naming scheme, so that names of the same kind of objects start with same string and the different attributes follow (imagine a tree hierarchy).
263277
This scheme makes names more readable, searchable and sortable.
264278
- Example: `ptTrackMin`, `etaTrackMax`, `trackPos`, `trackNeg` is more readable and sortable than `minTrackPt`, `maxTrackEta`, `posTrack`, `negTrack`.
265279
- Word-like strings (acronyms, abbreviations, particle names, mathematical variables) are treated as words; i.e. capitalise only the first letter.

docs/images/graph_o2_hf_simple.gv

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
// Graph of the PWG-HF analysis framework simplified for an analysis of one decay channel.
2+
3+
// Draw with Graphviz using: dot -Tsvg <name>.gv -o <name>.svg
4+
5+
digraph hf {
6+
label="PWG-HF analysis framework"
7+
labelloc=t
8+
overlap=false
9+
splines=true
10+
sep=0.1
11+
fontname=Helvetica
12+
fontsize=30
13+
//rankdir=LR // left to right
14+
//ranksep=1.
15+
ratio=2
16+
node [style="filled,rounded",fillcolor=white,shape=box,fontname=Helvetica,fontsize=30]
17+
18+
subgraph tables_aod {
19+
label="tables_aod"
20+
node [fillcolor=lemonchiffon,style=filled]
21+
tables_aod_legend [label="AOD\ntable"]
22+
Collisions [label="collisions"]
23+
McCollisions [label="MC collisions"]
24+
BCs [label="bunch\ncrossings"]
25+
Tracks [label="tracks"]
26+
McTrackLabels [label="MC track\nlabels"]
27+
McParticles [label="MC particles"]
28+
}
29+
30+
subgraph tables_derived {
31+
label="tables_derived"
32+
node [fillcolor=lightgrey,style=filled]
33+
tables_derived_legend [label="derived\ntable"]
34+
HfTrackSel [label="track\nflags"]
35+
EvSels [label="trigger\nflags"]
36+
HfCollSel [label="collision\nflags"]
37+
join_collisions [label="flagged\ncollisions"]
38+
{Collisions HfCollSel} -> join_collisions
39+
HfTracks [label="flagged\ntracks"]
40+
{HfTrackSel Tracks} -> HfTracks
41+
TrackPids [label="track\nPID"]
42+
{Tracks TrackPids} -> TracksWPid
43+
{Tracks McTrackLabels} -> TracksWMc
44+
HfTrackIndexProngN [label="track index\npairs/triplets"]
45+
HfCand [label="reconstructed\ncandidates"]
46+
HfCandMcRec [label="MC rec.\nflags"]
47+
HfPartMcGen [label="MC gen.\nflags"]
48+
HfCandSel [label="candidate\nflags"]
49+
join_cand_real [label="filtered\ncandidates"]
50+
{HfCand HfCandSel} -> join_cand_real
51+
join_cand_mc_rec [label="MC-flagged\nfiltered\ncandidates"]
52+
{HfCand HfCandSel HfCandMcRec} -> join_cand_mc_rec
53+
join_part_mc_gen [label="flagged\nMC particles"]
54+
{McParticles HfPartMcGen} -> join_part_mc_gen
55+
HfCandTree [label="HF\ncandidates"]
56+
HfCollTree [label="HF\nevents"]
57+
HfPartTree [label="HF\nparticles"]
58+
HfDerivedTable [label="derived\nHF tables"]
59+
}
60+
61+
subgraph output {
62+
label="output"
63+
node [fillcolor=lightblue]
64+
output_legend [label="output"]
65+
histograms
66+
trees
67+
}
68+
69+
subgraph code {
70+
label="code"
71+
node [fillcolor=springgreen]
72+
code_legend [label="processing"]
73+
74+
// PID
75+
PidTask [label="PID"]
76+
{Collisions Tracks} -> PidTask -> TrackPids
77+
78+
// event selection
79+
EventSelectionTask [label="event\nselection"]
80+
{Collisions BCs Tracks} -> EventSelectionTask -> EvSels
81+
HfTagSelCollisions [label="event\nselector"]
82+
{Collisions EvSels} -> HfTagSelCollisions -> HfCollSel
83+
84+
// track selection
85+
HfTagSelTracks [label="track\nselector"]
86+
{Tracks Collisions} -> HfTagSelTracks -> HfTrackSel
87+
88+
// index skimming
89+
HfTrackIndexSkimsCreator [label="track index\nskim creator"]
90+
{HfTracks BCs join_collisions} -> HfTrackIndexSkimsCreator -> HfTrackIndexProngN
91+
92+
// candidate creator
93+
HfCandidateCreator [label="candidate\ncreator"]
94+
{Collisions HfTrackIndexProngN Tracks} -> HfCandidateCreator -> HfCand
95+
96+
// candidate creator MC
97+
HfCandidateCreatorMc [label="MC matching"]
98+
{HfCand TracksWMc McParticles} -> HfCandidateCreatorMc -> {HfCandMcRec HfPartMcGen}
99+
100+
// candidate selector
101+
HfCandidateSelector [label="candidate\nselector"]
102+
{HfCand TracksWPid} -> HfCandidateSelector -> HfCandSel
103+
104+
// analysis task
105+
TaskData [label="process data"]
106+
{Collisions join_cand_real} -> TaskData -> histograms
107+
108+
// analysis task MC
109+
TaskMc [label="process MC"]
110+
{McCollisions TracksWMc join_cand_mc_rec join_part_mc_gen} -> TaskMc -> histograms
111+
112+
// tree creator
113+
{Collisions McCollisions TracksWPid join_cand_real join_cand_mc_rec join_part_mc_gen} -> HfTreeCreator -> {HfCandTree HfCollTree HfPartTree} -> trees
114+
HfTreeCreator [label="tree creator"]
115+
116+
// derived-data creator
117+
{Collisions McCollisions TracksWPid join_cand_real join_cand_mc_rec join_part_mc_gen} -> DerivedDataCreator -> HfDerivedTable
118+
DerivedDataCreator [label="derived-data creator"]
119+
}
120+
121+
subgraph cluster_skim {
122+
label="track index skimming"
123+
color=papayawhip //peachpuff //powderblue
124+
style="filled,rounded"
125+
HfTagSelTracks
126+
HfTagSelCollisions
127+
HfTrackSel
128+
HfCollSel
129+
HfTracks
130+
join_collisions
131+
HfTrackIndexSkimsCreator
132+
HfTrackIndexProngN
133+
}
134+
135+
subgraph cluster_cand {
136+
label="candidate reconstruction\nand MC matching"
137+
color=papayawhip //peachpuff //powderblue
138+
style="filled,rounded"
139+
HfCandidateCreator
140+
HfCandidateCreatorMc
141+
HfCand
142+
HfCandMcRec
143+
HfPartMcGen
144+
}
145+
146+
subgraph cluster_selector {
147+
label="candidate\nfiltering"
148+
color=papayawhip //peachpuff //powderblue
149+
style="filled,rounded"
150+
HfCandidateSelector
151+
HfCandSel
152+
}
153+
154+
subgraph cluster_task {
155+
label="analysis"
156+
color=papayawhip //peachpuff //powderblue
157+
style="filled,rounded"
158+
TaskData
159+
TaskMc
160+
histograms
161+
}
162+
163+
subgraph cluster_tree {
164+
label="table export"
165+
color=papayawhip //peachpuff //powderblue
166+
style="filled,rounded"
167+
HfTreeCreator
168+
HfCandTree
169+
HfCollTree
170+
HfPartTree
171+
trees
172+
}
173+
174+
subgraph cluster_derived {
175+
label="derived data"
176+
color=papayawhip //peachpuff //powderblue
177+
style="filled,rounded"
178+
DerivedDataCreator
179+
HfCandTree
180+
HfCollTree
181+
HfPartTree
182+
HfDerivedTable
183+
}
184+
185+
subgraph cluster_legend {
186+
label="legend"
187+
color=black
188+
style=rounded
189+
tables_aod_legend -> code_legend -> tables_derived_legend -> output_legend
190+
tables_aod_legend -> tables_derived_legend
191+
code_legend -> output_legend
192+
}
193+
194+
}

docs/images/graph_o2_hf_simple.png

767 KB
Loading

0 commit comments

Comments
 (0)