-
Notifications
You must be signed in to change notification settings - Fork 613
[PWGDQ] Add ReducedFIT table for UPC analysis #13773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR implements a comprehensive ReducedFIT table infrastructure for PWGDQ framework to enable FIT detector information access in UPC (Ultra-Peripheral Collisions) analyses. Key changes: - Created ReducedFITs table with 35 columns covering FT0, FDD, and FV0A detectors - Added complete set of FIT variables to VarManager (amplitudes, timing, trigger masks, fired channel counts, pileup flags, BC distances) - Implemented FIT info filling in tableMaker using newbc pattern for UPC events (consistent with existing ZDC implementation) - Added fired channel counts for all detector sides (FT0A/C, FDDA/C, FV0A) as requested Implementation follows PWGUD upchelpers::FITInfo structure and applies the established newbc pattern for correct BC association in RapidityGapFilter scenarios. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
O2 linter results: ❌ 347 errors, |
PWGDQ/Core/VarManager.h
Outdated
| void VarManager::FillFIT(uint64_t midbc, std::vector<std::pair<uint64_t, int64_t>>& bcMap, TBCs const& bcs, TFT0s const& /*ft0s*/, TFDDs const& /*fdds*/, TFV0As const& /*fv0as*/, float* values) | ||
| { | ||
| if (!values) { | ||
| values = fgValues; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this function you do not cover the case when the FIT data is in the reduced DQ data model and is being used from the analysis workflow (e.g. from table reader). Is this something you plan to add later or?
| // The DQRapidityGapFilter contains the index of the bc we want to get FIT info from | ||
| auto newbc = bcs.rawIteratorAt(collision.newBcIndex()); | ||
| // Fill FIT information from newbc | ||
| if (newbc.has_foundFT0()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for all this block of code you can just call the VarManager::FillFIT(), otherwise, this VarManager function does not seem to be used anywhere
- Add template overload of VarManager::FillFIT() to handle both ReducedFIT (analysis workflows) and BC objects (tableMaker) - Refactor tableMaker_withAssoc.cxx to use VarManager::FillFIT() instead of duplicating FIT filling logic - Addresses review comments from @iarsene on PR AliceO2Group#13773 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add missing fired channels counts for FV0A and FDD detectors in tableMaker BC filling - Implement complete pileup flag calculation (BB/BG flags for FT0A/C, FV0A, FDDA/C) - Scan ±16 BCs around collision BC to fill pileup flags using BC selection bits - Follow PWGUD UPCCandidateProducer::processFITInfo pattern for consistency - Note: BC distance calculations (TOR, TSC, TVX, V0A, T0A) remain at default (999) This completes the FIT detector information implementation for UPC analysis in PWGDQ framework. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Following the pattern of ZDC variables (kEnergyZNC2, etc.), add fgVarNamesMap entries for all 35 FIT detector variables: - FT0 variables (amplitude, time, trigger mask, fired channels, pileup flags) - FDD variables (amplitude, time, trigger mask, fired channels, pileup flags) - FV0A variables (amplitude, time, trigger mask, fired channels, pileup flags) - BC distance variables (TOR, TSC, TVX, V0A, T0A) This ensures FIT variables can be properly referenced by name in histogram configurations and analysis code, similar to other detector variables in VarManager. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add fgVariableNames and fgVariableUnits definitions for all 35 FIT detector variables, following the same pattern as ZDC variables: - FT0 variables: amplitude (a.u.), time (ns), trigger mask, fired channels - FDD variables: amplitude (a.u.), time (ns), trigger mask, fired channels - FV0A variables: amplitude (a.u.), time (ns), trigger mask, fired channels - Pileup flags: BB/BG flags for FT0A/C, FV0A, FDDA/C (dimensionless) - BC distances: TOR, TSC, TVX, V0A, T0A (in BC units) This completes the FIT variable definition infrastructure in VarManager, enabling histogram creation and analysis with proper axis labels and units. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Fixed compilation error where bitwise OR operations (|=) were being performed directly on float array elements. The pileup flags need bit operations but are stored in the float values[] array. Solution: Use int32_t temporary variables for bit operations, then convert back to float for storage in the values array. - Declare int32_t variables for all 10 pileup flags at scan start - Perform bitwise operations on int32_t variables during BC scanning - Convert int32_t results to float and store in values[] after scanning This follows the same pattern as PWGUD UPCCandidateProducer which stores pileup flags as int32_t in the FITInfo structure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add simple FillFIT(bc) template function in VarManager.h that takes BC object directly - Accesses FIT detectors via bc.has_foundFT0(), bc.foundFT0(), etc. like ZDC does - No initialization overhead, only fills values when detectors are present - Update tableMaker to use simple VarManager::FillFIT(newbc) call - Remove FT0s, FDDs, FV0As table arguments from fullSkimming and skimCollisions - Remove FIT detector subscriptions from processPbPbWithFilterBarrelOnly - FIT information now accessed directly from BC objects, not from separate tables 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ith FIT detector info - Created new process function using gkEventFillMapWithMultsRapidityGapFilterZdcFit - This enables ReducedFit table filling for UPC Pb-Pb analysis - Fixes segmentation fault caused by unfilled FIT table during framework shutdown
- Changed has_foundFT0() -> has_ft0(), foundFT0() -> ft0() - Changed has_foundFV0() -> has_fv0a(), foundFV0() -> fv0a() - Changed has_foundFDD() -> has_fdd(), foundFDD() -> fdd() - Matches standard O2 BC table accessor naming convention
- Fix FT0/FV0A/FDD amplitude initialization to preserve -1 sentinel values - Only overwrite amplitude if actual signal is present (nFired > 0) - Fix fired channel counting: count only channels with amp > 0, not array size - Add FT0s, FDDs, FV0As table subscriptions to processPbPbWithFilterBarrelOnlyWithFIT This allows distinguishing between "no detector data" and "detector present but no signal"
…citly - Add type traits to detect FT0, FV0A, FDD detector objects - Modify FillFIT template to handle individual detector objects - Follow ZDC pattern: extract detector objects from BC before filling - Fix FT0 amplitude initialization to preserve sentinel values - Count only fired channels (amp > 0) for all detectors This fixes the issue where FT0 data was not being filled because bc.has_ft0() was checking for associations that weren't established when passing BC object directly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit refactors the FIT detector filling implementation to: 1. Remove unused FillFIT function that took individual detector collections 2. Simplify FillFIT for ReducedFIT tables to only read pre-computed columns 3. Add new BC-based FillFIT that processes all FIT detectors (FT0, FV0A, FDD) in one call 4. Implement background pileup calculation by scanning ±16 BCs following PWGUD pattern 5. Calculate distance to closest BCs with specific triggers (TOR, TSC, TVX, V0A, T0A) 6. Remove unused type traits (is_FT0, is_FV0A, is_FDD) 7. Optimize tableMaker_withAssoc.cxx to call FillFIT once per event instead of three times Key changes: - VarManager::FillFIT now has two clean overloads: one for ReducedFIT tables, one for raw BC data - Background/beam-beam pileup flags stored as bit-packed integers (kBGFT0Apf, kBBFT0Apf, etc.) - Distance variables track nearest BC with specific triggers within scan range - Reduced code complexity and improved performance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Error while checking build/O2Physics/o2 for 56c66ad at 2025-11-18 04:48: Full log here. |
Please consider the following formatting changes to AliceO2Group#13773
Comment out the gkEventFillMapWithMultsRapidityGapFilterZdc constant to prevent build Error on Mac
Head branch was pushed to by a user without write access
Please consider the following formatting changes to AliceO2Group#13773
Co-authored-by: minjungkim12 <minjungkim12@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
This PR implements a comprehensive ReducedFIT table infrastructure for PWGDQ framework to enable FIT detector information access in UPC (Ultra-Peripheral Collisions) analyses.
Key changes:
Implementation follows PWGUD upchelpers::FITInfo structure and applies the established newbc pattern for correct BC association in RapidityGapFilter scenarios.
🤖 Generated with Claude Code