Skip to content

Commit cc5297b

Browse files
sevdokimshahor02
authored andcommitted
Update README.md
1 parent a8aaa90 commit cc5297b

1 file changed

Lines changed: 54 additions & 6 deletions

File tree

Detectors/CPV/README.md

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Triggered events are packed within each HeartBeatFrame. More info about data for
1616

1717
## Reconstruction
1818
The reconstruction is steered via [o2-cpv-reco-workflow](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/CPV/workflow/src/cpv-reco-workflow.cxx) executable.
19-
#### First,
20-
it starts directly on FLP. Raw data is provided to [RawToDigitConverter](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx)
19+
#### 1. Raw to digits
20+
It starts directly on FLP. Raw data is provided to [RawToDigitConverter](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx)
2121
which converts raw format to cpv [digits](https://github.com/AliceO2Group/AliceO2/blob/dev/DataFormats/Detectors/CPV/include/DataFormatsCPV/Digit.h) and [trigger records](https://github.com/AliceO2Group/AliceO2/blob/dev/DataFormats/Detectors/CPV/include/DataFormatsCPV/TriggerRecord.h).
2222
Digits are calibrated objects: RawToDigitConverter reads
2323
[pedestals](https://github.com/AliceO2Group/AliceO2/blob/dev/DataFormats/Detectors/CPV/include/DataFormatsCPV/Pedestals.h),
@@ -32,20 +32,68 @@ o2-cpv-reco-workflow --input-type raw --output-type digits --disable-mc --disabl
3232
If there is no need to calibrate digits, add `--pedestal` flag to `o2-cpv-reco-workflow` then digit signal will be equal to raw amplitude. Such mode is used for pedestal calibration (see below).
3333
If you want to redirect stream of digits to root file then remove `--disable-root-output`.
3434
If you want to process MC and you need digits to be labeled according to corresponding primary particles then remove `--disable-mc` flag.
35+
Raw decoding itself is done by [RawDecoder](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/CPV/reconstruction/include/CPVReconstruction/RawDecoder.h) class.
3536

36-
#### Second,
37-
output of previous command is stream of digits and triggers records. It's expected that the stream from FLP goes to EPNs where clusterization procedure is expected to run.
37+
#### 2. Digits to clusters
38+
Output of previous command is stream of digits and triggers records. It's expected that the stream from FLP goes to EPNs where clusterization procedure is expected to run.
3839
Clusterization is also steered by `o2-cpv-reco-workflow` executable. In order to run clusterization on digits, run
3940
```shell
4041
o2-cpv-reco-workflow --input-type digits --output-type clusters --disable-mc --disable-root-output
4142
```
42-
The output of the command is stream of [clusters](https://github.com/AliceO2Group/AliceO2/blob/dev/DataFormats/Detectors/CPV/include/DataFormatsCPV/Cluster.h) and corresponding trigger records.
43-
Then clusters are ready to be compressed to CTF and to be keeped on storage.
43+
The output of the command is stream of [clusters](https://github.com/AliceO2Group/AliceO2/blob/dev/DataFormats/Detectors/CPV/include/DataFormatsCPV/Cluster.h) and corresponding trigger records. Clusterization is done by [Clusterer](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/CPV/reconstruction/include/CPVReconstruction/Clusterer.h) class.
44+
45+
#### 3. Clusters to CTF
46+
Then clusters are ready to be compressed to Compressed Time Frame and to be kept at storage. Try to convert
47+
<!-- add here info how to run CTF creator -->
48+
4449

4550
## Simulation
51+
Simulation is organized as follows:
52+
#### 1. Creation of hits
53+
[Hits](https://github.com/AliceO2Group/AliceO2/blob/dev/DataFormats/Detectors/CPV/include/DataFormatsCPV/Hit.h) are objects which keep information about signals such as energy depositions created by single primary particles in detector channels. Hit creation is done by [Detector](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/CPV/simulation/include/CPVSimulation/Detector.h) class. To run hits creation type
54+
```shell
55+
o2-sim -n10 -g boxgen --configKeyValues 'BoxGun.pdg=11 ; BoxGun.prange[0]=10.; BoxGun.prange[1]=15.; BoxGun.phirange[0]=260; BoxGun.phirange[1]=280; BoxGun.number=50; BoxGun.eta[0]=-0.125 ; BoxGun.eta[1]=0.125; ' -m CPV
56+
```
57+
This command will generate 10 events (`-n 10` option) with uniform particle generator (`-g boxgen` option) which generates 50 electrons (`BoxGun.number=50; BoxGun.pdg=11`) with flat momentum distribution in range from 10 GeV/c to 15 GeV/c (`BoxGun.prange[0]=10.; BoxGun.prange[1]=15.;`), flat azimuthal angle phi distribution in range from 260 to 280 degrees (`BoxGun.phirange[0]=260; BoxGun.phirange[1]=280;`), flat pseudorapidity distribution in range from -0.125 to 0.125 units (`BoxGun.eta[0]=-0.125 ; BoxGun.eta[1]=0.125;`), and finally hist only for CPV are created (`-m CPV`). Result of this command is file o2sim_HitsCPV.root containing hits and some other important stuff.
58+
59+
#### 2. Hits to digits
60+
Hits from different primaries then needed to be merged and electronic noise to be added in order to obtain digits from hits. This can be done with [Digitizer](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/CPV/simulation/include/CPVSimulation/Digitizer.h) workflow. Run
61+
```shell
62+
o2-sim-digitizer-workflow --onlyDet CPV
63+
```
64+
in order to do so. It merges hits and adds electronic noise to merged signals. Electronic noise is simulated as 3 sigma pedestal jitter. As a result the file
65+
You can add `--configKeyValues 'CPVSimParams.mCCDBPath=localtest'` option in order to avoid connection to CCDB and use ideal pedestals (sigma = 1.5 ADC counts for all channels). You can also choose how much sigmas to use for noise simulation providing `--configKeyValues 'CPVSimParams.mZSnSigmas=X'` option, where X is floating point number.
66+
67+
#### 3. Digits to raw
68+
Digits can be converted to raw data format using [RawWriter](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/CPV/simulation/include/CPVSimulation/RawWriter.h) class. Try to run
69+
```shell
70+
o2-cpv-digi2raw -o raw/CPV
71+
```
72+
This command will read digits from cpvdigits.root by default and produce raw/CPV/ folder with config and raw files. Digits to raw conversion is done by [RawWriter](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/CPV/simulation/include/CPVSimulation/RawWriter.h) class. You can specify `--ccdb-url localtest` option in order to use dummy calibration. IMPORTANT is to use same CCDB path as you used at previous step i.e. hits to digits conversion. Input file also can be changed by providing `-i /path/to/file.root` option.
73+
74+
75+
Raw file is ready to be read as normal raw data file and be processed normally with full reconstruction chain like that:
76+
```shell
77+
o2-raw-file-reader-workflow --input-conf raw/CPV/CPVraw.cfg | o2-cpv-reco-workflow --input-type raw --output-type digits --disable-mc --disable-root-output | o2-cpv-reco-workflow --input-type digits --output-type clusters --disable-mc
78+
```
79+
4680

4781
## Calibration
4882

4983
## Quality Conrol
5084

5185
## Local testing
86+
#### Simulation
87+
```shell
88+
o2-sim -n10 -g boxgen --configKeyValues 'BoxGun.pdg=11 ; BoxGun.prange[0]=10.; BoxGun.prange[1]=15.; BoxGun.phirange[0]=260; BoxGun.phirange[1]=280; BoxGun.number=50; BoxGun.eta[0]=-0.125 ; BoxGun.eta[1]=0.125; ' -m CPV
89+
o2-sim-digitizer-workflow --onlyDet CPV #consider to add --configKeyValues 'CPVSimParams.mCCDBPath=localtest' to use ideal pedestals for noise simulation
90+
o2-cpv-digi2raw -o raw/CPV
91+
```
92+
#### Reconstruction
93+
```shell
94+
o2-raw-file-reader-workflow --input-conf raw/CPV/CPVraw.cfg | o2-cpv-reco-workflow --input-type raw --output-type digits --disable-mc --disable-root-output | o2-cpv-reco-workflow --input-type digits --output-type clusters --disable-mc
95+
```
96+
#### Pedestal calibration
97+
```shell
98+
o2-raw-file-reader-workflow --input-conf CPVraw.cfg | o2-cpv-reco-workflow --input-type raw --output-type digits --disable-mc --disable-root-output --pedestal | o2-calibration-cpv-calib-workflow --pedestals --max-delay 0 --tf-per-slot 100 | o2-calibration-ccdb-populator-workflow
99+
```

0 commit comments

Comments
 (0)