Skip to content

FT0: update Digitizer signal shape and trigger logic; FV0: update trigger logic in digitizer#15209

Merged
sahilupadhyaya92 merged 8 commits intoAliceO2Group:devfrom
spulawsk:fv0_ft0_clean
Mar 30, 2026
Merged

FT0: update Digitizer signal shape and trigger logic; FV0: update trigger logic in digitizer#15209
sahilupadhyaya92 merged 8 commits intoAliceO2Group:devfrom
spulawsk:fv0_ft0_clean

Conversation

@spulawsk
Copy link
Copy Markdown
Contributor

This PR introduces an updated signal shape model and revised trigger handling in the FT0 digitization.

The signal response used in the FT0 digitizer has been updated to a parametrization based on a sum of two log-normal components. This allows a better description of the detector pulse shape in Monte Carlo simulations and improves the agreement between simulated trigger response and data.

In addition, trigger logic has been adjusted to better reproduce the behaviour of the FT0 trigger chain.

Main changes

Signal model:

introduce a new signal shape function based on two log-normal components
provide analytical integral of the signal shape for amplitude evaluation
keep the previous implementation commented for reference

Trigger tuning:

update trigger thresholds in FT0DigParam (mtrg_central_trh, mtrg_semicentral_trh)
introduce a dedicated vertex trigger gate parameter (mTime_trg_vertex_gate)

Digitizer improvements:

introduce mapping from channel ID to PM hash using FT0 metadata
accumulate charge per PM using the mapping
improve calculation of central and semicentral triggers based on summed PM charge
add monitoring of summed PM amplitudes (debug logging)

The definition of FT0 triggers in the digitizer is updated to better match the trigger logic used in data processing. In particular, the central, semicentral, and vertex trigger conditions are now computed using PM-summed amplitudes and timing definitions consistent with those used in the FT0 trigger chain.

In addition, the FV0 trigger logic has been corrected to follow a consistent definition with the data.

These changes improve the consistency between MC digitization and the trigger quantities reconstructed from data.

No changes to the data format are introduced.

@github-actions
Copy link
Copy Markdown
Contributor

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

@spulawsk spulawsk marked this pull request as ready for review March 24, 2026 11:39
@sahilupadhyaya92 sahilupadhyaya92 enabled auto-merge (squash) March 30, 2026 14:16
@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 4725b5e at 2026-03-30 19:59:

## sw/BUILD/O2Physics-latest/log
c++: fatal error: Killed signal terminated program cc1plus
ninja: build stopped: subcommand failed.


## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ GRERR=0
++ grep -v clang-diagnostic-error error-log.txt
++ grep ' error:'
++ GRERR=1
++ [[ 1 == 0 ]]
++ mkdir -p /sw/INSTALLROOT/7fbe59bf5c91181fead2b7ddb5eec307f738556e/slc9_x86-64/o2checkcode/1.0-local15/etc/modulefiles
++ cat
--

Full log here.

@sahilupadhyaya92 sahilupadhyaya92 merged commit aa5d3c6 into AliceO2Group:dev Mar 30, 2026
10 of 11 checks passed
@spulawsk spulawsk deleted the fv0_ft0_clean branch March 31, 2026 06:30
Copy link
Copy Markdown
Collaborator

@andreasmolander andreasmolander left a comment

Choose a reason for hiding this comment

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

I am a bit late to the PR, but please consider these

if (bc.hits.empty()) {
return;
}
// Initialize mapping channelID -> PM hash and PM side (A/C) using FT0 LUT
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We have this logic copy-pasted in a lot of FIT code, please consider moving it to a standalone class that can be reused in other places. If not that, then please at least consider moving it to a initialization section of the Digitizer. Now it will run for each BC stored. The hashmaps can for example be members of the digitizer class, as the LUT, they don't change often. Although I would prefer having this somewhere else all together.

is_C = n_hit_C > 0;
is_Central = summ_ampl_A + summ_ampl_C >= params.mtrg_central_trh;
is_SemiCentral = summ_ampl_A + summ_ampl_C >= params.mtrg_semicentral_trh;
is_Central = sum_PM_ampl_A_debug + sum_PM_ampl_C_debug >= 2 * params.mtrg_central_trh;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fine for now, but we should also consider supporting the different trigger modes (A+C, A&C, A, C)

float mNoiseVar = 0.1; // noise level
float mNoisePeriod = 1 / 0.9; // GHz low frequency noise period;
short mTime_trg_gate = 153; // #channels as in TCM as in Pilot beams ('OR gate' setting in TCM tab in ControlServer)
short mTime_trg_vertex_gate = 100; // #channels as in TCM as in Pilot beams ('OR gate' setting in TCM tab in ControlServer)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should support separate upper and lower vertex thresholds, also pls modify the comment to point to the correct setting in CS

Comment on lines 485 to 486
uint32_t amplA = is_A ? summ_ampl_A * 0.125 : -5000; // sum amplitude A side / 8 (hardware)
uint32_t amplC = is_C ? summ_ampl_C * 0.125 : -5000; // sum amplitude C side / 8 (hardware)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fine for now, can maybe consider "true" HW division if we make that method globally available somewhere

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.

4 participants