Skip to content

oo capability at Macro level#1317

Open
jamesjl3 wants to merge 6 commits intosPHENIX-Collaboration:masterfrom
jamesjl3:master
Open

oo capability at Macro level#1317
jamesjl3 wants to merge 6 commits intosPHENIX-Collaboration:masterfrom
jamesjl3:master

Conversation

@jamesjl3
Copy link
Copy Markdown
Contributor

@jamesjl3 jamesjl3 commented Mar 24, 2026

Modified HIJetReco to call for oo type
Modified Jet_QA.C for oo naming and trigger
Added new JetProduction macro to run over pp and oo explicitly

Motivation and Context

This PR extends jet reconstruction and quality assurance (QA) infrastructure to support gold-gold (O+O, "oo") collision type at the macro level, alongside existing proton-proton (pp) support. Previously, the jet reconstruction framework primarily focused on Au+Au heavy-ion collisions. This change enables comparative analysis across multiple collision systems within the sPHENIX experiment.

Key Changes

New Infrastructure Files:

  • HIJetReco.C: New modular heavy-ion jet reconstruction framework with configurable flags (Enable::HIJETS, HIJETS::is_pp, HIJETS::is_oo) to dispatch reconstruction across truth jets, tower-based jets, track-based jets, and particle-flow jets with optional background subtraction and flow modulation
  • Jet_QA.C (JetProduction/): Comprehensive jet QA implementation with configurable namespaces (JetQA, Enable) supporting inclusive and triggered QA, trigger-dependent pt thresholds, collision-type-specific defaults, and per-collision selections
  • Fun4All_JetSkimmedProductionYear3_pp.C: New pp-specific skimming macro with hard-coded pp collision configuration and optimized node filtering for pp dataset processing

Modified Production Macros:

  • Fun4All_JetSkimmedProductionYear3.C: Added ResolveInputFile() utility for robust input file path resolution across multiple fallback locations; switched default collision mode to pp; unconditionally invokes HIJetReco(); increased verbosity and improved file accessibility validation with hard-exit on failure
  • Jet_QA.C (common/): Refactored EMClusterKinematics configuration with explicit histogram tagging and optional histogram control

Potential Risk Areas

  1. Collision Type Flagging: Hard-coded collision type settings (is_pp=true, is_oo=false in pp-specific macro) require careful macro selection; operator error in choosing the wrong macro could silently process the wrong collision type without obvious runtime indicators

  2. Input File Resolution: New ResolveInputFile() adds glob-based wildcard path matching via shell command; potential edge cases include symlink handling, timing issues with wildcard matches, and filesystem performance on large run directories; hard-exit on missing files may be overly strict for grid/batch processing scenarios

  3. Background Subtraction Behavior: Tower-based jets use background subtraction in all modes; track and particle-flow jets log warnings that background subtraction is "not implemented" but continue execution—verify this is intentional and that results are sensible in pp where background may be negligible

  4. QA Trigger Lists: Collision-type-dependent default trigger lists are generated programmatically; changes to trigger availability may silently skip QA modules if triggers are no longer fired

  5. Verbosity Levels: Increased verbosity (10) in production macro may generate large log volumes on high-event-count jobs; consider performance impact in grid environment

  6. Conditional Centrality: Centrality() is invoked conditionally (not in pp), but JetSeedCount is only registered when !pp—verify this asymmetry reflects intended physics and analysis strategy

Notes on AI-Generated Content

The raw summary was generated by AI and may contain inaccuracies in technical details, such as library dependencies, exact function signatures, or logic flow. Recommend manual code review of critical sections, especially:

  • Background subtraction implementation differences between collision types
  • Trigger configuration and histogram binning consistency
  • Input file validation logic edge cases

Possible Future Improvements

  1. Unified Macro Entry Point: Create a collision-agnostic macro factory (e.g., Fun4All_JetSkimmedProduction(collision_type="pp"|"oo"|"AuAu")) to reduce duplication and human selection errors

  2. Dynamic Collision Detection: Auto-detect collision type from input filename or dataset metadata rather than relying on macro selection

  3. Configurable Output Filtering: Externalize node-list filtering as a configuration parameter rather than hard-coding in each macro variant

  4. Enhanced File Resolution: Improve ResolveInputFile() with better error messaging, timeout handling, and optional "no hard-exit" mode for batch systems

  5. Trigger Validation: Add runtime checks ensuring configured triggers are actually fired in the dataset before silently skipping QA modules

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1248e14e-5215-449e-9691-658150924552

📥 Commits

Reviewing files that changed from the base of the PR and between c57616f and 017af16.

📒 Files selected for processing (3)
  • JetProduction/Fun4All_JetSkimmedProductionYear3_pp.C
  • JetProduction/HIJetReco.C
  • JetProduction/Jet_QA.C

📝 Walkthrough

Walkthrough

Adds HI/pp jet reconstruction and QA infrastructure, introduces a pp-specific production macro, enhances production input-resolution and hard-fail behavior, and refactors calorimeter QA initialization. New files provide orchestration, configurable flags, and subsystem builders for truth/tower/track/pflow jet workflows and QA.

Changes

Cohort / File(s) Summary
Production scripts
JetProduction/Fun4All_JetSkimmedProductionYear3.C, JetProduction/Fun4All_JetSkimmedProductionYear3_pp.C
Switched production to pp mode (HIJETS::is_pp = true), added ResolveInputFile(baseDir,fname) and hardened input handling (logs resolved path; exits if inaccessible), increased JetDSTSkimmer verbosity, removed conditional Centrality() call and commented out threshold-map calls, added a new pp-specific macro variant.
HI jet reconstruction
JetProduction/HIJetReco.C
New macro/header introducing global Enable switches and HIJETS configuration (collision-type flags, FastJet defaults, enums), helper GetFJAlgo, and subsystem builders: MakeHITruthJets, MakeHITowerJets, MakeHITrackJets, MakeHIPFlowJets, HIJetReco, and DoRhoCalculation for multi-radius background-subtracted workflows.
Jet QA framework
JetProduction/Jet_QA.C, common/Jet_QA.C
Added comprehensive Jet QA implementation (JetQA namespace): config flags, trigger/jet lookup tables, helper selection funcs, and top-level QA builders (CommonJetQA, JetsWithTracksQA, JetsWithCaloQA, Jet_QA). Updated JetsWithCaloQA in common/Jet_QA.C to instantiate EMClusterKinematics with explicit histogram tag and conditional trigger selection.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sphenix-jenkins-ci
Copy link
Copy Markdown

For repository maintainers, please start the CI check manually (feedback)

This is an automatic message to assist manually starting CI check for this pull request, commit c57616f1a97fe9d7d44811fd1b3be9b66c94fb80. macros pull request require a manual start for CI checks, in particular selecting which coresoftware and calibrations versions to check against this macros pull request.

sPHENIX software maintainers: please make your input here and start the Build:

build

Note:

  1. if needed, fill in the pull request ID for the coresoftware pull request, e.g. origin/pr/1697/merge for PR#1697 in sha_coresoftware. Default is to check with the master branch.
  2. click Build button at the end of the long web page to start the test

Automatically generated by sPHENIX Jenkins continuous integration
sPHENIX             jenkins.io

@sphenix-jenkins-ci
Copy link
Copy Markdown

For repository maintainers, please start the CI check manually (feedback)

This is an automatic message to assist manually starting CI check for this pull request, commit 017af16e15be604f24736d07639a395b17995a5f. macros pull request require a manual start for CI checks, in particular selecting which coresoftware and calibrations versions to check against this macros pull request.

sPHENIX software maintainers: please make your input here and start the Build:

build

Note:

  1. if needed, fill in the pull request ID for the coresoftware pull request, e.g. origin/pr/1697/merge for PR#1697 in sha_coresoftware. Default is to check with the master branch.
  2. click Build button at the end of the long web page to start the test

Automatically generated by sPHENIX Jenkins continuous integration
sPHENIX             jenkins.io

@pinkenburg
Copy link
Copy Markdown
Contributor

Duplicating HIJetreco.C and Jet_QA.C is a real problem. The changes should be implemented in the original macros in common. From what I can tell that should be possible but I can't test it

@sphenix-jenkins-ci
Copy link
Copy Markdown

For repository maintainers, please start the CI check manually (feedback)

This is an automatic message to assist manually starting CI check for this pull request, commit 60277c7df4dfa09ba7f926bd30304754ef116966. macros pull request require a manual start for CI checks, in particular selecting which coresoftware and calibrations versions to check against this macros pull request.

sPHENIX software maintainers: please make your input here and start the Build:

build

Note:

  1. if needed, fill in the pull request ID for the coresoftware pull request, e.g. origin/pr/1697/merge for PR#1697 in sha_coresoftware. Default is to check with the master branch.
  2. click Build button at the end of the long web page to start the test

Automatically generated by sPHENIX Jenkins continuous integration
sPHENIX             jenkins.io

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants