Skip to content

Commit

Permalink
Event pools usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jackal1-66 committed Nov 6, 2024
1 parent 37461d3 commit 4b2a35b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/generators/generatorso2.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ This reads primaries to be transported from an MC kinematics file. Such a file i
```bash
o2-sim -g extkinO2 --extKinFile <path/to/o2sim_Kine.root>
```
Alien paths are compatible as well, provided they follow the syntax `alien:///path/to/file.root`. They will be opened on-the-fly, without the need to download them locally, however you might experience longer simulation times due to the remote source.

### hepmc

Expand Down
25 changes: 25 additions & 0 deletions docs/o2dpgworkflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ Simulations run from a workflow are done in units of timeframes and the number o

By default, the workflow description is written to `workflow.json`.

### Event pools

The flag `--make-evtpool` can be used to generate a workflow for event pools creation.
```bash
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -gen <generator> -eCM <emc energy [GeV]> -tf <nTFs> --ns <nEvents> --make-evtpool
```
This will skip all the steps after signal generation (no transport), forcing the beam-spot vertex to kNoVertex and including a final step called `poolmerge` which will be used for merging all the Kine.root files generated for the `nTFs` timeframes in a `evtpool.root` file.

### Embedding

The workflow can also be created for a simulation where signal type events are embedded into a certain type of background events. To enable this feature, pass the flag `--embedding`. For the background events there are the following arguments
Expand All @@ -73,6 +81,23 @@ The runner tries to execute as many tasks in parallel as possible. So while in t

Often what you might want to do is running the full chain to obtain final `AO2D.root`. To achieve this and to not run tasks that are not needed, pass `-tt aod`.

### Event pools usage

Some guidelines must be followed when using event pools, in particular when creating an event cache the workflow runner must be set to reach the poolmerge step, such as:
```bash
${O2DPG_ROOT}/MC/bin/o2dpg_workflow_runner.py -f workflow.json -tt pool
```
Instead, when feeding the pool to an O2DPG workflow (using `extkinO2` as generator) the user must be aware that by default the events will be randomised (with the same seed used in each timeframe), while phi randomisation is not active.
An example on how to run a workflow including the phi angle random rotation would look like this:
```bash
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM <emc energy [GeV]> -gen extkinO2 -tf <nTFs> --ns <nEvents>
-confKey "GeneratorFromO2Kine.randomphi=true;GeneratorFromO2Kine.fileName=/path/to/file/filename.root"
-gen extkinO2 -interactionRate 500000
# Followed by
${O2DPG_ROOT}/MC/bin/o2dpg_workflow_runner.py -f workflow.json -tt aod
```
If the randomisation of events needs to be removed, the user can do it by editing manually the JSON file. A full example on event pools is provided in the [${O2DPG_ROOT}/MC/run/examples/event_pool.sh](https://github.com/AliceO2Group/O2DPG/blob/master/MC/run/examples/event_pool.sh) script (call the `--help` flag or check the source for usage information).

### About finished tasks

Once a task is done, it will never be repeated unless you delete the `<task_name>_log_done` in the directory. Remove that file and run again.
Expand Down
2 changes: 1 addition & 1 deletion docs/o2dpgworkflow/anchored.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sort: 2
sort: 1
title: Anchored MC
---

Expand Down
2 changes: 1 addition & 1 deletion docs/o2dpgworkflow/ccdb.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sort: 3
sort: 2
title: CCDB
---

Expand Down

0 comments on commit 4b2a35b

Please sign in to comment.