You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Tutorials/PWGHF/README.md
+25-18Lines changed: 25 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,44 +4,49 @@
4
4
5
5
Welcome to the heavy-flavour analysis tutorial!
6
6
7
-
This directory contains the code and configuration for running a minimalistic version of the D<sup>0</sup> analysis on Run 3 real data.
7
+
This directory contains the code and configuration for running a minimalistic version of the D<sup>0</sup> analysis on Run 3 data.
8
8
9
9
See the [official PWG-HF O<sup>2</sup> documentation](https://aliceo2group.github.io/analysis-framework/docs/advanced-specifics/pwghf.html) for the overview of the full heavy-flavour analysis framework.
10
10
11
11
## Setup
12
12
13
-
1. Create a dedicated working directory on your device.
14
-
This is the directory, where you will put your input files, run the code and produce the output files, so it is a good idea to have it outside the O2Physics repository.
15
-
2. Put the input file(s) `AO2D.root` (and `AnalysisResults_trees.root`) in the working directory.
16
-
3. Load the O2Physics environment.
13
+
1. Create and enter a dedicated working directory on your device.
14
+
This is the directory, where you will put your input files, run the code, and produce the output files, so it is a good idea to have it outside the O2Physics repository.
15
+
1. Put the input file(s) `AO2D.root` (and `AnalysisResults_trees.root`) in the working directory (or in a dedicated directory for input data).
16
+
1. Copy the [`input_skim.txt`](input_skim.txt) and [`input_task.txt`](input_task.txt) files into the working directory and adjust the paths inside if needed.
17
+
1. Load the O2Physics environment.
17
18
18
19
## Skim production
19
20
20
-
The file `AnalysisResults_trees.root` contains a derived table with track index skims of 2-prong decay candidates.
21
-
This table contains paired track indices which point to the track table in the parent `AO2D.root` file.
22
-
It is produced from the `AO2D.root` file by a dedicated workflow `o2-analysistutorial-hf-skim-creator-mini` (implemented in [`skimCreatorMini.cxx`](skimCreatorMini.cxx)).
21
+
The mini skim creator workflow `o2-analysistutorial-hf-skim-creator-mini` (implemented in [`skimCreatorMini.cxx`](skimCreatorMini.cxx)) is a simplified version of the `o2-analysis-hf-track-index-skim-creator` workflow (implemented in [`trackIndexSkimCreator.cxx`](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/TableProducer/trackIndexSkimCreator.cxx)) which is used for the central production of linked derived data for all HF analyses and which performs:
23
22
24
-
If you need to produce these derived skims, you can do that by executing the [`run_skim.sh`](run_skim.sh) bash script in the working directory:
23
+
- the HF event selection,
24
+
- the HF secondary-track selection,
25
+
- the HF secondary-vertex reconstruction and loose selection of found HF decay candidates.
26
+
27
+
The mini skim creator processes the `AO2D.root` file(s) and produces a derived table [`HfT2Prongs`](DataModelMini.h) with track index skims of 2-prong decay candidates.
28
+
This table contains paired track indices which point to tracks in the track table in the parent `AO2D.root` file.
29
+
30
+
These derived skims are produced by executing the [`run_skim.sh`](run_skim.sh) bash script in the working directory:
It will use the configuration from [`dpl-config_skim.json`](dpl-config_skim.json).
36
+
It will use the configuration from [`dpl-config_skim.json`](dpl-config_skim.json) and produce the `AnalysisResults_trees.root` file with the derived table and the `AnalysisResults.root` file with control histograms in the working directory.
31
37
32
38
## Mini task
33
39
34
40
The mini task workflow `o2-analysistutorial-hf-task-mini` (implemented in [`taskMini.cxx`](taskMini.cxx)) is a simplified version of the D<sup>0</sup> analysis chain part which includes:
35
41
36
-
- the 2-prong candidate creator,
37
-
- the D<sup>0</sup> candidate selector,
38
-
- the D<sup>0</sup> analysis task.
42
+
- the 2-prong candidate creator (for the full candidate reconstruction),
43
+
- the D<sup>0</sup> candidate selector (for the candidate selection),
44
+
- the D<sup>0</sup> analysis task (for the analysis of selected candidates and filling of output histograms).
39
45
40
46
The first step (candidate creator) consumes the track index skim table and therefore needs the derived `AnalysisResults_trees.root` file as input.
41
47
42
48
Processing the derived file requires access to the parent `AO2D.root` file.
43
-
The absolute path to the parent file is stored in the derived file but it can be overridden with the parameter `aod-parent-base-path-replacement` in the JSON configuration,
44
-
where one has to provide a replacement mask in the format `"old-path-to-parent;new-path-to-parent"`.
49
+
The absolute path to the parent file is stored in the derived file but it can be overridden with the command line parameter `--aod-parent-base-path-replacement "old-path-to-parent;new-path-to-parent"`.
45
50
(If the parent and the derived files are both in the same directory, `new-path-to-parent` can be empty.)
46
51
47
52
Run the mini task by executing the [`run_task.sh`](run_task.sh) bash script in the working directory:
It will use the configuration from [`dpl-config_task.json`](dpl-config_task.json) and produce the output file `AnalysisResults.root` with histograms in the working directory.
54
59
55
-
###Exercise tips
60
+
## Exercise tips
56
61
57
62
Organise your working environment so that you can easily switch between running the code in the working directory and modifying the code in the O2Physics repository.
58
63
@@ -61,6 +66,8 @@ If an error occurs, the script will report the non-zero exit code and ask you to
61
66
62
67
The full O<sup>2</sup> configuration is dumped at the end of processing into the `dpl-config.json` file in the working directory.
63
68
64
-
See the [rebuilding instructions](https://aliceo2group.github.io/analysis-framework/docs/gettingstarted/installing.html#building-partially-for-development-using-ninja) in the official O<sup>2</sup> analysis framework documentation for advice on compiling your code changes.
69
+
See the [rebuilding instructions](https://aliceo2group.github.io/analysis-framework/docs/gettingstarted/installing.html#building-partially-for-development-using-ninja) in the analysis framework documentation for advice on compiling your code changes.
70
+
71
+
See the [Troubleshooting](https://aliceo2group.github.io/analysis-framework/docs/troubleshooting/) section of the analysis framework documentation for debugging advice.
65
72
66
-
See the [Troubleshooting](https://aliceo2group.github.io/analysis-framework/docs/troubleshooting/) section of the official O<sup>2</sup> analysis framework documentation for debugging advice.
73
+
Consider using the [Shell rc utilities](https://aliceo2group.github.io/analysis-framework/docs/tools/#shell-rc-utilities) for easier recompilation and debugging.
0 commit comments