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
* Generator for TPC Loopers based on pre-trained ONNX models.
71
+
* Currently it generates loopers as electron-positron pairs and Compton electrons
72
+
* according to specified distributions and parameters.
73
+
* This can be extended to other types of background processes in the future (e.g. slow neutron spallation products, saturation tail).
74
+
* Multiple configuration options are available:
75
+
* - Flat gas: loopers are generated uniformly per event taking a reference value which can be either the LHC orbit time or the average interaction time record interval from the collision context.
76
+
* ==> Current automatic setup (default) sets the interaction rate automatically from the collision context and the reference value per orbit is calculated from an external file.
77
+
* ==> Number of loopers per orbit can be adjusted via a specific parameter.
78
+
* - Poisson + Gaussian sampling: number of loopers are sampled from Poissonian (for pairs) and Gaussian (for Compton electrons) distributions based on provided parameters.
79
+
* ==> flat gas must be disabled to use this option.
80
+
* - Fixed number of loopers per event
81
+
* ==> flat gas must be disabled to use this option and Poissonian/Gaussian parameters file should be set to None
bool loopersVeto = false; // if true, no loopers are generated
32
+
// Current files are set to custom user CCDB paths, TO BE CHANGED
33
+
std::string model_pairs = "ccdb://Users/m/mgiacalo/WGAN_ExtGenPair"; // ONNX model for e+e- pair production
34
+
std::string model_compton = "ccdb://Users/m/mgiacalo/WGAN_ExtGenCompton"; // ONNX model for Compton scattering
35
+
std::string poisson = "${O2_ROOT}/share/Generators/TPCLoopers/poisson_params.csv"; // file with Poissonian parameters
36
+
std::string gauss = "${O2_ROOT}/share/Generators/TPCLoopers/gaussian_params.csv"; // file with Gaussian parameters
37
+
std::string scaler_pair = "${O2_ROOT}/share/Generators/TPCLoopers/ScalerPairParams.json"; // file with scaler parameters for e+e- pair production
38
+
std::string scaler_compton = "${O2_ROOT}/share/Generators/TPCLoopers/ScalerComptonParams.json"; // file with scaler parameters for Compton scattering
39
+
std::string nclxrate = "ccdb://Users/m/mgiacalo/ClustersTrackRatio"; // file with clusters/rate information per orbit
40
+
std::string colsys = "PbPb"; // collision system (PbPb or pp)
41
+
int intrate = -1; // Automatic IR from collision context if -1, else user-defined interaction rate in Hz
42
+
bool flat_gas = true; // if true, the gas density is considered flat in the TPC volume
43
+
unsignedint nFlatGasLoopers = 500; // number of loopers to be generated per event in case of flat gas [currently unused, kept for possible future debug developments]
44
+
float fraction_pairs = 0.08; // fraction of loopers [currently unused, kept for possible future debug developments]
45
+
float multiplier[2] = {1., 1.}; // multiplier for pairs and compton loopers for Poissonian and Gaussian sampling
46
+
unsignedint fixedNLoopers[2] = {1, 1}; // fixed number of loopers coming from pairs and compton electrons - valid if flat gas is false and both Poisson and Gaussian params files are empty
47
+
float adjust_flatgas = 0.f; // adjustment for the number of flat gas loopers per orbit (in percentage, e.g. -0.1 = -10%) [-1, inf)]
This directory contains parameter files used by the TPC Loopers event generator in ALICE O2.
4
+
5
+
## Overview
6
+
7
+
The TPC Loopers generator uses pre-trained ONNX models to generate realistic looper particles based on machine learning models trained on full GEANT4 slow neutron transport simulations. The parameter files in this directory provide:
8
+
- Example statistical distribution parameters for sampling the number of loopers per event
9
+
-**Mandatory** scaling parameters for transforming the ONNX model outputs to physical values
10
+
11
+
## Files Description
12
+
13
+
### Statistical Sampling Parameters
14
+
15
+
The files provided in the folder are examples based on the training dataset.
16
+
17
+
#### `gaussian_params.csv`
18
+
Parameters for Gaussian distribution used to sample the number of Compton electrons per event.
19
+
20
+
**Format:** Four values (one per line)
21
+
1. Mean (μ)
22
+
2. Standard deviation (σ)
23
+
3. Minimum value
24
+
4. Maximum value
25
+
26
+
#### `poisson_params.csv`
27
+
Parameters for Poisson distribution used to sample the number of electron-positron pairs per event.
28
+
29
+
**Format:** Three values (one per line)
30
+
1. Lambda (λ) parameter
31
+
2. Minimum value
32
+
3. Maximum value
33
+
34
+
### Scaler Parameters
35
+
36
+
These JSON files contain the parameters for inverse transformation of the ONNX models output. They should be kept as they are
37
+
unless a new version of the models is released.
38
+
39
+
#### `ScalerComptonParams.json`
40
+
Scaler parameters for Compton electron generation model.
41
+
42
+
**Structure:**
43
+
```json
44
+
{
45
+
"normal": {
46
+
"min": [array of 5 min values for min-max normalization],
47
+
"max": [array of 5 max values for min-max normalization]
48
+
},
49
+
"outlier": {
50
+
"center": [array of 2 center values for robust scaling],
51
+
"scale": [array of 2 scale values for robust scaling]
52
+
}
53
+
}
54
+
```
55
+
56
+
-**normal**: Min-max normalization parameters for standard features (`Px`, `Py`, `Pz`, `VertexCoordinatesX`, `VertexCoordinatesY`)
57
+
-**outlier**: Robust scaler parameters (center and scale) for outlier features (`VertexCoordinatesZ`,`time`)
58
+
59
+
#### `ScalerPairParams.json`
60
+
Scaler parameters for electron-positron pair generation model.
61
+
62
+
**Structure:**
63
+
```json
64
+
{
65
+
"normal": {
66
+
"min": [array of 8 min values for min-max normalization],
67
+
"max": [array of 8 max values for min-max normalization]
68
+
},
69
+
"outlier": {
70
+
"center": [array of 2 center values for robust scaling],
71
+
"scale": [array of 2 scale values for robust scaling]
72
+
}
73
+
}
74
+
```
75
+
76
+
-**normal**: Min-max normalization parameters for standard features (`Px_e`, `Py_e`, `Pz_e`,`Px_p`, `Py_p`, `Pz_p`, `VertexCoordinatesX`, `VertexCoordinatesY`)
77
+
-**outlier**: Robust scaler parameters (center and scale) for outlier features (`VertexCoordinatesZ`,`time`)
0 commit comments