Skip to content

[PWGCF] FactorialMoments: replace subsampling error calculation with merge-safe slot pooling - #18327

Open
baasingh wants to merge 1 commit into
AliceO2Group:masterfrom
baasingh:fmomsample
Open

baasingh wants to merge 1 commit into
AliceO2Group:masterfrom
baasingh:fmomsample

Conversation

@baasingh

Copy link
Copy Markdown
Contributor
  1. The task no longer subsamples events: each event is hashed into one of nSlots buckets (slot = splitmix64(globalBC) % nSlots) and only merge-safe partial sums are stored — slots/nEv, slots/sumOcc_pt{i}, slots/sumFq_pt{i}_o{q} — as plain histograms, so hadd adds them cell-by-cell; a merged campaign file is then the same object as a single one-go run (no per-file counter, no RNG in the subsampling).
  2. The subsample size K becomes a post-processing choice: local code pools consecutive non-empty slots greedily into K-event groups (any K; keepTail option; K=0 = ratio-of-sums limit) and evaluates Fq exactly as the old path did: Fq = mean over groups of (Sfq/n)/(Socc/n)^q.
  3. slots/params (bin1 = number of jobs, bin2 = sum of their nSlots) makes a hadd mixing jobs with different nSlots fail loudly — otherwise invisible, because hadd keeps the first axis and the event totals still balance.
  4. Fixes vs the current upstream task: explicit falling-factorial product loop (upstream's TMath::Factorial overflows for n ≥ 171 and poisons pt bin 1, M=4 at all orders); smearPhi option (Gaussian phi randomisation, default off; shipped configs on).`

@github-actions

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 21 warnings, 🔕 0 disabled

@baasingh baasingh changed the title merge-safe slot subsampling replaces the sampleSize path PWGCF:merge-safe slot subsampling replaces the sampleSize path Oct 16, 2026
@github-actions github-actions Bot changed the title PWGCF:merge-safe slot subsampling replaces the sampleSize path [PWGCF] merge-safe slot subsampling replaces the sampleSize path Oct 16, 2026
@github-actions github-actions Bot changed the title [PWGCF] merge-safe slot subsampling replaces the sampleSize path [PWGCF] PWGCF:merge-safe slot subsampling replaces the sampleSize path Oct 16, 2026
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 6a47396 at 2026-10-16 14:40:

## sw/BUILD/O2Physics-latest/log
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 6a47396 at 2026-10-17 08:03:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'To reproduce the results below locally, run: '\''aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'\''.'
To reproduce the results below locally, run: 'aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'.
++ echo 'To apply all automatic fixes, add the '\''-e O2PHYSICS_CHECKER_FIX=1'\'' option.'
To apply all automatic fixes, add the '-e O2PHYSICS_CHECKER_FIX=1' option.
++ echo 'See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.'
See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.
++ echo 'Found 3 errors and 0 warnings.'
Found 3 errors and 0 warnings.
++ [[ 3 -gt 0 ]]
++ cat /sw/BUILD/afbd8fd5dd9dc4f7eaa2eadb8686f0f4876c1499/O2Physics-code-check/errors.txt
PWGCF/EbyEFluctuations/Tasks/FactorialMomentsTask.cxx:42:1: error: included header RtypesCore.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGCF/EbyEFluctuations/Tasks/FactorialMomentsTask.cxx:132:5: error: no header providing "o2::framework::OutputObjHandlingPolicy" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/EbyEFluctuations/Tasks/FactorialMomentsTask.cxx:560:46: error: no header providing "BIT" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 0 -gt 0 ]]
++ [[ 3 -gt 0 ]]
++ exit 1
--

Full log here.

@vkucera vkucera changed the title [PWGCF] PWGCF:merge-safe slot subsampling replaces the sampleSize path [PWGCF] merge-safe slot subsampling replaces the sampleSize path Oct 16, 2026
@vkucera

vkucera commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Hi @baasingh , please try to make it clearer from the PR title what you changed and where. You can find some tips in the contribution guidelines. https://aliceo2group.github.io/analysis-framework/docs/gettingstarted/contributingtocode.html#pull-requests

@baasingh baasingh changed the title [PWGCF] merge-safe slot subsampling replaces the sampleSize path [PWGCF] FactorialMoments: replace subsampling error calculation with merge-safe slot pooling Oct 16, 2026
@baasingh

Copy link
Copy Markdown
Contributor Author

Hi @baasingh , please try to make it clearer from the PR title what you changed and where. You can find some tips in the contribution guidelines. https://aliceo2group.github.io/analysis-framework/docs/gettingstarted/contributingtocode.html#pull-requests

Thanks — Renamed PR to name the task and the change.

@vkucera

vkucera commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Hi @baasingh , please try to make it clearer from the PR title what you changed and where. You can find some tips in the contribution guidelines. https://aliceo2group.github.io/analysis-framework/docs/gettingstarted/contributingtocode.html#pull-requests

Thanks — Renamed PR to name the task and the change.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants