Skip to content

TPC: Processing of common mode values in O2#15137

Open
tubagundem wants to merge 19 commits intoAliceO2Group:devfrom
tubagundem:TPC_CMV
Open

TPC: Processing of common mode values in O2#15137
tubagundem wants to merge 19 commits intoAliceO2Group:devfrom
tubagundem:TPC_CMV

Conversation

@tubagundem
Copy link
Copy Markdown
Contributor

@tubagundem tubagundem commented Mar 9, 2026

This PR introduces end-to-end infrastructure for reading, processing and storing TPC Common Mode Values (CMVs) within the O2 framework.

New data structures

  • DataFormatsTPC/CMV.h — defines the CMV dataformat as received from the CRU: a 256-bit Header (version, packetID, errorCode, magic word, heartbeat orbit/BC) followed by one 16-bit CMV word per timebin, covering 3564 timebins per packet. Includes fixed-point to float conversion helpers
  • CMVLinkID = 23 added to RDHUtils.h to identify CMV data in raw RDH streams
  • CMVContainer.h/.cxx — accumulator struct for one aggregation interval, storing CMV values together with CRU index, timebin, first orbit/BC, first and last TF counter

New workflows

  • CMVToVectorSpec / tpc-cmv-to-vector — extracts CMVs from raw data into vectors
  • TPCFLPCMVSpec / tpc-flp-cmv — FLP side processing of CMV data
  • TPCDistributeCMVSpec / tpc-distribute-cmv — distributes CMVs and serializes CMVContainer

Compression and size reduction strategies

The following techniques are available for reducing CMV data size:

  • Delta encoding
  • Zigzag transform
  • Varint encoding
  • Huffman encoding
  • Sparse representation
  • Small-value zeroing
  • Rounding to the closest integer
  • Dynamic Gaussian precision option

Visualization

  • drawCMV.C — ROOT macro to inspect and visualize CMV data.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

Copy link
Copy Markdown
Collaborator

@shahor02 shahor02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the class methods with lot of code be moved from the header to cxx file (including needed headers, like TFile.h and TTree.h in https://github.com/AliceO2Group/AliceO2/pull/15137/changes#diff-74cad5f291e0478b7a6334eb7e3dcdabbad615a01df0db129d836a337e76582aR26-R27 ?

Copy link
Copy Markdown
Collaborator

@wiechula wiechula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tubagundem , some minor things and a couple questions:

  • How different are the CMVToVectorSpec.h and the corresponding IDC code? Could it have a common base to?
  • What is done in the TPCFactorizeCMVSpec.h? I think in the CMV we don't do factorization.

@tubagundem tubagundem marked this pull request as ready for review April 10, 2026 07:45
@tubagundem tubagundem requested a review from davidrohr as a code owner April 10, 2026 07:45
@tubagundem tubagundem marked this pull request as draft April 10, 2026 08:52
@tubagundem tubagundem marked this pull request as ready for review April 10, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants