[Common] Add zdc-extra-table-reader task#16028
Conversation
zdc-extra-table-reader is needed to read AOD/ZDCEXTRA derived data and proceed with multistep calibration (Q-vectors recentering) of ZDC data
|
O2 linter results: ❌ 1 errors, |
Refactor logging and constants in zdcExtraTableReader. Replaced std::cerr logging with LOGF for error handling and updated constant names for consistency.
Add check number of fired towers with isZN*SpDeterminable (to reconstruct Q-vector at least 2 fired towers needed); Replace FindBin with FindFixBin; update variables.
Please consider the following formatting changes to AliceO2Group#16028
|
Dear code owners, There are no O2 linter errors connected to my changes. |
| } else { | ||
| LOGF(error, " >> CCDB TList is NULL for path: %s. Check object type (TList vs TFile).", folder.c_str()); | ||
| } |
There was a problem hiding this comment.
Reverse the logic to return early if (!lst) and reduce nesting.
|
Error while checking build/O2Physics/staging for 5397abb at 2026-05-07 21:51: Full log here. |
|
Dear @vkucera, I am planning to update this PR this week, addressing your comments. |
Updated event selection configuration and histogram handling in zdcExtraTableReader.cxx. Refactored selection bits and improved memory management in the clearCache method.
Formatting changes to AliceO2Group#16028
| double getMeanQFromMap(THn* h, double cent, double vx, double vy, double vz) | ||
| { | ||
| if (!h) { | ||
| // LOGF(error, "[MeanQ] Null THn pointer"); |
There was a problem hiding this comment.
Why do you not throw a fatal?
| if (!axCent || !axVx || !axVy || !axVz) { | ||
| LOGF(error, "[MeanQ] One of THn axes is null"); |
There was a problem hiding this comment.
Why do you not throw a fatal?
| double meanQ = h->GetBinContent(idx); | ||
|
|
||
| return meanQ; |
There was a problem hiding this comment.
You can just return directly.
| if (!h) { | ||
| return 0.0; |
There was a problem hiding this comment.
Why do you not throw a fatal?
| Configurable<int> qxyNbins{"qxyNbins", 100, "Number of bins in QxQy histograms"}; | ||
| Configurable<float> qxyMin{"qxyMin", -2.0f, "Lower edge for QxQy histograms"}; | ||
| Configurable<float> qxyMax{"qxyMax", 2.0f, "Upper edge for QxQy histograms"}; |
|
|
||
| Configurable<int> phiNbins{"phiNbins", 60, "Bins in phi"}; | ||
|
|
||
| Configurable<int> nTowersFired{"nTowersFired", 2, "Minimum number of towers fired for Q-vector determination"}; |
There was a problem hiding this comment.
Name the configurable such that it is clear that this is a minimum.
| Configurable<bool> ifSel8{"ifSel8", true, "Event selection: Sel8"}; | ||
| Configurable<bool> ifZVtxCut{"ifZVtxCut", true, "Event selection: zVtx cut set in producer (tipically < 10 cm)"}; | ||
| Configurable<bool> ifOccupancyCut{"ifOccupancyCut", false, "Event selection: occupancy cut set in producer"}; | ||
| Configurable<bool> ifNoSameBunchPileup{"ifNoSameBunchPileup", false, "Event selection: no same bunch pileup"}; | ||
| Configurable<bool> ifIsGoodZvtxFT0vsPV{"ifIsGoodZvtxFT0vsPV", false, "Event selection: good Zvtx FT0 vs PV"}; | ||
| Configurable<bool> ifNoCollInTimeRangeStandard{"ifNoCollInTimeRangeStandard", false, "Event selection: no collision in time range standard"}; |
There was a problem hiding this comment.
Why do these start with if?
If you are you trying to communicate that this enables the application of a cut, use a verb, like enable, apply, use, select, reject,...
|
|
||
| Configurable<bool> ifShiftCorrection{"ifShiftCorrection", false, "Apply shift correction (Read from CCDB)"}; | ||
| Configurable<bool> fillShiftHistos{"fillShiftHistos", true, "Fill shift profiles (Write to output)"}; | ||
| Configurable<int> nShift{"nShift", 10, "Number of harmonics"}; |
There was a problem hiding this comment.
The name of the variable indicates that this a number of shifts while the documentation says that it's a number of harmonics. So what is it?
| NEventSelections | ||
| }; | ||
|
|
||
| int mCurrentRunNumber{-1}; |
zdc-extra-table-reader is needed to read AOD/ZDCEXTRA derived data and proceed with multi-step calibration (Q-vectors recentering) of ZDC data