[Common] Add zdc-extra-table-reader task#16028
[Common] Add zdc-extra-table-reader task#16028udmitrie wants to merge 7 commits intoAliceO2Group:masterfrom
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. |
| #include <Framework/OutputObjHeader.h> | ||
| #include <Framework/runDataProcessing.h> | ||
|
|
||
| #include <TFile.h> |
| {}, | ||
| OutputObjHandlingPolicy::AnalysisObject}; |
| evSel_zvtx, | ||
| evSel_sel8, | ||
| evSel_occupancy, | ||
| evSel_kNoSameBunchPileup, | ||
| evSel_kIsGoodZvtxFT0vsPV, | ||
| evSel_kNoCollInTimeRangeStandard, | ||
| evSel_kIsVertexITSTPC, | ||
| evSel_kIsGoodITSLayersAll, | ||
| evSel_allEvents, | ||
| nEventSelections |
There was a problem hiding this comment.
Follow the naming conventions.
|
|
||
| void clearCache() | ||
| { | ||
| if (hMeanVx) { |
There was a problem hiding this comment.
The if condition is redundant.
| delete step.hMeanQxZNA; | ||
| delete step.hMeanQyZNA; | ||
| delete step.hMeanQxZNC; | ||
| delete step.hMeanQyZNC; |
There was a problem hiding this comment.
Why is this not in ~CalibStepData?
| } | ||
| mCurrentRunNumber = mRunNumber; | ||
|
|
||
| if (gEventCounter.find(mRunNumber) == gEventCounter.end()) { |
There was a problem hiding this comment.
This is not a sequential container. Use contains to check the presence of a key.
| // Vertex Calibration | ||
| if (ifBeamSpotCorrection) { | ||
| std::string folder = Form("%s/step0", qRecenteringCcdb.value.c_str()); | ||
| TList* lst = ccdb->getForRun<TList>(folder, run); |
There was a problem hiding this comment.
Don't duplicate the type.
| TList* lst = ccdb->getForRun<TList>(folder, run); | |
| auto* lst = ccdb->getForRun<TList>(folder, run); |
| } 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.
|
|
||
| // Fill histogram for all bits that passed | ||
| for (int bit = 0; bit < nEventSelections + 1; bit++) { | ||
| if (zdc.selectionBits() & (1 << bit)) { |
There was a problem hiding this comment.
There is TESTBIT for this.
zdc-extra-table-reader is needed to read AOD/ZDCEXTRA derived data and proceed with multi-step calibration (Q-vectors recentering) of ZDC data