Skip to content

Conversation

@minjungkim12
Copy link
Contributor

@minjungkim12 minjungkim12 commented Oct 30, 2025

Summary

This PR adds Ultra-Peripheral Collision (UPC) analysis functionality to taskDplus and taskD0, following the implementation pattern from taskLc (commit 41d60bb).

Changes

Core UPC Implementation

  • ✅ Add UPC process functions (processDataWithDCAFitterNMlWithUpc for taskD0, processDataWithMlWithUpc for taskDplus)
  • ✅ Refactor UPC utilities to PWGHF/Utils/utilsUpcHf.h with gap type enum and helper functions
  • ✅ Add QA histograms for UPC analysis (FIT signals, ZDC energy, gap types)
  • ✅ Add FT0A, FT0C amplitudes and gap type axes to THnSparse
  • ✅ Unify THnSparse structure between taskD0 and taskDplus for consistency

Configurable Thresholds and Occupancy Storage (Latest)

  • ✅ Add configurable parameters for UPC gap determination thresholds:
    • upcFT0AThreshold (default: 100.0 a.u.)
    • upcFT0CThreshold (default: 50.0 a.u.)
    • upcZDCThreshold (default: 1.0 a.u.)
  • ✅ Enable storeOccupancyAndIR for UPC process in taskD0
  • ✅ Add occupancy calculation in taskDplus UPC process
  • ✅ Allow users to optimize gap selection criteria via JSON configuration

Benefits

  • Enables UPC studies for D0 and D+ mesons in Run 3
  • Provides configurable thresholds for different beam conditions and physics requirements
  • Supports occupancy and interaction rate studies in UPC analyses
  • Maintains consistency with taskLc approach for occupancy handling
  • Uses centralized utilities for code maintainability

Gap Determination Logic

Single-sided gaps are identified based on FIT and ZDC signals:

  • Gap on A-side: FT0A < threshold, FT0C > threshold, ZNA < threshold, ZNC > threshold
  • Gap on C-side: FT0A > threshold, FT0C < threshold, ZNA > threshold, ZNC < threshold
  • Double gap (or no clear gap): All other cases

Default thresholds are defined in utilsUpcHf.h and can be overridden via configuration.

@github-actions
Copy link

github-actions bot commented Oct 30, 2025

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

@vkucera vkucera marked this pull request as draft October 30, 2025 13:58
minjungkim12 added a commit to minjungkim12/O2Physics that referenced this pull request Oct 30, 2025
Please consider the following formatting changes to AliceO2Group#13603
@minjungkim12 minjungkim12 marked this pull request as ready for review October 30, 2025 20:27
@zhangbiao-phy
Copy link
Collaborator

zhangbiao-phy commented Oct 31, 2025

hi @minjungkim12, Thanks a lot for the implementations! Given we already loose the selection on the FIT amplitudes in the derived data, and we want to determine the gap type for the candidates come from offline. In this case, We need to save the FIT signal amplitudes to the ThnSparse as we discussed. it will make the analysis more flexible. What do you think? I think @Rrantu is also working it on the Lc task

@minjungkim12
Copy link
Contributor Author

hi @minjungkim12, Thanks a lot for the implementations! Given we already loose the selection on the FIT amplitudes in the derived data, and we want to determine the gap type for the candidates come from offline. In this case, We need to save the FIT signal amplitudes to the ThnSparse as we discussed. it will make the analysis more flexible. What do you think? I think @Rrantu is also working it on the Lc task

Hi @zhangbiao-phy Thanks a lot for bringing it up! Yes, I agree with it. I will wait for the PR from @Rrantu and implement accordingly :) @Rrantu , Can I get rough time estimating?

@Rrantu
Copy link
Contributor

Rrantu commented Nov 3, 2025

Hi @minjungkim12, sorry for the late reply. I’m currently busy with meetings, but I’ll try to get this PR done before the weekend.

@minjungkim12 minjungkim12 marked this pull request as draft November 7, 2025 15:36
@minjungkim12 minjungkim12 marked this pull request as ready for review November 10, 2025 19:43
@minjungkim12
Copy link
Contributor Author

Thanks a lot @zhangbiao-phy for your review :) I implemented your latest comments in my last commit.

@zhangbiao-phy
Copy link
Collaborator

zhangbiao-phy commented Nov 17, 2025

Thanks a lot @zhangbiao-phy for your review :) I implemented your latest comments in my last commit.

Thanks @minjungkim12! I don't have further comments. Let's see whether Vit have further comments

zhangbiao-phy
zhangbiao-phy previously approved these changes Nov 17, 2025
@minjungkim12 minjungkim12 requested a review from vkucera November 17, 2025 16:58
@alibuild
Copy link
Collaborator

Error while checking build/O2Physics/o2 for b2ba951 at 2025-11-17 18:52:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/13603-slc9_x86-64/0/PWGHF/D2H/Tasks/taskD0.cxx:1173:66: error: unused parameter 'tracks' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/13603-slc9_x86-64/0/PWGHF/D2H/Tasks/taskD0.cxx:1186:68: error: unused parameter 'tracks' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

@vkucera
Copy link
Collaborator

vkucera commented Nov 17, 2025

Thanks a lot @zhangbiao-phy for your review :) I implemented your latest comments in my last commit.

Thanks @minjungkim12! I don't have further comments. Let's see whether Vit have further comments

Yes, I do. See my previous unresolved comments. Plus the PR doesn't compile. @minjungkim12 You are supposed to check your compilation log before pushing.

@vkucera vkucera marked this pull request as draft November 17, 2025 17:55
@vkucera
Copy link
Collaborator

vkucera commented Nov 17, 2025

@zhangbiao-phy Please mark your comments as resolved if they are.

minjungkim12 and others added 2 commits November 17, 2025 19:33
… warnings

- Remove gapTypeToInt pass-through function from utilsUpcHf.h
- Replace hf_upc::gapTypeToInt(gap) calls with gap directly in taskD0 and taskDplus
- Add /*tracks*/ comment to suppress unused parameter warnings in UPC process functions

The gapTypeToInt function was a no-op that simply returned its input unchanged.
As noted by @vkucera, this function serves no purpose since gap is already an int.

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vkucera vkucera marked this pull request as ready for review November 18, 2025 15:52
@vkucera
Copy link
Collaborator

vkucera commented Nov 18, 2025

@minjungkim12 Looks good to me. Thanks a lot for your patience and for the effort to address all the comments.
@zhangbiao-phy Can you please check as well?

@zhangbiao-phy
Copy link
Collaborator

zhangbiao-phy commented Nov 18, 2025

@minjungkim12 Looks good to me. Thanks a lot for your patience and for the effort to address all the comments. @zhangbiao-phy Can you please check as well?

Green light from my side! Thanks a lot!

zhangbiao-phy
zhangbiao-phy previously approved these changes Nov 18, 2025
@zhangbiao-phy zhangbiao-phy enabled auto-merge (squash) November 18, 2025 16:14
auto-merge was automatically disabled November 18, 2025 23:11

Head branch was pushed to by a user without write access

@zhangbiao-phy zhangbiao-phy enabled auto-merge (squash) November 19, 2025 09:27
@vkucera
Copy link
Collaborator

vkucera commented Nov 19, 2025

@minjungkim12 Your last commit introduced a warning. Please fix it.

satisfies the naming guidelines
auto-merge was automatically disabled November 19, 2025 12:46

Head branch was pushed to by a user without write access

@zhangbiao-phy zhangbiao-phy enabled auto-merge (squash) November 19, 2025 19:44
@zhangbiao-phy zhangbiao-phy merged commit 32e9809 into AliceO2Group:master Nov 21, 2025
14 checks passed
yakparo pushed a commit to yakparo/O2Physics that referenced this pull request Nov 21, 2025
lmattei01 pushed a commit to lmattei01/O2Physics that referenced this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

6 participants