Skip to content

Commit a10ffae

Browse files
committed
MegaLinter fixes
1 parent 28448e3 commit a10ffae

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

PWGCF/Tutorial/README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This tutorial is made and tested for pilot-beam data (reconstruction pass4). You
3030
<!-- markdown-link-check-disable-next-line -->
3131
A lot of Run 2 data converted into the Run 3 format can be found [here](https://alimonitor.cern.ch/trains/train.jsp?train_id=132). A detailed description of how to download converted Run 2 data is reported in the [offifial documentation](https://aliceo2group.github.io/analysis-framework/docs/download/)
3232

33-
In summary, to download a bunch of data, do the following: <br>
33+
In summary, to download a bunch of data, do the following: <br>
3434
1. scroll all the way down, choose the train number you are interested in and click on run number. <br>
3535
2. A pop-up window appears: click on the **Test Results**. <br>
3636
3. Scroll down, find the **Full Train** option and then click on **output**. <br>
@@ -44,7 +44,7 @@ ____________________________
4444
____________________________
4545
# Create your task in O2Physics
4646

47-
There are many examples of simple introductory tasks in O2Physics that can be found in `O2Physics/Tutorials`.
47+
There are many examples of simple introductory tasks in O2Physics that can be found in `O2Physics/Tutorials`.
4848
All the information about how to write a task can be found in the [official documentation](https://aliceo2group.github.io/analysis-framework/docs/tutorials/).
4949

5050
We hope that this hands-on tutorial will help you learning to write your analysis tasks starting from scratch.
@@ -58,7 +58,7 @@ In addition, the task can also have an `init` funcion, which is used to initiali
5858

5959
In the same source file where the `struct` is defined, one has to add a `defineDataProcessing` method, which is necessary to include the task to the workflow, assigning it a specific name.
6060

61-
The task must be added to the `CMakeLists.txt` file in the same directory. For our tutorial, the first task has name `cf-tutorial-0` and it is defined in the source file `CFTutorialTask0.cxx`. The corresponfing lines in the `CMakeLists.txt` file are:
61+
The task must be added to the `CMakeLists.txt` file in the same directory. For our tutorial, the first task has name `cf-tutorial-0` and it is defined in the source file `CFTutorialTask0.cxx`. The corresponfing lines in the `CMakeLists.txt` file are:
6262

6363
```
6464
o2physics_add_dpl_workflow(cf-tutorial-0
@@ -87,7 +87,7 @@ Go to `~/alice/sw/BUILD/O2Physics-latest-master/O2Physics`.
8787
</details>
8888

8989
In `~/alice/sw/BUILD/O2Physics-latest-master/O2Physics` enter ninja and O2Physics environment (`alienv load ninja/latest O2Physics/latest`). Then build your task using `ninja stage/bin/<your-analysis-file>`. If you don't know what you should type in `<your-analysis-file>` place, open `CMakeList.txt` and see how your analysis is called there. <br>
90-
Keep in mind that if you add a new file or modify CMakeList you need to use `cmake .`
90+
Keep in mind that if you add a new file or modify CMakeList you need to use `cmake .`
9191
Then, after building part, copy this builded file to directory with AOD file (`cp stage/bin/<your-analysis-file>`). You can skip this step (copying) when you use `ninja install` instead of `ninja` or you can use alibuild.
9292
____________________
9393
## How to run your code?
@@ -119,17 +119,17 @@ o2-analysis-mytask --configuration json://<config_file_name>
119119
```
120120
In the following, we will use configuration files.
121121

122-
### Possible errors
122+
### Possible errors
123123
<details><summary>Couldn't get TTree.</summary>
124124
<p>
125125

126-
Sometimes you may get an error, for example:
126+
Sometimes you may get an error, for example:
127127
```c
128128
[ERROR] Exception caught: Couldn't get TTree "DF_2853960297589372650/O2v0dataext from <your AOD file>"
129129
```
130130
It means that `v0dataext` couldn't be found in your AOD file or it has not been produced by any attached helper task.
131131
So now you know which table is missing. There are two paths you can choose; <br>
132-
1. **EASIEST**: follow the instructions reported in [ ALICE O2 documentation- Tree not found ](https://aliceo2group.github.io/analysis-framework/docs/troubleshooting/treenotfound.html). After entering [ALICE O2 documentation - helper task tables](https://aliceo2group.github.io/analysis-framework/docs/datamodel/helperTaskTables.html), you search the table that you are missing and you will find the task you need to attach as dependency.<br>
132+
1. **EASIEST**: follow the instructions reported in [ALICE O2 documentation- Tree not found](https://aliceo2group.github.io/analysis-framework/docs/troubleshooting/treenotfound.html). After entering [ALICE O2 documentation - helper task tables](https://aliceo2group.github.io/analysis-framework/docs/datamodel/helperTaskTables.html), you search the table that you are missing and you will find the task you need to attach as dependency.<br>
133133
2. More difficult: enter directory `alice/O2Physics` and look for the missing table. </br>
134134
For example, if you are missing `pidtofka` table, you should type:
135135
```c
@@ -145,15 +145,15 @@ o2physics_add_dpl_workflow(<task-name>
145145
COMPONENT_NAME Analysis)
146146
```
147147
So you need to find the **task-name** which will correspond to the **C++ file** you've found using grep ;) <br>
148-
149-
148+
149+
150150
</p>
151151
</details>
152152
<details><summary>Fatal errors with non-existing CCDB entries.</summary>
153153
<p>
154154
While trying to run various O2 tasks/tutorials, you can run into fatal errors with non-existing CCDB entries for specific data. <br>
155155
The reason is often the incorrect configuration of the paramenters. For example, for some executables such as `o2-analysis-timestamp` duging the option `--isRun2MC` could solve the problem. Or, simialary, using the oprion `--isMC` for o2-analysis-event-selection. <br>
156-
For example:
156+
For example:
157157
158158
```c
159159
o2-analysis-mm-dndeta --aod-file AODmc2.root --aod-memory-rate-limit 100000000000000 -b | \
@@ -178,7 +178,7 @@ _____________________________
178178
# Tutorial checkpoints
179179
## First task
180180
We will be using [CFTutorialTask0.cxx](https://github.com/CF-tutorials/O2Physics/blob/tutorial/PWGCF/Tutorial/CFTutorialTask0.cxx). It's an example task illustrating how to create histograms and fill them with basic information. We will also apply basic event selection.<br>
181-
181+
182182
Here you can see a structure of a typical analysis task in the O2:<br>
183183
```c
184184
struct myTask{
@@ -197,7 +197,7 @@ _____________________________
197197
```
198198
Each part will be described in greater detail further on during this tutorial.<br>
199199
200-
The first element of the task is `init` (equivalent to *UserCreateOutputObjects* in *AliPhysics*). It looks like this:
200+
The first element of the task is `init` (equivalent to _UserCreateOutputObjects_ in _AliPhysics_). It looks like this:
201201
202202
```c
203203
void init(o2::framework::InitContext&)
@@ -218,7 +218,7 @@ The first element of the task is `init` (equivalent to *UserCreateOutputObjects*
218218
```
219219
`init` is used to initialise objects, e.g. histograms, which will be used later in the process.
220220

221-
The second element is `process`, equivalent to the *UserExec* in *AliPhysics*. It looks like this:
221+
The second element is `process`, equivalent to the _UserExec_ in _AliPhysics_. It looks like this:
222222

223223
```c
224224
void process(aod::Collision const& coll, aod::Tracks const& inputTracks)
@@ -237,7 +237,7 @@ The second element is `process`, equivalent to the *UserExec* in *AliPhysics*. I
237237
}
238238
```
239239
240-
The arguments of `process` are the data *tables* that we analyse, i.e. the tables to which we *subscribe*. In the snippet above, the subscripion is to the tables of collisions and tracks.
240+
The arguments of `process` are the data _tables_ that we analyse, i.e. the tables to which we _subscribe_. In the snippet above, the subscripion is to the tables of collisions and tracks.
241241
242242
Finally, `WorkflowSpec` is necessay to add the task to the DPL workflow . And it looks like:
243243
@@ -253,7 +253,7 @@ Finally, `WorkflowSpec` is necessay to add the task to the DPL workflow . And it
253253
## Second task
254254

255255
We will be using [CFTutorialTask1.cxx](https://github.com/CF-tutorials/O2Physics/blob/tutorial/PWGCF/Tutorial/CFTutorialTask1.cxx). In this part of the tutorial, we will focus on how to access information from different tables. Sets of information stored in different tables can be put together using `Join`:
256-
256+
257257
```c
258258
namespace o2::aod
259259
{
@@ -264,7 +264,7 @@ using MyTracks = soa::Join<aod::FullTracks,
264264
aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi,
265265
aod::pidTPCKa, aod::pidTPCPr, aod::pidTPCDe>;
266266
} // namespace o2::aod
267-
```
267+
```
268268
The data model provides some predifined joins, suche as `FullTracks = soa::Join<Tracks, TracksExtra>`. The complete list of predefined joins can be found in [ALICE O2 documentation - The Data Model, Joins and iterators](https://aliceo2group.github.io/analysis-framework/docs/datamodel/joinsAndIterators.html).
269269

270270
Joined tables can be normally used as agruments of process.
@@ -297,7 +297,7 @@ Note that configurables can be used in the definition of a filters.
297297

298298
We will be using [CFTutorialTask3.cxx](https://github.com/CF-tutorials/O2Physics/blob/tutorial/PWGCF/Tutorial/CFTutorialTask3.cxx). In this part of the tutorial, we will focus on how to create and use **partitions**.<br>
299299

300-
A `Partition` is a subset of a given table that satisfies particular requirements. In the following, a partition obtained from the table *Tracks*:
300+
A `Partition` is a subset of a given table that satisfies particular requirements. In the following, a partition obtained from the table _Tracks_:
301301

302302
```c
303303
Partition<o2::aod::Tracks> positive = (nabs(aod::track::eta) < ConfEtaCut) && (aod::track::pt > ConfMinPtCut) && (aod::track::pt < ConfMaxPtCut) && (aod::track::signed1Pt > ConfChargeCut);
@@ -320,12 +320,12 @@ void process(MyFilteredCollision const& coll, o2::aod::Tracks const& tracks)
320320
...
321321
}
322322
```
323-
**WARNING**: using a `Partition` of the table `Tracks`, you are considering **ALL** the tracks (which satisfy the requirements) of **ALL** the collisions. In order to select the elements corresponding to the relevant collision, one must use `sliceByCached`, as shown in the example above.
323+
**WARNING**: using a `Partition` of the table `Tracks`, you are considering **ALL** the tracks (which satisfy the requirements) of **ALL** the collisions. In order to select the elements corresponding to the relevant collision, one must use `sliceByCached`, as shown in the example above.
324324
325325
</p>
326326
</details>
327327
328-
## Fifth task
328+
## Fifth task
329329
330330
We will be using [CFTutorialTask4.cxx](https://github.com/CF-tutorials/O2Physics/blob/tutorial/PWGCF/Tutorial/CFTutorialTask4.cxx). In this part of the tutorial, we will focus on how to use and combine elements of different **partitions**. In the following, you can see the invariant mass of two pions, a negative one and a positive one, belonging to two different partitions.
331331
@@ -347,7 +347,7 @@ for (auto& [pos, neg] : combinations(soa::CombinationsFullIndexPolicy(groupPosit
347347
sumVec += negVec;
348348
histos.fill(HIST("hInvariantMass"), sumVec.M());
349349
}
350-
```
350+
```
351351

352352

353353
## Sixth task
@@ -367,6 +367,6 @@ PROCESS_SWITCH(<name-of-your-structure>, processSameEvent, "Enable processing sa
367367

368368
void processMixed(){}
369369
PROCESS_SWITCH(<name-of-your-structure>, processMixed, "Enable processing mixed event", true);
370-
```
370+
```
371371

372372
The process functions can be activated using `PROCESS_SWITCH`, setting the last parameter as `true`. This parameter can be configured via command line, json file or in the hyperloop interface.

0 commit comments

Comments
 (0)