Framework for the PID calibration of the ALICE TPC in Run 3 and beyond
This framework perfroms the full calibration, from AO2D data taken from the ALICE asynchronous reconstructions to the calibrated Nsigma corrections. To run this framework:
- Go into the "run" folder
- Adjust the configurations in configuration.json and nnconfig.py (see below)
- Execute the framework: python3 run/run.py --config /path/to/configuration.json
Everythign is steered through the configuration.json. This file will be copied to the output folder and gets updated along the framework evaluation. These are some example settings:
{
"settings": {
"framework": "/lustre/alice/users/csonnab/TPC/o2-tpc-pid",
"git": {
"checkout": 0,
"create_diff": 1,
"remote": "https://github.com/ALICE-TPC-PID/tpcpid.git",
"branch": "main",
"commit": "latest",
"tag": "N/A"
}
},
"createTrainingDatasetOptions": {
"labels_x": [
"fTPCInnerParam",
"fTgl",
"fSigned1Pt",
"fMass",
"fNormMultTPC",
"fNormNClustersTPC",
"fFt0Occ"
],
"labels_y": [
"fTPCSignal",
"fInvDeDxExpTPC"
],
"samplesize": "10000000",
"sigmarange": "3"
},
"dataset": {
"dEdxSelection": "TPCSignal",
"pass": "apass5",
"period": "zzf",
"year": "23",
"optTag": "",
"input_skimmedtree_path": "/lustre/alice/users/marin/R3A/TPCTreeswithNN/PbPbapass5_HR_251006/TPCTrees_HR_LHC23zzf_251006/AO2D_merge_LHC23zzf.root"
},
"general": {
"V0treename": "O2tpcskimv0wde",
"tpctoftreename": "O2tpctofskimwde"
},
"process": {
"severity": "INFO",
"createTrainingDataset": true,
"fitBBGraph": true,
"shiftNsigma": true,
"skimTreeQA": true,
"trainNeuralNet": true
},
"trainNeuralNetOptions": {
"execution_mode": "FULL",
"configuration": "/lustre/alice/users/csonnab/TPC/o2-tpc-pid/run/configs/nnconfig.py",
"training_file": "train_single_sigma.py",
"numberOfEpochs": "200",
"num_networks": 1,
"qa_file": "training_qa.py",
"enable_qa": "True",
"save_as_pt": "True",
"save_as_onnx": "True",
"save_loss_in_files": "True",
"slurm": {
"rocm_container": "/lustre/alice/users/csonnab/TPC/TPC_PRODUCTION/Containers/rocm_torch_env.sif",
"cuda_container": "/lustre/alice/users/csonnab/TPC/TPC_PRODUCTION/Containers/cuda_torch_env.sif",
"job-name": "TPCPID_TRAINING",
"partition": "main",
"time": 480,
"device": "NVIDIA_H200_GPU",
"cpus-per-task": 10,
"mem": "160G",
"mail-type": "END,FAIL,INVALID_DEPEND",
"mail-user": "",
"ngpus": 8
},
"htcondor": {
"universe": "vanilla",
"+JobFlavour": "workday",
"request_cpus": "10",
"request_memory": "10GB",
"request_disk": "10GB",
"notify_user": "christian.sonnabend@cern.ch",
"notification": "Complete,Error"
}
}
}Most important settings
- Everything in
settingsspecifies framework related settings.settings/framework: Specifies the global, absolute path to the frameworksettings/git: These specify the settings for later possibility to reproduce the state of the repository at the time that it was runsettings/git/checkout: When this flag is true, theremote,branch,tagandcommitfields will be used to reset the repository to the specified version. This should be the produciton default. This can even be a branch of the private github of a collaborator which makes debugging significantly easier.settings/git/create_diff: This will create a diff file in the output folder and also write information into the git_info.txt file to which tag this diff file was made. Like this the current state of work is stored in relation to an upstream tag and can be restored if needed.
createTrainingDatasetOptionsdescribe the input and output variables and the number of samples that are being produced for the training data creation from an input file (specified indataset/input_skimmedtree_path). Normalizations of the input variables is performed in framework/bbfitting_and_qa/CreateDataset.pydataset: Description of the data which is to be processed. This will auto-generate the output folder name. You can overwrite the output folder name usingdataset/outputPath, by specifying the full path there (not recommended, only for debug purposes)process: Describes the processes which are to be executed. These are used inrun/src/run_framework.pytrainNeuralNetOptions: Specifies all the options which are used to train the neural networks- Set the path to the nnconfig.py (
trainNeuralNetOptions/configuration) correctly. You will not need to modify it, the default settings should be fine for running.
- Set the path to the nnconfig.py (
~ Christian Sonnabend, Jonathan Witte (Dec. 2025)
Since November/December 2025 we use for skimTreeCreattion the wagon: Samples4PID_V0Cascade_PbPb_apass3 The TPC PID is taken from the CoreServiceWagon/PIDTPCService using a BB parametrization
Onces the trains are finished, they are downloaded using getStandardDerivedTreesFromHyperloop.sh in https://github.com/ALICE-TPC-PID/
The full process BB fits and NN is run at GSI cluster: https://github.com/ALICE-TPC-PID/tpcpid/tree/main/run
The results are then uploaded into the mastergoogle sheet: https://docs.google.com/spreadsheets/d/1jKdVtoK414_XngL9Xh1Zfxkwp7AlYeipujFRiRaFkx0/edit?gid=0#gid=0 and uploaded into the test-CCDB
Using the NN in the test CCDB, new skimtrees are created: Samples_PIDNN_V0Cascade_PbPb_apass3 The PIDTPCService should be a local one using the testCCDB and the QA is performed
~ Ana Marin (Dec. 2025)