O2 simulation: how to start?

Could anyone guide me to some tutorial or beginner’s guide for how to do O2 simulation?
I succeeded to build (aliBuild) and “alienv enter O2/latest” is fine.
From this point I don’t know what to do. The tutorial https://alice-doc.github.io/alice-analysis-tutorial/analysis/running.html is for AliPhysics and aliRoot, not O2.

What I need to do is the following:

1: Run O2 simulation (Geant4 is fine) with ALICE detector and electronics structure
2: Develop/modify TPC digit (data stream) generation part, especially
2a: Logic such as digital filters in the CRU TPC userlogic (VHDL) has to be implemented as C++ code in O2
2b: Evaluate performance of different kind of filters with simulated SAMPA data

Any suggestion, pointer are welcome!


1 Like

I am pinging our simulation expert @swenzel here :slight_smile:

To run a simulation using the TPC detector with 10 pythia events you simply say

o2sim -m TPC [ ITS PIPE ] -n 10 -g pythia -e TGeant4

The hits will be accessible in the o2sim.root file.

Concerning question on digits, eletronic structures, etc. I suggest you contact the TPC team in charge
(@wichula, @a-mathis … but I am not sure if everyone is reachable in alice-talk yet??)

To digitise the hits produced above just run

digitizer-workflow -b --tpc-lanes=2 --simFileS o2sim.root -n 10

which gives you an output file with branches with digits (sorted by time bin and pad) per sector

I think there’s a typo, the generator for o2sim should be

o2sim ... -g pythia8

At least for me pythia does not work

Thanks for your help!

o2sim ran without problem. For 10 Pythia events it took 1-2 minutes.

digitizer-workflow doesn’t really work. It fist didn’t accept option
–tpc-lanes=2 however without that option it launches.
Then it stops forever after showing
[6063]: [06:33:32][STATE] Entering INITIALIZING DEVICE state
. There are many processes that appears on ‘top’ command like
digitizer-workflow --id TPCDigitizer6 – …
And memory (32GB) is used up and CPU is 100% busy for hours.

I simulated 10 events. It is hard to imagine what uses that large memory
and CPU power for digitization.

For me the commands work flawless, when did you update your o2 installation the last time?
Some of the features are rather freshly implemented by Sandro, hence I suggest to update your alidist and o2

--tpc-lanes=2 should work (note that there are are two dashes in front of tpc). With this you should not run into memory problems. Also please make sure to use the latest version of alidist and the code.


digitizer-workflow -b --tpc-lanes=2 --simFileS o2sim.root -n 10
Error: unrecognised option ‘–tpc-lanes=2’

I’m using O2/latest but my last update was 3-4 weeks before. I will try again with fresh one
then report.

A post was split to a new topic: Difference between o2-sim and o2-sim-serial